PSECFLAGS(1) | User Commands | PSECFLAGS(1) |
psecflags - inspect or modify process security flags
/usr/bin/psecflags -s spec -e command [arg]...
/usr/bin/psecflags -s spec [-i idtype] id ...
/usr/bin/psecflags [-F] { pid | core }
/usr/bin/psecflags -l
The first invocation of the psecflags command runs the specified command with the security-flags modified as described by the -s argument.
The second invocation modifies the security-flags of the processes described by idtype and id according as described by the -s argument.
The third invocation describes the security-flags of the specified processes or core files. The effective set is signified by 'E', the inheritable set by 'I', the lower set by 'L', and the upper set by 'U'.
The fourth invocation lists the supported process security-flags, documented in security-flags(7).
The following options are supported:
-e
-F
-i idtype
Valid idtype options are:
all
contract, ctid
group, gid
pid
ppid
project, projid
session, sid
taskid
user, uid
zone, zoneid
-l
-s specification
By default, the inheritable flags are changed. You may optionally specify the set to change using their single-letter identifiers and an equals sign.
For a list of valid security-flags, see psecflags -l.
Example 1 Display the security-flags of the current shell.
example$ psecflags $$ 100718: -sh E: aslr I: aslr L: none U: aslr,forbidnullmap,noexecstack
Example 2 Run a user command with ASLR enabled in addition to any inherited security flags.
example$ psecflags -s current,aslr -e /bin/sh $ psecflags $$ 100724: -sh E: none I: aslr L: none U: aslr,forbidnullmap,noexecstack
Example 3 Remove aslr from the inheritable flags of all Bob's processes.
example# psecflags -s current,-aslr -i uid bob
Example 4 Add the aslr flag to the lower set, so that all future child processes must have this flag set.
example# psecflags -s L=current,aslr $$
The following exit values are returned:
See attributes(7) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Interface Stability | Volatile |
exec(2), attributes(7), contract(5), security-flags(7), zones(7)
June 6, 2016 | OmniOS |