fuser: fix inverted access() check. Closes 3799.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
8dc6195c97
commit
217a7f4bf9
@ -299,7 +299,7 @@ int fuser_main(int argc UNUSED_PARAM, char **argv)
|
|||||||
|
|
||||||
strcpy(path, "/proc/net/");
|
strcpy(path, "/proc/net/");
|
||||||
if (sscanf(*pp, "%u/%4s", &port, path + sizeof("/proc/net/")-1) == 2
|
if (sscanf(*pp, "%u/%4s", &port, path + sizeof("/proc/net/")-1) == 2
|
||||||
&& access(path, R_OK) != 0
|
&& access(path, R_OK) == 0
|
||||||
) {
|
) {
|
||||||
/* PORT/PROTO */
|
/* PORT/PROTO */
|
||||||
scan_proc_net_or_maps(path, port);
|
scan_proc_net_or_maps(path, port);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user