| Skip Navigation Links | |
| Exit Print View | |
![]() | man pages section 2: System Calls Oracle Solaris 11 Information Library |
- get or set process flags
#include <sys/types.h>#include <priv.h>uint_tgetpflags(uint_tflag);
intsetpflags(uint_tflag,uint_tvalue);
Thegetpflags() andsetpflags() functions obtain and modify the current per-process flags.
The following values forflag are supported:
This one bit flag takes the value of 0 (unset) or 1 (set). Only if this flag is set is the current process privilege-aware. A process can attempt to unset this flag but might fail silently if the observed set invariance condition cannot be met. Setting this flag is always successful. Seeprivileges(5) for a discussion of this flag.
This one bit flag takes the value of 0 (unset) or 1 (set). This causes a process to pretend it is non- privilege aware. The effective and permitted privilege set change on the change of the effective uid. When all the uid sets become the same throughsetuid(uid) or throughsetreuid(uid,uid), the effective and permitted set are set to the intersection between the limit set and the inheritable set. At that point, bothPRIV_AWARE andPRIV_AWARE_RESET are unset.
This flag gets automatically reset when a file becomes privilege aware, either through callingsetppriv(2) or by settingPRIV_AWARE to 1.
This one bit flag takes the value of 0 (unset) or 1 (set). Only if this flag is set does the current process have privilege debugging enabled. Processes can set and unset this flag at will.
These flags are available only if the system is configured with Trusted Extensions. These one bit flags each take the value of 0 (unset) or 1 (set). If theNET_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.
TheNET_MAC_AWARE_INHERIT flag controls the propagation of theNET_MAC_AWARE flag. When a process performs one of theexec(2) functions, theNET_MAC_AWARE flag is unset unless theNET_MAC_AWARE_INHERIT is set.NET_MAC_AWARE_INHERIT is always unset on one of theexec functions. ThePRIV_NET_MAC_AWARE privilege is required to set either of these flags.
Thegetpflags() returns the value associated with a given per-process flag. Iftheflag argument is invalid, (uint_t)-1 is returned anderrno is setto indicate the error.
Upon successful completion,setpflags() returns 0. Otherwise, -1 is returned anderrnois set to indicate the error.
Thegetpflags() andsetpflags() functions will fail if:
The value offlag or the value to which theflag is set is out of range.
Thesetpflags() function will fail if:
An attempt was made to unsetPRIV_AWARE but the observed set invariance condition was not met.
Seeattributes(5) for descriptions of the following attributes:
|
Copyright © 2011, Oracle and/or its affiliates. All rights reserved.Legal Notices | ![]() ![]() |