mirror of
https://git.busybox.net/busybox.git
synced 2024-12-04 11:03:26 +08:00
Went ahead and fixed bug #301 (chown not working on symlinks)
in fileAction(), I changed the chown() to lchown(); Hopefully, that doesn't break anything. (I don't think it does). nested ?:?:?: madness in chmod_chown_chgrp.c
This commit is contained in:
parent
06936df164
commit
a4a8fd05f4
@ -55,7 +55,7 @@ static int fileAction(const char *fileName, struct stat* statbuf)
|
||||
switch (whichApp) {
|
||||
case CHGRP_APP:
|
||||
case CHOWN_APP:
|
||||
if (chown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid,
|
||||
if (lchown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid,
|
||||
(gid==-1)? statbuf->st_gid : gid) == 0) {
|
||||
return( TRUE);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user