| GETPFLAGS(2) | System Calls | GETPFLAGS(2) |
getpflags,
setpflags — get or set
process flags
#include
<sys/types.h>
#include <priv.h>
uint_t
getpflags(uint_t flag);
int
setpflags(uint_t flag,
uint_t value);
getpflags()
and
setpflags()
obtain and modify the current per-process flags.
The following values for flag are supported:
PRIV_AWAREPRIV_AWARE_RESETPRIV_AWARE
and PRIV_AWARE_RESET are unset.
This flag gets automatically reset when a process becomes
privilege aware, either through calling
setppriv(2) or by setting
PRIV_AWARE to 1.
PRIV_PFEXECPRIV_DEBUGNET_MAC_AWARE,
NET_MAC_AWARE_INHERITNET_MAC_AWARE flag is set then the
current process is allowed to communicate with peers at labels that are
different than its own, subject to MAC policy.
The NET_MAC_AWARE_INHERIT flag
controls the propagation of the NET_MAC_AWARE
flag. When a process performs one of the
exec(2) functions, the
NET_MAC_AWARE flag is unset unless the
NET_MAC_AWARE_INHERIT is set.
NET_MAC_AWARE_INHERIT is always unset on one of
the exec(2) functions. The
PRIV_NET_MAC_AWARE privilege is required to set
either of these flags.
getpflags() returns the value associated
with a given per-process flag. If the flag argument is
invalid, (uint_t)−1 is returned and errno is
set to indicate the error.
Upon successful completion, setpflags()
returns 0. Otherwise, -1 is returned and errno is set
to indicate the error.
getpflags() and
setpflags() will fail if:
EINVALsetpflags() will fail if:
ppriv(1), exec(2), setppriv(2), setreuid(2), setuid(2), attributes(7), privileges(7)
| August 8, 2026 | OmniOS |