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

NAME

4     acl_get_fd — get an ACL by file descriptor
5

LIBRARY

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

SYNOPSIS

10     #include <sys/types.h>
11     #include <sys/acl.h>
12
13     acl_t
14     acl_get_fd(int fd);
15

DESCRIPTION

17     The acl_get_fd() function retrieves the access ACL associated with the
18     file referred to by fd.  The ACL is placed into working storage and
19     acl_get_fd() returns a pointer to that storage.
20
21     In order to read an ACL from an object, a process must have read access
22     to the object's attributes.
23
24     This function may cause memory to be allocated.  The caller should free
25     any releasable memory, when the new ACL is no longer required, by calling
26     acl_free(3) with the (void*)acl_t returned by acl_get_fd() as an argu‐
27     ment.
28

RETURN VALUE

30     On success, this function shall return a pointer to the working storage.
31     On error, a value of (acl_t)NULL shall be returned, and errno is set
32     appropriately.
33

ERRORS

35     If any of the following conditions occur, the acl_get_fd() function
36     returns a value of (acl_t)NULL and sets errno to the corresponding value:
37
38     [EBADF]            The fd argument is not a valid file descriptor.
39
40     [ENOMEM]           The ACL working storage requires more memory than is
41                        allowed by the hardware or system-imposed memory man‐
42                        agement constraints.
43
44     [ENOTSUP]          The file system on which the file identified by fd is
45                        located does not support ACLs, or ACLs are disabled.
46

STANDARDS

48     IEEE Std 1003.1e draft 17 (“POSIX.1e”, abandoned)
49

SEE ALSO

51     acl_free(3), acl_get_entry(3), acl_get_file(3), acl_set_fd(3), acl(5)
52

AUTHOR

54     Derived from the FreeBSD manual pages written by Robert N M Watson
55     <rwatson@FreeBSD.org>, and adapted for Linux by Andreas Gruenbacher
56     <a.gruenbacher@bestbits.at>.
57
58Linux ACL                       March 23, 2002                       Linux ACL
Impressum