Went ahead and fixed bug #301 (chown not working on symlinks)
authorJohn Beppu <beppu@lbox.org>
Sun, 23 Jan 2000 13:38:32 +0000 (13:38 -0000)
committerJohn Beppu <beppu@lbox.org>
Sun, 23 Jan 2000 13:38:32 +0000 (13:38 -0000)
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

chmod_chown_chgrp.c

index c9ea39b..75db904 100644 (file)
@@ -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);
            }