Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (k - m) mknod(2)
• Access permission and attribute bits set according to the value of the mode parameter,
modified as described in "ACL Inheritance" in the acl(5) reference page.
Upon successful completion of the function call, the st_atime, st_ctime, and st_mtime fields of
the file are marked for update. The st_ctime and st_mtime fields of the directory that contains
the new entry are also marked for update.
Accessing Files in Restricted-Access Filesets
When accessing a file in a restricted-access fileset, the super ID (255,255 in the Guardian
environment, 65535 in the OSS environment) is restricted by the same file permissions and
owner privileges as any other user ID: It has no special privileges unless the executable file
started by the super ID has the PRIVSETID file privilege. In this case, the process started by the
super ID can switch to another ID and then access files in restricted-access filesets as that ID.
Executable files that have the PRIVSOARFOPEN privilege and that are started by a member of
the Safeguard SECURITY-OSS-ADMINISTRATOR (SOA) group have the appropriate privilege
to use this function on any file in a restricted-access fileset. However, Network File System
(NFS) clients are not granted SOA group privileges, even if these clients are accessing the sys-
tem with a user ID that is a member of the SOA security group.
For more information about restricted-access filesets and file privileges, see the Open System Ser-
vices Management and Operations Guide.
Use From the Guardian Environment
The mknod( ) function can be used by a Guardian process when the process has been compiled
using the #define _XOPEN_SOURCE_EXTENDED 1 feature-test macro or an equivalent com-
piler command option.
The mknod( ) function is one of a set of functions that have the following effects when the first
of them is called from the Guardian environment:
• Two Guardian file-system file numbers (not necessarily the next two available) are allo-
cated for the root directory and the current working directory. These file numbers cannot
be closed by calling the Guardian FILE_CLOSE_ procedure.
• The current working directory is assigned from the VOLUME attribute of the Guardian
environment =_DEFAULTS DEFINE.
• The use of static memory by the process increases slightly.
These effects occur only when the first of the set of functions is called. The effects are not cumu-
lative.
Use on Guardian Objects
When S_IFREG is specified for the mode parameter, the path parameter can be any valid version
of the following:
/G/vol/subvol Where vol already exists. If vol does not exist, the function call fails and errno
is set to the value of [EINVAL].
/G/vol/subvol/fileid
Where vol already exists and fileid specifies a regular disk file (an odd unstruc-
tured Enscribe file). If vol does not exist, the function call fails and errno is set
to the value of [EINVAL].
If
only /G/vol is specified, the function call fails and errno is set to the value of [EPERM].
When S_IFCHR is specified for the mode parameter, any specification for the path parameter
that uses /G causes the function call to fail and errno to be set to [EPERM].
527186-023 Hewlett-Packard Company 4−55