Preserve suid/sgid bits
This commit is contained in:
parent
b65422cf65
commit
55bf79f944
@ -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)
|
static int fileAction(const char *fileName, struct stat *statbuf, void* junk)
|
||||||
{
|
{
|
||||||
if (chown_func(fileName, uid, (gid == -1) ? statbuf->st_gid : gid) == 0) {
|
if (chown_func(fileName, uid, (gid == -1) ? statbuf->st_gid : gid) == 0) {
|
||||||
|
chmod(fileName, statbuf->st_mode);
|
||||||
return (TRUE);
|
return (TRUE);
|
||||||
}
|
}
|
||||||
bb_perror_msg("%s", fileName); /* Avoid multibyte problems. */
|
bb_perror_msg("%s", fileName); /* Avoid multibyte problems. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user