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);
The getpflags() and setpflags() functions obtain and modify the current per-process flags.
The following values for flag are supported:
PRIV_AWARE
PRIV_DEBUG
NET_MAC_AWARE
NET_MAC_AWARE_INHERIT
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 functions. The PRIV_NET_MAC_AWARE privilege is required to set either of these flags.
The 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.
The getpflags() and setpflags() functions will fail if:
EINVAL
The setpflags() function will fail if:
EPERM
See attributes(5) for descriptions of the following attributes:
|
ppriv(1)attributes(5), privileges(5)
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |