Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ cd_defs(A) — Apollo Domain/OS SR10.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

CD_DEFS                           Domain/OS                            CD_DEFS



NAME
     cd_defs - set and get default values for User/Group ID and file/directory
     permissions

SYNTAX
     #include <sys/cdrom.h>

     int cd_defs(path, cmd, defs)
     char *path;
     int cmd;
     struct cd_defs *defs

DESCRIPTION
     This function sets or gets (based upon cmd) the defaults for User IDs,
     GroupIDs, file/directory permissions and directory search permissions for
     the mounted CD-ROM. The argument path points to a mount-point of a CD-ROM
     file system. The argument cmd is either CD_SETDEFS or CD_GETDEFS.  The
     declaration for truct cd_defs and the definitions for CD_SETDEFS and
     CD_GETDEFS are contained in <sys/cdrom.h>.

RETURN VALUE
     Upon successful completion, cd_defs returns a value of zero.  In case of
     an error, -1 is returned and errno is set to indicate the error.

ERRORS
     The cd_defs function will fail if one or more of the following is true:

     [EACCESS]
             Search permission is denied for a component of the path
             prefix. Read permission is denied for the mount-point.

     [ENAMETOOLONG]
             The length of the path string exceeds {PATH_MAX} or a
             pathname component is longer than {NAME_MAX} while
             {_POSIX_NO_TRUNC} is in effect.

     [ENOENT]
             A component of path does not exist or the path
             argument points to an empty string.

     [EINVAL]
             The value of cmd or values of members of the d_defs
             structure are invalid.
             The argument path points to a file/directory not within
             a CD-ROM file hierarchy

     [ENOTDIR]
             A component of the path prefix is not a directory.

     [EFAULT]
             The address of cd_defs or path is invalid.

     [EPERM]
             User does not have appropriate privileges in case of
             setting values.
     [EINTR]
             A signal was caught during the cd_defs() function.

     [EMFILE]
             {OPEN_MAX} file descriptors are currently open in the
             calling process.

     [ENFILE]
             The system file table is full.

APPLICATION USAGE
     The setting of default values is restricted to a user with appropriate
     privileges.  When setting default values this function is intended to be
     used only directly after the CD-ROM has been mounted, before any access
     to the CD-ROM is done. If the function is applied for setting default
     values when files or directories have already been opened the effect of
     this function on these files and directories is undefined.

NOTES
     The Domain implementation of the CD file system currently ignores
     protections and Group and User IDs.

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