diff options
author | rwatson <rwatson@FreeBSD.org> | 2000-01-26 04:19:38 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2000-01-26 04:19:38 +0000 |
commit | bca585a108d2bd5fc957868c934f851e28cc1fdc (patch) | |
tree | 9bf727d760779145abf4d333b026744f16082345 /lib/libc/posix1e/acl_init.c | |
parent | 994e477fcd5e774b309e83aa9a4b9dc634ce39e2 (diff) | |
download | FreeBSD-src-bca585a108d2bd5fc957868c934f851e28cc1fdc.zip FreeBSD-src-bca585a108d2bd5fc957868c934f851e28cc1fdc.tar.gz |
Minor fixes to library interface to improve POSIX.1e compliance. This
adds _np to a couple of function prototypes that provided more broad/useful
interfaces than POSIX.1e interfaces included.
Also, move from using a heuristic to identify POSIX.1e-semantic ACLs to
using different ACL types for non-POSIX.1e ACLs. This should clean up the
existing fuzzy logic that determined when acl_sort() should be applied
before kernel submission.
Diffstat (limited to 'lib/libc/posix1e/acl_init.c')
-rw-r--r-- | lib/libc/posix1e/acl_init.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/libc/posix1e/acl_init.c b/lib/libc/posix1e/acl_init.c index a082ea8..c2fa43b 100644 --- a/lib/libc/posix1e/acl_init.c +++ b/lib/libc/posix1e/acl_init.c @@ -27,6 +27,7 @@ */ /* * acl_init -- return a fresh acl structure + * acl_dup -- duplicate an acl and return the new copy */ #include <sys/types.h> @@ -51,3 +52,16 @@ acl_init(int count) return (acl); } +acl_t +acl_dup(acl_t acl) +{ + struct acl *acl_new; + + acl_new = acl_init(ACL_MAX_ENTRIES); + if (!acl_new) + return(NULL); + + *acl_new = *acl; + + return(acl_new); +} |