1acl_strip(3SEC) File Access Control Library Functions acl_strip(3SEC)
2
3
4
6 acl_strip - remove all ACLs from a file
7
9 cc [ flag... ] file... -lsec [ library... ]
10 #include <sys/acl.h>
11
12 int acl_strip(const char *path, uid_t uid, gid_t gid, mode_t mode);
13
14
16 The acl_strip() function removes all ACLs from a file and replaces them
17 with a trivial ACL based on the mode argument. After replacing the ACL,
18 the owner and group of the file are set to the values specified by the
19 uid and gid arguments.
20
22 Upon successful completion, acl_strip() returns 0. Otherwise it returns
23 -1 and sets errno to indicate the error.
24
26 The acl_strip() function will fail if:
27
28 EACCES Search permission is denied on a component of the path
29 prefix of path.
30
31
32 EFAULT The path argument points to an illegal address.
33
34
35 EINVAL The uid or gid argument is out of range.
36
37
38 EIO A disk I/O error has occurred while storing or retriev‐
39 ing the ACL.
40
41
42 ELOOP A loop exists in symbolic links encountered during the
43 resolution of the path argument.
44
45
46 ENAMETOOLONG The length of the path argument exceeds {PATH_MAX},
47 or the length of a path component exceeds {NAME_MAX}
48 while _POSIX_NO_TRUNC is in effect.
49
50
51 ENOENT A component of path does not exist.
52
53
54 ENOTDIR A component of the prefix of path is not a directory.
55
56
57 EPERM The effective user ID does not match the owner of the
58 file and the process does not have appropriate privi‐
59 leges.
60
61
62 EROFS The file system is mounted read-only.
63
64
66 See attributes(5) for descriptions of the following attributes:
67
68
69
70
71 ┌─────────────────────────────┬─────────────────────────────┐
72 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
73 ├─────────────────────────────┼─────────────────────────────┤
74 │Interface Stability │Evolving │
75 ├─────────────────────────────┼─────────────────────────────┤
76 │MT-Level │MT-Safe │
77 └─────────────────────────────┴─────────────────────────────┘
78
80 acl_get(3SEC), acl_trivial(3SEC), acl(5), attributes(5)
81
82
83
84SunOS 5.11 6 Oct 2005 acl_strip(3SEC)