MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


System Calls                                         getpflags(2)



NAME
     getpflags, setpflags - get or set process flags

SYNOPSIS
     #include 
     #include 

     uintt getpflags(uintt flag);


     int setpflags(uintt flag, uintt value);


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


     The following values for flag are supported:

     PRIVAWARE

         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 invari-
         ance condition cannot  be  met.  Setting  this  flag  is
         always successful. See privileges(5) for a discussion of
         this flag.


     PRIVDEBUG

         This one bit flag takes the value  of  0  (unset)  or  1
         (set).   Only  if this flag is set does the current pro-
         cess have privilege debugging enabled. Processes can set
         and unset this flag at will.


     NETMACAWARE
     NETMACAWAREINHERIT

         These flags are available only if the system is  config-
         ured  with  Trusted Extensions. These one bit flags each
         take  the  value  of  0  (unset)  or  1  (set).  If  the
         NETMACAWARE  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 NETMACAWAREINHERIT flag controls the  propagation
         of  the  NETMACAWARE flag. When a process performs one
         of the exec(2)  functions,  the  NETMACAWARE  flag  is



SunOS 5.11           Last change: 8 Mar 2006                    1






System Calls                                         getpflags(2)



         unset   unless   the   NETMACAWAREINHERIT   is   set.
         NETMACAWAREINHERIT is always unset on one of the exec
         functions.  The PRIVNETMACAWARE privilege is required
         to set either of these flags.


RETURN VALUES
     The getpflags() returns the value associated  with  a  given
     per-process   flag.   If   the  flag  argument  is  invalid,
     (uintt)-1 is returned and errno  is  set  to  indicate  the
     error.


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

ERORS
     The getpflags() 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  PRIVAWARE  but  the
              observed set invariance condition was not met.


ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    
     MT-Level                     Async-Signal-Safe           
    


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








SunOS 5.11           Last change: 8 Mar 2006                    2



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™