Package: psmisc
Version: 22.21-1
Severity: important
Tags: patch
Expected output:
$ src/fuser /tmp/.foo.swp
/tmp/.foo.swp: 6073
$ src/fuser -v /tmp/.foo.swp
USER PID ACCESS COMMAND
/tmp/.foo.swp: me 6073 F.... vi
Actual output:
$ fuser /tmp/.foo.swp
/tmp/.foo.swp: 6073
$ fuser -v /tmp/.foo.swp
Specified filename /tmp/.foo.swp is not a mountpoint.
The cause seems to be a typo in fuser.c. See attached patch.
diff -ur a/src/fuser.c b/src/fuser.c
--- a/src/fuser.c 2014-01-31 08:07:32.000000000 -0500
+++ b/src/fuser.c 2014-02-27 12:34:44.352910007 -0500
@@ -1174,7 +1174,7 @@
usage(_("No process specification given"));
/* Check if -M flag was used and if so check mounts */
- if (opts * OPT_ISMOUNTPOINT) {
+ if (opts & OPT_ISMOUNTPOINT) {
check_mountpoints(&mounts, &names_head, &names_tail);
}