summaryrefslogtreecommitdiff
path: root/lib/libc/posix1e/acl_set.c
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2000-01-26 04:19:38 +0000
committerRobert Watson <rwatson@FreeBSD.org>2000-01-26 04:19:38 +0000
commit8f45e8c07611579a6a623ef2201082816c2f39ae (patch)
tree3c9c6a2c285edd25bc3bf350bab4af093e85f3aa /lib/libc/posix1e/acl_set.c
parent2fff585062e948ff849437905d9b51be9658b2b6 (diff)
Notes
Diffstat (limited to 'lib/libc/posix1e/acl_set.c')
-rw-r--r--lib/libc/posix1e/acl_set.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/libc/posix1e/acl_set.c b/lib/libc/posix1e/acl_set.c
index 18734220efd4..070e2b16e5c1 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;