diff options
author | Denys Vlasenko | 2021-06-24 01:07:56 +0200 |
---|---|---|
committer | Denys Vlasenko | 2021-06-24 01:07:56 +0200 |
commit | 9468ea06d2445f774dd923fdfdea04209984fbf4 (patch) | |
tree | 160eb64f9af8ba0a4f1a6596bee17b2bd2da3890 /shell/hush_test/hush-parsing/eol1.tests | |
parent | 0e55af6c61a5420ffbeae990928b0fc546a7ef06 (diff) | |
download | busybox-9468ea06d2445f774dd923fdfdea04209984fbf4.zip busybox-9468ea06d2445f774dd923fdfdea04209984fbf4.tar.gz |
lsattr,chattr: do not open e.g. device files unless asked directly; do not follow links
Add O_NOFOLLOW (and O_NOCTTY for good measure) to open calls like e2fsprogs does.
In lsattr, when recursing, operate only on regular files, symlinks, and directories.
(Otherwise, "lsattr /dev" can e.g. open a watchdog device... not good).
At this time, looks like chattr/lsattr can't operate on symlink inodes -
ioctls do not work on open(O_PATH | O_NOFOLLOW) fds.
function old new delta
lsattr_dir_proc 168 203 +35
change_attributes 410 408 -2
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 1/1 up/down: 35/-2) Total: 33 bytes
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/hush_test/hush-parsing/eol1.tests')
0 files changed, 0 insertions, 0 deletions