Date: Sat, 23 May 2009 12:17:32 GMT From: Edward Tomasz Napierala <trasz@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 162572 for review Message-ID: <200905231217.n4NCHWDm024533@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=162572 Change 162572 by trasz@trasz_victim on 2009/05/23 12:16:56 Remove spurious differences and tweak style. Affected files ... .. //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_compat.c#4 edit .. //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_delete.c#4 edit .. //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_get.c#10 edit .. //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_set.c#7 edit .. //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_valid.c#5 edit .. //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_acl.c#17 edit .. //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_acl.c#18 edit Differences ... ==== //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_compat.c#4 (text+ko) ==== @@ -22,9 +22,11 @@ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * */ +#include <sys/cdefs.h> +__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_compat.c 192586 2009-05-22 15:56:43Z trasz $"); + #include <sys/acl.h> /* @@ -34,22 +36,24 @@ int __oldacl_get_perm_np(acl_permset_t permset_d, oldacl_perm_t perm) { + return (acl_get_perm_np(permset_d, perm)); } int __oldacl_add_perm(acl_permset_t permset_d, oldacl_perm_t perm) { + return (acl_add_perm(permset_d, perm)); } int __oldacl_delete_perm(acl_permset_t permset_d, oldacl_perm_t perm) { + return (acl_delete_perm(permset_d, perm)); } __sym_compat(acl_get_perm_np, __oldacl_get_perm_np, FBSD_1.0); __sym_compat(acl_add_perm, __oldacl_add_perm, FBSD_1.0); __sym_compat(acl_delete_perm, __oldacl_delete_perm, FBSD_1.0); - ==== //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_delete.c#4 (text+ko) ==== @@ -59,7 +59,6 @@ { type = _acl_type_unold(type); - return (__acl_delete_file(path_p, type)); } @@ -68,7 +67,6 @@ { type = _acl_type_unold(type); - return (__acl_delete_link(path_p, type)); } @@ -77,6 +75,5 @@ { type = _acl_type_unold(type); - return (___acl_delete_fd(filedes, type)); } ==== //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_get.c#10 (text+ko) ==== @@ -64,7 +64,6 @@ return (NULL); type = _acl_type_unold(type); - error = __acl_get_file(path_p, type, &aclp->ats_acl); if (error) { acl_free(aclp); @@ -88,7 +87,6 @@ return (NULL); type = _acl_type_unold(type); - error = __acl_get_link(path_p, type, &aclp->ats_acl); if (error) { acl_free(aclp); @@ -121,7 +119,6 @@ return (NULL); type = _acl_type_unold(type); - error = ___acl_get_fd(fd, type, &aclp->ats_acl); if (error) { acl_free(aclp); ==== //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_set.c#7 (text+ko) ==== @@ -59,13 +59,11 @@ errno = EINVAL; return (-1); } - type = _acl_type_unold(type); if (_acl_type_not_valid_for_acl(acl, type)) { errno = EINVAL; return (-1); } - if (_posix1e_acl(acl, type)) { error = _posix1e_acl_sort(acl); if (error) { @@ -88,13 +86,11 @@ errno = EINVAL; return (-1); } - type = _acl_type_unold(type); if (_acl_type_not_valid_for_acl(acl, type)) { errno = EINVAL; return (-1); } - if (_posix1e_acl(acl, type)) { error = _posix1e_acl_sort(acl); if (error) { @@ -126,13 +122,11 @@ errno = EINVAL; return (-1); } - type = _acl_type_unold(type); if (_acl_type_not_valid_for_acl(acl, type)) { errno = EINVAL; return (-1); } - if (_posix1e_acl(acl, type)) { error = _posix1e_acl_sort(acl); if (error) { ==== //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_valid.c#5 (text+ko) ==== @@ -62,12 +62,10 @@ errno = EINVAL; return (-1); } - if (!_acl_brand_may_be(acl, ACL_BRAND_POSIX)) { errno = EINVAL; return (-1); } - _posix1e_acl_sort(acl); error = _posix1e_acl_check(acl); if (error) { @@ -87,7 +85,6 @@ errno = EINVAL; return (-1); } - type = _acl_type_unold(type); if (_posix1e_acl(acl, type)) { error = _posix1e_acl_sort(acl); @@ -109,7 +106,6 @@ errno = EINVAL; return (-1); } - type = _acl_type_unold(type); if (_posix1e_acl(acl, type)) { error = _posix1e_acl_sort(acl); @@ -131,7 +127,6 @@ errno = EINVAL; return (-1); } - type = _acl_type_unold(type); if (_posix1e_acl(acl, type)) { error = _posix1e_acl_sort(acl); ==== //depot/projects/soc2008/trasz_nfs4acl/sys/kern/vfs_acl.c#17 (text+ko) ==== @@ -215,7 +215,7 @@ inkernelacl = acl_alloc(M_WAITOK); error = acl_copyin(aclp, inkernelacl, type); - if (error) + if (error != 0) goto out; /* @@ -247,7 +247,7 @@ vn_finished_write(mp); out: acl_free(inkernelacl); - return(error); + return (error); } /* @@ -321,7 +321,7 @@ inkernelacl = acl_alloc(M_WAITOK); error = acl_copyin(aclp, inkernelacl, type); - if (error) + if (error != 0) goto out; /* ==== //depot/projects/soc2008/trasz_nfs4acl/sys/ufs/ufs/ufs_acl.c#18 (text+ko) ==== @@ -313,6 +313,7 @@ } error = 0; + /* FALLTHROUGH */ case 0: error = acl_copy_oldacl_into_acl(old, ap->a_aclp); @@ -560,6 +561,7 @@ struct thread *td; } */ *ap; { + if (ap->a_type == ACL_TYPE_NFS4) return (ufs_setacl_nfs4(ap)); @@ -624,6 +626,7 @@ struct thread *td; } */ *ap; { + if (ap->a_type == ACL_TYPE_NFS4) return (ufs_aclcheck_nfs4(ap));
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905231217.n4NCHWDm024533>
