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

OSS Library Calls (n - r) opendir(3)
A process that has an effective user ID or group ID that qualifies for membership in the Safe-
guard SECURITY-OSS-ADMINISTRATOR group is granted read and search permissions on
any directory.
Accessing Files in 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: 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 lesets as that ID.
Processes 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 system with a user ID that is a member of the SOA security
group.
For more information about restricted-access lesets and file privileges, see the Open System Ser-
vices Management and Operations Guide.
Use on Guardian Objects
A call to opendir( ) on /G, followed by calls to readdir(), returns all of the Guardian volumes on
the system.
The same sequence performed on /G/vol returns all of the subvolumes and temporary files on that
particular volume.
The same sequence performed on /G/vol/subvol returns all of the files on that particular subvo-
lume, including files that are inaccessible to the OSS interface such as Enscribe structured files
and SQL objects.
Guardian process names can be directories. However, a Guardian process cannot be opened
using opendir( ). Attempts to do so fail. If the named process is a subtype 30 process, errno is
set to [EPERM]. If the named process is not a subtype 30 process, errno is set to [ENOENT].
Use From the Guardian Environment
The opendir( ) 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.
527187-017 Hewlett-Packard Company 537