acl_set.c (194955) | acl_set.c (195004) |
---|---|
1/*- 2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson 3 * All rights reserved. 4 * 5 * This software was developed by Robert Watson for the TrustedBSD Project. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28/* 29 * acl_set_file -- set a file/directory ACL by name 30 */ 31 32#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1999, 2000, 2001, 2002 Robert N. M. Watson 3 * All rights reserved. 4 * 5 * This software was developed by Robert Watson for the TrustedBSD Project. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 16 unchanged lines hidden (view full) --- 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 */ 28/* 29 * acl_set_file -- set a file/directory ACL by name 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_set.c 194955 2009-06-25 12:46:59Z trasz $"); | 33__FBSDID("$FreeBSD: head/lib/libc/posix1e/acl_set.c 195004 2009-06-25 20:57:53Z trasz $"); |
34 35#include <sys/types.h> 36#include "namespace.h" 37#include <sys/acl.h> 38#include "un-namespace.h" 39 40#include <errno.h> 41#include <stdlib.h> --- 61 unchanged lines hidden (view full) --- 103 104 return (__acl_set_link(path_p, type, &acl->ats_acl)); 105} 106 107int 108acl_set_fd(int fd, acl_t acl) 109{ 110 | 34 35#include <sys/types.h> 36#include "namespace.h" 37#include <sys/acl.h> 38#include "un-namespace.h" 39 40#include <errno.h> 41#include <stdlib.h> --- 61 unchanged lines hidden (view full) --- 103 104 return (__acl_set_link(path_p, type, &acl->ats_acl)); 105} 106 107int 108acl_set_fd(int fd, acl_t acl) 109{ 110 |
111 if (fpathconf(fd, _PC_ACL_NFS4)) | 111 if (fpathconf(fd, _PC_ACL_NFS4) == 1) |
112 return (acl_set_fd_np(fd, acl, ACL_TYPE_NFS4)); 113 114 return (acl_set_fd_np(fd, acl, ACL_TYPE_ACCESS)); 115} 116 117int 118acl_set_fd_np(int fd, acl_t acl, acl_type_t type) 119{ --- 152 unchanged lines hidden --- | 112 return (acl_set_fd_np(fd, acl, ACL_TYPE_NFS4)); 113 114 return (acl_set_fd_np(fd, acl, ACL_TYPE_ACCESS)); 115} 116 117int 118acl_set_fd_np(int fd, acl_t acl, acl_type_t type) 119{ --- 152 unchanged lines hidden --- |