dg_setdirmode(2) DG/UX B2 Security R4.12MU02 dg_setdirmode(2)
NAME
dgsetdirmode - set the directory mode of the current process
SYNOPSIS
#include <sys/types.h>
#include <sys/mac.h>
int dgsetdirmode(pid, newmode)
pidt pid;
int newmode;
where:
pid The process ID of the process whose directory mode is to be
set.
newmode Either DIRMODEVIRTUAL or DIRMODEREAL. The first sets
the process's directory mode to virtual, the second to real.
DESCRIPTION
The dgsetdirmode system call sets the directory mode of the process
indicated by pid to the mode indicated by the newmode parameter.
ACCESS CONTROL
To set a directory mode, the process must have appropriate privilege
and have appropriate MAC access to the target process. (See the
appropriateprivilege(5) man page for more information.) 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.
If the invoking process is in real directory mode, the current
working directory of the invoking process is a multilevel parent
directory, and newmode specifies virtual directory mode, then the
call will fail.
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:
EACCES The caller is denied MAC access to the target process.
EINVAL The newmode parameter has an invalid value.
EINVAL The current working directory is a multilevel parent
directory, and newmode specifies virtual directory mode.
EPERM The caller did not have sufficient privilege.
ESRCH The target process does not exist.
SEE ALSO
dggetdirmode(2), dgmkmldir(2), capdefaults(5).
Licensed material--property of copyright holder(s)