diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2011-05-29 02:03:38 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2011-05-29 02:03:38 +0200 |
commit | 217a7f4bf95339a93a217c5806c5b9a48c0027d5 (patch) | |
tree | b970adfadffa7c2886934f5d5926ace4569a95ba | |
parent | 8dc6195c97e6bfc70a0158bce40c87d74d1a83d6 (diff) | |
download | busybox-w32-217a7f4bf95339a93a217c5806c5b9a48c0027d5.tar.gz busybox-w32-217a7f4bf95339a93a217c5806c5b9a48c0027d5.tar.bz2 busybox-w32-217a7f4bf95339a93a217c5806c5b9a48c0027d5.zip |
fuser: fix inverted access() check. Closes 3799.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | procps/fuser.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
299 | 299 | ||
300 | strcpy(path, "/proc/net/"); | 300 | strcpy(path, "/proc/net/"); |
301 | if (sscanf(*pp, "%u/%4s", &port, path + sizeof("/proc/net/")-1) == 2 | 301 | if (sscanf(*pp, "%u/%4s", &port, path + sizeof("/proc/net/")-1) == 2 |
302 | && access(path, R_OK) != 0 | 302 | && access(path, R_OK) == 0 |
303 | ) { | 303 | ) { |
304 | /* PORT/PROTO */ | 304 | /* PORT/PROTO */ |
305 | scan_proc_net_or_maps(path, port); | 305 | scan_proc_net_or_maps(path, port); |