1 .\" Access Control Lists manual pages
3 .\" (C) 2002 Andreas Gruenbacher, <a.gruenbacher@bestbits.at>
5 .\" This is free documentation; you can redistribute it and/or
6 .\" modify it under the terms of the GNU General Public License as
7 .\" published by the Free Software Foundation; either version 2 of
8 .\" the License, or (at your option) any later version.
10 .\" The GNU General Public License's references to "object code"
11 .\" and "executables" are to be interpreted as the output of any
12 .\" document formatting or typesetting system, including
13 .\" intermediate and printed output.
15 .\" This manual is distributed in the hope that it will be useful,
16 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
17 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 .\" GNU General Public License for more details.
20 .\" You should have received a copy of the GNU General Public
21 .\" License along with this manual. If not, see
22 .\" <http://www.gnu.org/licenses/>.
29 .Nd get an ACL by filename
31 Linux Access Control Lists library (libacl, \-lacl).
36 .Fn acl_get_file "const char *path_p" "acl_type_t type"
40 function retrieves the access ACL associated with a file or directory, or the default ACL associated with a directory. The pathname for the file or directory is pointed to by the argument
42 The ACL is placed into working storage and
44 returns a pointer to that storage.
46 In order to read an ACL from an object, a process must have read access to
47 the object's attributes.
49 The value of the argument
51 is used to indicate whether the access ACL or the default ACL associated with
55 is ACL_TYPE_ACCESS, the access ACL of
59 is ACL_TYPE_DEFAULT, the default ACL of
63 is ACL_TYPE_DEFAULT and no default ACL is associated with the directory
65 then an ACL containing zero ACL entries is returned. If
67 specifies a type of ACL that cannot be associated with
69 then the function fails.
71 This function may cause memory to be allocated. The caller should free any
72 releasable memory, when the new ACL is no longer required, by calling
80 On success, this function returns a pointer to the
81 working storage. On error, a value of
87 If any of the following conditions occur, the
89 function returns a value of
93 to the corresponding value:
96 Search permission is denied for a component of the path prefix or the
97 object exists and the process does not have appropriate access rights.
101 specifies a type of ACL that cannot be associated with
106 is not ACL_TYPE_ACCESS or ACL_TYPE_DEFAULT.
107 .It Bq Er ENAMETOOLONG
108 The length of the argument
112 The named object does not exist or the argument
114 points to an empty string.
116 The ACL working storage requires more memory than is allowed by the hardware or system-imposed memory management constraints.
118 A component of the path prefix is not a directory.
120 The file system on which the file identified by
122 is located does not support ACLs, or ACLs are disabled.
125 IEEE Std 1003.1e draft 17 (\(lqPOSIX.1e\(rq, abandoned)
128 .Xr acl_get_entry 3 ,
133 Derived from the FreeBSD manual pages written by
134 .An "Robert N M Watson" Aq rwatson@FreeBSD.org ,
135 and adapted for Linux by
136 .An "Andreas Gruenbacher" Aq a.gruenbacher@bestbits.at .