strperm3
Evaluate file permission expression
Usage
$1$2int strperm(char* s, char** e, int p)int strperm(char* s, char** e, int p)int strperm(char* s, char** e, int p)int strperm(char* s, char** e, int p)int strperm(char* s, char** e, int p)int strperm(char* s, char** e, int p)int strperm(char* s, char** e, int p)int strperm(char* s, char** e, int p)
Overview
strperm applies a file permission expression in the nul-terminated string s to the initial file permission mask p. The new permission mask is returned. If e not 0 then *e is set to point to the first unrecognized character in s.
A tape device specification is composed of one or more who-op-permission terms separated by ,. who selects portions of the permission bits and may be any combination of:
|
the user permission bits; |
|---|---|
|
the group permission bits; |
|
the `other' permission bits; |
|
all permission bits. |
If omitted, all permission bits are selected. op specifies how the original permission p is to be modified:
+
|
| the new bits are set in p; |
|---|---|
|
the new bits are cleared in p; |
&
|
the new bits are and'd with p; |
=
|
the select bits in p are set equal to the new bits |
A permission expression term may also be an octal number. Octal specifications are inherently non-portable. Refer to chmod(1) for an explanation of this form.
Releases
Unchanged in 135 releases since Mac OS X 10.4.