mirror of
https://github.com/topjohnwu/ndk-busybox.git
synced 2024-11-30 23:21:02 +00:00
add a comment about sed and suid bits
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
d86b4c3907
commit
3b727ccb70
@ -1365,6 +1365,8 @@ int sed_main(int argc UNUSED_PARAM, char **argv)
|
||||
|
||||
/* Set permissions/owner of output file */
|
||||
fstat(fileno(file), &statbuf);
|
||||
/* chmod'ing AFTER chown would preserve suid/sgid bits,
|
||||
* but GNU sed 4.2.1 does not preserve them either */
|
||||
fchmod(nonstdoutfd, statbuf.st_mode);
|
||||
fchown(nonstdoutfd, statbuf.st_uid, statbuf.st_gid);
|
||||
add_input_file(file);
|
||||
|
Loading…
Reference in New Issue
Block a user