projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d86b4c3
)
add a comment about sed and suid bits
author
Denys Vlasenko
<vda.linux@googlemail.com>
Fri, 18 Jun 2010 00:12:56 +0000
(
02:12
+0200)
committer
Denys Vlasenko
<vda.linux@googlemail.com>
Fri, 18 Jun 2010 00:12:56 +0000
(
02:12
+0200)
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
editors/sed.c
patch
|
blob
|
history
diff --git
a/editors/sed.c
b/editors/sed.c
index a5ef400fcebddebcd026a2a113e7c9e01bd9b244..28f0c7318ce9fc8d9b784b16e6c7e601b459530b 100644
(file)
--- a/
editors/sed.c
+++ b/
editors/sed.c
@@
-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);