From owner-svn-src-all@FreeBSD.ORG Thu Jun 25 20:57:54 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D827106564A; Thu, 25 Jun 2009 20:57:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF8AD8FC0A; Thu, 25 Jun 2009 20:57:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n5PKvrfM064158; Thu, 25 Jun 2009 20:57:53 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n5PKvrCQ064155; Thu, 25 Jun 2009 20:57:53 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <200906252057.n5PKvrCQ064155@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 25 Jun 2009 20:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r195004 - head/lib/libc/posix1e X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Jun 2009 20:57:54 -0000 Author: trasz Date: Thu Jun 25 20:57:53 2009 New Revision: 195004 URL: http://svn.freebsd.org/changeset/base/195004 Log: Fix acl_set_fd(3) and acl_get_fd(3) for cases where the kernel doesn't know anything about _PC_ACL_NFS4. Modified: head/lib/libc/posix1e/acl_get.c head/lib/libc/posix1e/acl_set.c Modified: head/lib/libc/posix1e/acl_get.c ============================================================================== --- head/lib/libc/posix1e/acl_get.c Thu Jun 25 20:40:13 2009 (r195003) +++ head/lib/libc/posix1e/acl_get.c Thu Jun 25 20:57:53 2009 (r195004) @@ -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_ 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)); Modified: head/lib/libc/posix1e/acl_set.c ============================================================================== --- head/lib/libc/posix1e/acl_set.c Thu Jun 25 20:40:13 2009 (r195003) +++ head/lib/libc/posix1e/acl_set.c Thu Jun 25 20:57:53 2009 (r195004) @@ -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));