diff options
author | lloyd <[email protected]> | 2009-07-25 12:23:14 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-07-25 12:23:14 +0000 |
commit | c9f92c0c07634c3a2aa73a8f3d3660ba39d76fde (patch) | |
tree | 68783b8fa53c3c89360f7fd430e19d9c71748680 /src/utils | |
parent | 26fa799af0d362a37a80e1c666e738d3674fc25e (diff) |
Two changes to proc_walk:
Don't read any file that is not world-readable. This avoids trouble when
running as root, since on Linux various special files can cause odd
interactions and/or blocking behavior when read (for instance /proc/kmsg).
ssumption is that no such files are world-readable. This also avoids any
issue of reading data that is potentially sensitive.
Instead of reading the first 1 KB of each file, only read the first 128
bytes. This prevents large files (like /proc/config.gz or /proc/kallsyms)
from swamping the input buffer; these inputs are pretty static and
shouldn't count for much. Reducing to 128 bytes causes a poll to read
about 400 different files, rather than ~30.
Diffstat (limited to 'src/utils')
0 files changed, 0 insertions, 0 deletions