From 26f635f51fa012eb580d6a06f40c81be3eeb2e57 Mon Sep 17 00:00:00 2001 From: trasz Date: Thu, 25 Jun 2009 20:57:53 +0000 Subject: Fix acl_set_fd(3) and acl_get_fd(3) for cases where the kernel doesn't know anything about _PC_ACL_NFS4. --- lib/libc/posix1e/acl_get.c | 3 ++- lib/libc/posix1e/acl_set.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/libc/posix1e') diff --git a/lib/libc/posix1e/acl_get.c b/lib/libc/posix1e/acl_get.c index e8807c4..8a77ab1 100644 --- a/lib/libc/posix1e/acl_get.c +++ b/lib/libc/posix1e/acl_get.c @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include +#include #include #include #include @@ -102,7 +103,7 @@ acl_get_link_np(const char *path_p, acl_type_t type) acl_t acl_get_fd(int fd) { - if (fpathconf(fd, _PC_ACL_NFS4)) + if (fpathconf(fd, _PC_ACL_NFS4) == 1) return (acl_get_fd_np(fd, ACL_TYPE_NFS4)); return (acl_get_fd_np(fd, ACL_TYPE_ACCESS)); diff --git a/lib/libc/posix1e/acl_set.c b/lib/libc/posix1e/acl_set.c index 7086c4b..f9ee76d 100644 --- a/lib/libc/posix1e/acl_set.c +++ b/lib/libc/posix1e/acl_set.c @@ -108,7 +108,7 @@ int acl_set_fd(int fd, acl_t acl) { - if (fpathconf(fd, _PC_ACL_NFS4)) + if (fpathconf(fd, _PC_ACL_NFS4) == 1) return (acl_set_fd_np(fd, acl, ACL_TYPE_NFS4)); return (acl_set_fd_np(fd, acl, ACL_TYPE_ACCESS)); -- cgit v1.1