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:
b65422c
)
Preserve suid/sgid bits
author
Glenn L McGrath
<bug1@ihug.co.nz>
Mon, 8 Sep 2003 14:34:23 +0000
(14:34 -0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Mon, 8 Sep 2003 14:34:23 +0000
(14:34 -0000)
coreutils/chown.c
patch
|
blob
|
history
diff --git
a/coreutils/chown.c
b/coreutils/chown.c
index 7b9ea91753f4c2a726d83b55bc3ae2a3715bf9d3..02b752474ae332ae27961bfc93b767f5a6c63ed0 100644
(file)
--- a/
coreutils/chown.c
+++ b/
coreutils/chown.c
@@
-43,6
+43,7
@@
static int (*chown_func)(const char *, uid_t, gid_t) = chown;
static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
{
if (chown_func(fileName, uid, (gid == -1) ? statbuf->st_gid : gid) == 0) {
+ chmod(fileName, statbuf->st_mode);
return (TRUE);
}
bb_perror_msg("%s", fileName); /* Avoid multibyte problems. */