From 217a7f4bf95339a93a217c5806c5b9a48c0027d5 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 29 May 2011 02:03:38 +0200 Subject: [PATCH] fuser: fix inverted access() check. Closes 3799. Signed-off-by: Denys Vlasenko --- procps/fuser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/procps/fuser.c b/procps/fuser.c index 2a7c3106e..8d63a7313 100644 --- a/procps/fuser.c +++ b/procps/fuser.c @@ -299,7 +299,7 @@ int fuser_main(int argc UNUSED_PARAM, char **argv) strcpy(path, "/proc/net/"); if (sscanf(*pp, "%u/%4s", &port, path + sizeof("/proc/net/")-1) == 2 - && access(path, R_OK) != 0 + && access(path, R_OK) == 0 ) { /* PORT/PROTO */ scan_proc_net_or_maps(path, port); -- 2.25.1