PERFORCE change 146757 for review
Edward Tomasz Napierala
trasz at FreeBSD.org
Wed Aug 6 08:27:13 UTC 2008
http://perforce.freebsd.org/chv.cgi?CH=146757
Change 146757 by trasz at trasz_traszkan on 2008/08/06 08:26:40
In mv(1), chmod(2) the new file before setting the ACL, not after.
With NFS4, chmod could modify the ACL.
Affected files ...
.. //depot/projects/soc2008/trasz_nfs4acl/bin/mv/mv.c#4 edit
Differences ...
==== //depot/projects/soc2008/trasz_nfs4acl/bin/mv/mv.c#4 (text+ko) ====
@@ -312,6 +312,9 @@
sbp->st_mode &= ~(S_ISUID | S_ISGID);
}
}
+ if (fchmod(to_fd, sbp->st_mode))
+ warn("%s: set mode (was: 0%03o)", to, oldmode);
+
/*
* POSIX 1003.2c states that if _POSIX_ACL_EXTENDED is in effect
* for dest_file, then its ACLs shall reflect the ACLs of the
@@ -320,8 +323,7 @@
preserve_fd_acls(from_fd, to_fd, from, to);
(void)close(from_fd);
- if (fchmod(to_fd, sbp->st_mode))
- warn("%s: set mode (was: 0%03o)", to, oldmode);
+
/*
* XXX
* NFS doesn't support chflags; ignore errors unless there's reason
More information about the p4-projects
mailing list