xref: /titanic_44/usr/src/lib/libast/common/man/strperm.3 (revision 0dc2366f7b9f9f36e10909b1e95edbf2a261c2ac)
.fp 5 CW .. .nr ;G \\n(.f .Af "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" "\\$8" "\\$9" \\*(;G .. .aF 5 \\n(.f "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" .. .aF 5 1 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" .. .aF 1 5 "\\$1" "\\$2" "\\$3" "\\$4" "\\$5" "\\$6" "\\$7" ..

0

..

..

STRPERM 3
NAME
strperm - evaluate file permission expression
SYNOPSIS
.L "int strperm(char* s, char** e, int p)"
DESCRIPTION
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:

3 u the user permission bits;

g the group permission bits;

o the `other' permission bits;

a all permission bits.

If omitted, all permission bits are selected. op specifies how the original permission p is to be modified:

3 +

.ns | the new bits are set in p ;

3 - 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.

"SEE ALSO"
chmod(1), ls(1), strmode(3)