Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

open(2) OSS System Calls Reference Manual
If the open requires file creation, the Guardian file created will be Format 1, odd, unstruc-
tured, and file code 180.
If the open requires file creation, the file is given access permissions compatible with the
standard security permissions for the Guardian creator access ID (CAID) of the calling
process.
During open() processing, all access permissions are checked. This includes Guardian environ-
ment checks by Guardian standard security mechanisms (and by the Safeguard product) for
Guardian disk file and process access.
Considerations for Restricted-Access Filesets
When accessing a file in a restricted-access leset, 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.
Executable files that have the PRIVSETID file privilege and that are started by super ID can per-
form privileged switch ID operations (such as by using the setuid() function) to switch to
another ID and then access files in restricted-access lesets as that ID. Executable files without
the PRIVSETID file privilege that perform privileged switch ID operations are unconditionally
denied access to restricted-access filesets.
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 leset. Network File System (NFS) clients
are not granted SOA group privileges, even if these clients are accessing the system with a user
ID that is a member of the SOA security group.
If a file opened for writing has file privileges such as PRIVSOARFOPEN or PRIVSETID, these
file privileges are removed. Only Members of Safeguard SECURITY-PRV-ADMINISTRATOR
(SEC-PRIV-ADMIN or SPA) group are permitted to explicitly set file privileges. File privileges
can be set using the setfilepriv() function or the setfilepriv command only.
For more information about restricted-access lesets and file privileges, see the Open System Ser-
vices Management and Operations Guide.
Use From the Guardian Environment
A call to the open() function in the Guardian environment requires an OSS pathname and returns
an OSS file-system file descriptor, regardless of the file system containing the file.
The open() function belongs to a set of functions that have these 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. You cannot close these file
numbers 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.
510 Hewlett-Packard Company 527186-023