dg_getauthinfo(2) DG/UX B2 Security R4.12MU02 dg_getauthinfo(2)
NAME
dggetauthinfo - read a subject's authinfo information.
SYNOPSIS
#include <sys/types.h>
#include <sys/dgauthinfo.h>
int dggetauthinfo(pid, bufp, lenp)
const pidt pid;
void *bufp;
sizet *lenp;
where:
pid The process ID corresponding to the subject whose authinfo
information is to be read. (A value of zero denotes the
calling process.)
bufp The address of a buffer into which this authinfo information
is to be copied.
lenp The address of a variable containing the length (in bytes) of
this buffer.
DESCRIPTION
This system call copies the target subject's authinfo information
into the specified buffer, and replaces the value in the buffer
length variable by the length of the authinfo information actually
copied.
If the given buffer length is not sufficient, nothing is written to
the buffer, and the value of the buffer length variable is replaced
by the length of the target subject's authinfo information. (This
allows the caller to retry with an adequate buffer.)
ACCESS CONTROL
Any caller may read its own authinfo information. In order to read
the authinfo information of another process, the caller must have
appropriate privilege.
For systems supporting the DG/UX Capability Option, appropriate
privilege is defined as having one or more specific capabilities
enabled in the effective capability set of the calling process. See
capdefaults(5) for the default capability for this system call. On
systems without the DG/UX Capability Option, appropriate privilege
means that the caller has an effective UID of root. See the
appropriateprivilege(5) man page for more information.
RETURN VALUE
0 Successful completion.
-1 An error occurred. errno is set to indicate the error.
EXCEPTIONS
errno may be set to one of the following error codes:
ENOSYS The system call was made on a system that does not support
this operation.
EPERM The caller does not have appropriate privilege to perform
this operation.
ESRCH The process pid does not exist.
EFAULT The parameter lenp points to a memory area not accessible
to the calling process.
EINVAL The value pointed to by lenp is smaller that the target
subject's authinfo information
EFAULT The parameter bufp points to a memory area not accessible
to the calling process.
ENOMEM The operating system was unable to allocate internal memory
to process the system call.
SEE ALSO
dgsetauthinfo(2), capdefaults(5).
Licensed material--property of copyright holder(s)