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_set.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_set.c')
-rw-r--r-- | lib/libc/posix1e/acl_set.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/libc/posix1e/acl_set.c b/lib/libc/posix1e/acl_set.c index 1873422..070e2b1 100644 --- a/lib/libc/posix1e/acl_set.c +++ b/lib/libc/posix1e/acl_set.c @@ -46,7 +46,7 @@ acl_set_file(const char *path_p, acl_type_t type, acl_t acl) { int error; - if (acl_posix1e(acl)) { + if (acl_posix1e(acl, type)) { error = acl_sort(acl); if (error) { errno = error; @@ -57,13 +57,26 @@ acl_set_file(const char *path_p, acl_type_t type, acl_t acl) return (__acl_set_file(path_p, type, acl)); } +int +acl_set_fd(int fd, acl_t acl) +{ + int error; + + error = acl_sort(acl); + if (error) { + errno = error; + return(-1); + } + + return (__acl_set_fd(fd, ACL_TYPE_ACCESS, acl)); +} int -acl_set_fd(int fd, acl_t acl, acl_type_t type) +acl_set_fd_np(int fd, acl_t acl, acl_type_t type) { int error; - if (acl_posix1e(acl)) { + if (acl_posix1e(acl, type)) { error = acl_sort(acl); if (error) { errno = error; |