PERFORCE change 143927 for review

Edward Tomasz Napierala trasz at FreeBSD.org
Sun Jun 22 18:10:34 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=143927

Change 143927 by trasz at trasz_traszkan on 2008/06/22 18:10:08

	Little diff reduction, there should be no functional changes:
	make acl_set_fd(3) a wrapper around acl_set_fd_np(3), do the same
	with acl_get_fd(3) and acl_get_fd_np(3).

Affected files ...

.. //depot/projects/soc2008/trasz_nfs4acl/bin/setfacl/setfacl.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_get.c#2 edit
.. //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_set.c#2 edit

Differences ...

==== //depot/projects/soc2008/trasz_nfs4acl/bin/setfacl/setfacl.c#2 (text+ko) ====


==== //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_get.c#2 (text+ko) ====

@@ -91,20 +91,7 @@
 acl_t
 acl_get_fd(int fd)
 {
-	acl_t	aclp;
-	int	error;
-
-	aclp = acl_init(ACL_MAX_ENTRIES);
-	if (aclp == NULL)
-		return (NULL);
-
-	error = ___acl_get_fd(fd, ACL_TYPE_ACCESS, &aclp->ats_acl);
-	if (error) {
-		acl_free(aclp);
-		return (NULL);
-	}
-
-	return (aclp);
+	return (acl_get_fd_np(fd, ACL_TYPE_ACCESS));
 }
 
 acl_t

==== //depot/projects/soc2008/trasz_nfs4acl/lib/libc/posix1e/acl_set.c#2 (text+ko) ====

@@ -96,17 +96,7 @@
 int
 acl_set_fd(int fd, acl_t acl)
 {
-	int	error;
-
-	error = _posix1e_acl_sort(acl);
-	if (error) {
-		errno = error;
-		return(-1);
-	}
-
-	acl->ats_cur_entry = 0;
-
-	return (___acl_set_fd(fd, ACL_TYPE_ACCESS, &acl->ats_acl));
+	return (acl_set_fd_np(fd, acl, ACL_TYPE_ACCESS));
 }
 
 int


More information about the p4-projects mailing list