unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-5.10)
Page:
Section:
Apropos / Subsearch:
optional field

getpflags(2)                     System Calls                     getpflags(2)



NAME
       getpflags, setpflags - get or set process flags

SYNOPSIS
       #include <&lt;sys/types.h>&gt;
       #include <&lt;priv.h>&gt;

       uint_t getpflags(uint_t flag);

       int setpflags(uint_t flag, uint_t value);

DESCRIPTION
       The getpflags() and setpflags() functions modify and obtain the current
       per-process flags.

       The following values for flag are supported:

       PRIV_AWARE      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 cannott be met. Setting this  flag
                       is  always  successful. See privileges(5) for a discus-
                       sion of this flag.



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



RETURN VALUES
       The  getpflags()  function  returns  the per-process flags. If the flag
       argument is invalid, (uint_t)-1 is returned and errno is set  to  indi-
       cate the error.

       Upon  successful  completion,  setpflags()  returns 0. Otherwise, -1 is
       returned and errno is set to indicate the error.

ERRORS
       The getflags() and setpflags() functions will fail if:

       EINVAL          The value of flag or the value to which the flag is set
                       is out of range.



       The setpflags() function will fail if:

       EPERM           An  attempt  was  made  to  unset  PRIV_AWARE  but  the
                       observed set invariance condition was not met.



ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:


       tab()    allbox;    cw(2.750000i)|     cw(2.750000i)     lw(2.750000i)|
       lw(2.750000i).  ATTRIBUTE TYPEATTRIBUTE VALUE Interface StabilityEvolv-
       ing MT-LevelAsync-Signal-Safe


SEE ALSO
       ppriv(1), attributes(5), privileges(5)



SunOS 5.10                        17 Jan 2003                     getpflags(2)