Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ dg_mkmldir(2) — DG/UX R4.11MU05

Media Vault

Software Library

Restoration Projects

Artifacts Sought



dg_mkmldir(2)            DG/UX B2 Security R4.12MU02           dg_mkmldir(2)


NAME
       dgmkmldir - create a multilevel directory

SYNOPSIS
       #include <sys/types.h>
       #include <sys/dgtparms.h>

       int    dgmkmldir(targtype, targ)
       int               targtype;
       void              *targ;

   where:
       targtype  A token that identifies the type of directory object to
                  convert to a multilevel directory.  The available tokens
                  are defined in sys/dgtparms.h as follows:
                  TFILE  The object is a file identified by a pathname.
                  TFD    The object is a file identified by a file
                          descriptor.

       targ       The address of the identifier of the directory object to
                  convert to a multilevel directory.  The value of targtype
                  determines the type of entity that targ points to as
                  follows:
                  TFILE  targ points to a pathname string.
                  TFD    targ points to a file descriptor.

DESCRIPTION
       The dgmkmldir system call converts the empty directory identified by
       targtype and targ to a multilevel directory.  The MAC and DAC
       attributes of the target directory will remain unchanged.  All hidden
       directories created under this multilevel directory will inherit its
       DAC attributes, and will be assigned a MAC label equal to the
       clearance of the process that caused the creation of the hidden
       directory.

       If the target directory is also the current working directory of the
       calling process, or if the target is a hidden directory, mkmldir will
       fail.

ACCESS CONTROL
       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 process
       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:

       ENOTEMPTY  The directory is not empty.

       EINVAL     The directory is a hidden directory.

       EINVAL     The target directory is the system's root directory.

       EINVAL     The target directory is the current working directory of
                  the caller.

       EINVAL     The targtype specified is not recognized.

       ENOTDIR    The target file system object is not a directory.

       EOPNOTSUPP The object type specified by targtype is recognized but
                  is invalid for this operation.

       ENOENT     The caller does not have sufficient privilege.

       ENXIO      The system could not set the MAC label on the new
                  multilevel directory because of a ufia failure.

       EFAULT     The pathname parameter specified an area of memory not
                  accessible to the calling process.

SEE ALSO
       dggetdirmode(2), dgsetdirmode(2), capdefaults(5).

NOTES
       Care must be taken to ensure that there are no processes that have
       the target directory open.  This could result in the creation of
       files in the parent of the multilevel directory structure.


Licensed material--property of copyright holder(s)

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