aboutsummaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
authorbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-08 14:34:23 +0000
committerbug1 <bug1@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-08 14:34:23 +0000
commitb08fbd3a368b023796613eaa42e4e62d267e869b (patch)
tree542040a104de16b46e4111731af12838bca1ac3a /coreutils
parent5e1de01ceaf87fde95e7c3486ab462c2e7f32b06 (diff)
downloadbusybox-w32-b08fbd3a368b023796613eaa42e4e62d267e869b.tar.gz
busybox-w32-b08fbd3a368b023796613eaa42e4e62d267e869b.tar.bz2
busybox-w32-b08fbd3a368b023796613eaa42e4e62d267e869b.zip
Preserve suid/sgid bits
git-svn-id: svn://busybox.net/trunk/busybox@7425 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/chown.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/coreutils/chown.c b/coreutils/chown.c
index 7b9ea9175..02b752474 100644
--- a/coreutils/chown.c
+++ b/coreutils/chown.c
@@ -43,6 +43,7 @@ static int (*chown_func)(const char *, uid_t, gid_t) = chown;
43static int fileAction(const char *fileName, struct stat *statbuf, void* junk) 43static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
44{ 44{
45 if (chown_func(fileName, uid, (gid == -1) ? statbuf->st_gid : gid) == 0) { 45 if (chown_func(fileName, uid, (gid == -1) ? statbuf->st_gid : gid) == 0) {
46 chmod(fileName, statbuf->st_mode);
46 return (TRUE); 47 return (TRUE);
47 } 48 }
48 bb_perror_msg("%s", fileName); /* Avoid multibyte problems. */ 49 bb_perror_msg("%s", fileName); /* Avoid multibyte problems. */