EINVAL when reading files in /proc/sys
H. Peter Anvin
hpa en www.transmeta.com
Vie Ene 21 15:49:13 CST 2000
It is my belief that files in /proc/sys that cannot be read should not
be +r. For example:
zeus 61 % uname -a
Linux zeus 2.2.13 #1 SMP Mon Oct 25 17:00:44 PDT 1999 i686 unknown
zeus 62 % ls -l /proc/sys/net/ipv4/route/flush
-rw-r--r-- 1 root root 0 Jan 20 16:42
/proc/sys/net/ipv4/route/flush
zeus 63 % cat /proc/sys/net/ipv4/route/flush
cat: /proc/sys/net/ipv4/route/flush: Invalid argument
zeus 64 %
In effect this file is mis-advertising itself as readable.
This is really the only thing that severely breaks walking /proc/sys
with a simple shell script.
-hpa
--
<hpa en transmeta.com> at work, <hpa en zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo en vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/
Más información sobre la lista de distribución Ayuda