1ACL_EXTENDED_FILE(3)     BSD Library Functions Manual     ACL_EXTENDED_FILE(3)
2

NAME

4     acl_extended_file — test for information in ACLs by file name
5

LIBRARY

7     Linux Access Control Lists library (libacl, -lacl).
8

SYNOPSIS

10     #include <sys/types.h>
11     #include <acl/libacl.h>
12
13     int
14     acl_extended_file(const char *path_p);
15

DESCRIPTION

17     The acl_extended_file() function returns 1 if the file or directory
18     referred to by the argument path_p is associated with an extended access
19     ACL, or if the directory referred to by path_p is associated with a
20     default ACL. The function returns 0 if the file has neither an extended
21     access ACL nor a default ACL.
22
23     An extended ACL is an ACL that contains entries other than the three
24     required entries of tag types ACL_USER_OBJ, ACL_GROUP_OBJ and ACL_OTHER.
25     If the result of the acl_extended_file() function for a file object is 0,
26     then ACLs define no discretionary access rights other than those already
27     defined by the traditional file permission bits.
28
29     Access to the file object may be further restricted by other mechanisms,
30     such as Mandatory Access Control schemes. The access(2) system call can
31     be used to check whether a given type of access to a file object would be
32     granted.
33

RETURN VALUE

35     If successful, the acl_extended_file() function returns 1 if the file
36     object referred to by path_p has an extended access ACL or a default ACL,
37     and 0 if the file object referred to by path_p has neither an extended
38     access ACL nor a default ACL. Otherwise, the value -1 is returned and the
39     global variable errno is set to indicate the error.
40

ERRORS

42     If any of the following conditions occur, the acl_extended_file() func‐
43     tion returns -1 and sets errno to the corresponding value:
44
45     [EACCES]           Search permission is denied for a component of the
46                        path prefix.
47
48     [ENAMETOOLONG]     The length of the argument path_p is too long.
49
50     [ENOENT]           The named object does not exist or the argument path_p
51                        points to an empty string.
52
53     [ENOTDIR]          A component of the path prefix is not a directory.
54
55     [ENOTSUP]          The file system on which the file identified by path_p
56                        is located does not support ACLs, or ACLs are dis‐
57                        abled.
58

STANDARDS

60     This is a non-portable, Linux specific extension to the ACL manipulation
61     functions defined in IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned).
62

SEE ALSO

64     access(2), acl_get_file(3), acl(5)
65

AUTHOR

67     Written by Andreas Gruenbacher <a.gruenbacher@bestbits.at>.
68
69Linux ACL                       March 23, 2002                       Linux ACL
Impressum