===============
* pstree: Do not crash on missing processes !21
* fuser: Get less confused about duplicate dev_id !10
+ * fuser: Only check pathname on non-block devices !31
Changes in 23.3
===============
if (thedev != dev_tmp->device)
continue;
- /* check the paths match */
- if (readlink(filepath, real_filepath, PATH_MAX-1) < 0) {
- if (strncmp(dev_tmp->name->filename, filepath, strlen(dev_tmp->name->filename)) != 0)
- continue;
- } else {
- if (strncmp(dev_tmp->name->filename, real_filepath, strlen(dev_tmp->name->filename)) != 0)
- continue;
+ /* check the paths match if it is not a block device */
+ if (! S_ISBLK(dev_tmp->name->st.st_mode)) {
+ if (readlink(filepath, real_filepath, PATH_MAX-1) < 0) {
+ if (strncmp(dev_tmp->name->filename, filepath, strlen(dev_tmp->name->filename)) != 0)
+ continue;
+ } else {
+ if (strncmp(dev_tmp->name->filename, real_filepath, strlen(dev_tmp->name->filename)) != 0)
+ continue;
+ }
}
if (access == ACCESS_FILE
&& (lstat(filepath, &lst) == 0)