Date: Wed, 6 Aug 2008 08:27:12 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 146757 for review Message-ID: <200808060827.m768RCKl084437@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=146757 Change 146757 by trasz@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200808060827.m768RCKl084437>