GETXPERM(2,L) AIX Technical Reference GETXPERM(2,L)
-------------------------------------------------------------------------------
getxperm, setxperm
PURPOSE
Manages user's execution permission site mask.
LIBRARY
Standard C Library (libc.a)
SYNTAX
#include <sys/types.h>
int getxperm(sitep,maxsites)
sitexperm_t *sitep;
int maxsites;
int setxperm(sitep,maxsites)
sitexperm_t *sitep;
int maxsites;
#define GS_NOPERMISSION 0
#define GS_PERMISSION 1
DESCRIPTION
The getxperm system call retrieves the user site permission mask of the current
process. The user site permission mask is the list of sites for which the user
has execution/migration permission. The information is returned in the sitep
buffer which is assumed to be of length maxsites. If the sitep buffer is of
insufficient length to return all the site information, then an error occurs
and -1 is returned. Successful completion is indicated by a return value
equivalent to the maximum site number plus one.
The setxperm system call sets the user site permission mask of the current
process. The arguments for setxperm are interpreted similarly to those for
getxperm. Any sites not represented by sitep and maxsites remain unaltered. A
successful call returns 0. A return value of -1 indicates an error. Only the
superuser may issue setxperm.
The site permission mask indicates where the current process may move or create
new processes. Permission is granted for those sites which are set to
GS_PERMISSION. The site permission mask is inherited by the child processes
when the process creates them.
RETURN VALUE
Processed November 7, 1990 GETXPERM(2,L) 1
GETXPERM(2,L) AIX Technical Reference GETXPERM(2,L)
Upon successful completion of setxperm, a value of 0 is returned to the calling
process. Upon successful completion of getxperm, a value equivalent to the
maximum site number plus one is returned. Otherwise, a value of -1 is returned
and errno is set to indicate the error.
ERROR CONDITIONS
The getxperm and setxperm system calls fail if any of the following are true:
EINVAL maxsites is less than one or greater than 255 in a setxperm call.
maxsites is less than 1 or less than the currently configured number
of sites on the network or greater than 255 in a getxperm system
call.
EFAULT sitep does not point to a valid area inside the user's address space.
EFAULT The sitep buffer is of insufficient length to return all the site
information in a getxperm call.
EPERM setxperm was called from a process whose effective user ID was not
superuser.
RELATED INFORMATION
In this book: "exec: execl, execv, execle, execve, execlp, execvp," "fork,
vfork," "migrate," "rexec: rexecl, rexecv, rexecle, rexecve, rexeclp, rexecvp,"
"rfork," and "run: runl, runv, runle, runve, runlp, runvp."
Processed November 7, 1990 GETXPERM(2,L) 2