aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Beppu <beppu@lbox.org>2000-01-23 13:38:32 +0000
committerJohn Beppu <beppu@lbox.org>2000-01-23 13:38:32 +0000
commita4a8fd05f4512d9c7c195080d2ce9dd9a16c2908 (patch)
tree32f74dbdc8a3ae0d01674fd24a8136571932896d
parent06936df16411fff0fdc338cae28385d66cabcef8 (diff)
downloadbusybox-w32-a4a8fd05f4512d9c7c195080d2ce9dd9a16c2908.tar.gz
busybox-w32-a4a8fd05f4512d9c7c195080d2ce9dd9a16c2908.tar.bz2
busybox-w32-a4a8fd05f4512d9c7c195080d2ce9dd9a16c2908.zip
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
-rw-r--r--chmod_chown_chgrp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/chmod_chown_chgrp.c b/chmod_chown_chgrp.c
index c9ea39bf5..75db904e8 100644
--- a/chmod_chown_chgrp.c
+++ b/chmod_chown_chgrp.c
@@ -55,7 +55,7 @@ static int fileAction(const char *fileName, struct stat* statbuf)
55 switch (whichApp) { 55 switch (whichApp) {
56 case CHGRP_APP: 56 case CHGRP_APP:
57 case CHOWN_APP: 57 case CHOWN_APP:
58 if (chown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid, 58 if (lchown(fileName, (whichApp==CHOWN_APP)? uid : statbuf->st_uid,
59 (gid==-1)? statbuf->st_gid : gid) == 0) { 59 (gid==-1)? statbuf->st_gid : gid) == 0) {
60 return( TRUE); 60 return( TRUE);
61 } 61 }