Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)
System Functions (a - d) access(2)
specified in the class entry bitwise-ANDed with the result of bitwise-ORing together all
of the permissions in all matching group entries. Otherwise, continue to the next check.
4. Otherwise, grant the permissions specified in the other entry.
Files in the Guardian File System
If the specified pathname resolves to the /G directory itself, the calling process has read and exe-
cute access but not write access. The permissions are "r-xr-xr-x".
If the specified pathname resolves to a Guardian process name, the calling process has execute
access but not read or write access. The permissions are "--x--x--x".
If the specified pathname resolves to a Guardian disk volume or subvolume, then the calling pro-
cess has read, write, and execute access. The permissions are "rwxrwxrwx".
If the specified pathname resolves to a regular Guardian disk file, then Guardian standard secu-
rity and Safeguard file-level protection govern access. Refer to the stat(2) reference page for
more information.
Use From the Guardian Environment
The access() 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.
NOTES
On systems running H06.24 or later H-series RVUs or J06.13 or later J-series RVUs, you can use
this function with 32-bit or 64-bit OSS applications.
RETURN VALUES
Upon successful completion, the access() function returns the value 0 (zero). Otherwise, the
value -1 is returned and errno is set to indicate the error.
ERRORS
If any of the following conditions occurs, the access() function sets errno to the corresponding
value:
[EACCES] The permission bits of the file mode do not permit the requested access, or search
permission is denied on a component of the pathname prefix. The owner of a file
has permissions checked with respect to the "owner" read, write, and execute
mode bits; members of the file’s group other than the owner have permissions
checked with respect to the "group" mode bits; and all others have permissions
checked with respect to the "other" mode bits.
[EFAULT] The path parameter points outside the process’s allocated address space.
[EFSBAD] The program attempted an operation involving a fileset with a corrupted fileset
catalog.
527186-023 Hewlett-Packard Company 1−7