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:
John Beppu 2000-01-23 13:38:32 +00:00
parent 06936df164
commit a4a8fd05f4

View 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);
}