Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ procpriv(2) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(2)

filepriv(2)

procprivl(3C)

priv(5)

privilege(5)






       procpriv(2)                                              procpriv(2)


       NAME
             procpriv - add, retrieve, remove, count, or put privileges
             associated with the calling process

       SYNOPSIS
             #include <sys/types.h>
             #include <priv.h>
             int procpriv(int cmd, priv_t *privp, int nentries);

       DESCRIPTION
             The procpriv system call is used to add, remove, retrieve,
             count, or put the privileges associated with the calling
             process.  privp is a pointer to an array of privilege
             descriptors, each of which contains the privilege set and
             identity of the requested privilege.  nentries is the number
             of entries contained in privp.

             The recognized cmds and their functions are described below:

            SETPRV
                   Set the working privilege set for the current process
                   based on the privilege descriptor(s) contained in privp.
                   All requested privileges not contained in the current
                   maximum privilege set are ignored.  All requested
                   working privileges that are in the current maximum set
                   are added to the working set.  If any argument is
                   invalid, none of the process privileges is changed.

            CLRPRV
                   Clear the working and maximum privilege sets for the
                   current process based on the privilege descriptor(s)
                   contained in privp.  All requested privileges are
                   removed from their respective sets.  The working set is
                   adjusted to be a subset of the resulting maximum set.
                   If any argument is invalid, none of the process
                   privileges is changed.

            PUTPRV
                   Set the working and maximum privilege sets for the
                   current process based on the privilege descriptor(s)
                   contained in privp.  The setting is absolute.  The
                   working set is adjusted to be a subset of the resulting
                   maximum set.  Privileges contained in either privilege
                   set that are not in the maximum set of the calling
                   process are ignored.  If any argument is invalid, none
                   of the process privileges is changed.


                           Copyright 1994 Novell, Inc.               Page 1













      procpriv(2)                                              procpriv(2)


           GETPRV
                  Return in privp the working and maximum privilege sets
                  for the current process in the form of privilege
                  descriptors.  None of the process privileges is changed.

           CNTPRV
                  Return the number of privileges associated with the
                  current process.  The privp and nentries arguments are
                  ignored.  None of the process privileges is changed.

         Return Values
            On success, procpriv returns the number of privileges
            associated with the current process (SETPRV, CLRPRV, PUTPRV,
            GETPRV, CNTPRV).  On failure, procpriv returns -1 and sets
            errno to identify the error.

         Errors
            In the following conditions, procpriv fails and sets errno to:

           EINVAL
                  cmd or privilege specified is invalid, or nentries is
                  less than 0, or cmd is GETPRV and the process privileges
                  exceeds nentries.

      REFERENCES
            intro(2), filepriv(2), procprivl(3C), priv(5), privilege(5)

      NOTICES
         Considerations for Threads Programming
            Enhanded Security attributes are a characteristic of the
            containing process and are shared by sibling threads.

















                          Copyright 1994 Novell, Inc.               Page 2








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026