Open System Services Porting Guide (G06.24+, H06.03+)

Table Of Contents
Porting UNIX Applications to the OSS Environment
Open System Services Porting Guide520573-006
7-20
Using OSS Function Calls
The value of the S_NONSTOP flag on a regular OSS file can be changed with chmod(),
but the change takes effect at the next open() call.
Using the chown() Function
For OSS files, a process can use the chown() function call to change the owner ID of
a file only if the effective user ID of the process is the super ID. The
_POSIX_CHOWN_RESTRICTED feature of this call is enforced for OSS files.
The ownership of Guardian disk files can be changed by using chown(), but attempts
to change the ownership of other Guardian files results in an error. The Guardian
security model is used, and any user can be given ownership of the file. Changing the
owner ID has the side effect of changing the group ID to the Guardian group of the new
owner. The _POSIX_CHOWN_RESTRICTED feature is ignored for files in the Guardian
file system.
Using the chroot() Function
The chroot() function changes the effective root directory. The chroot() function
can be called on the /G directory, a disk volume name, or a subvolume name. If a
process name or a reserved name is specified in the path parameter, the function fails
and returns an error.
Using the fcntl() Function
The fcntl() function controls open file descriptors. An OSS advisory lock can be
performed on Guardian regular files as well as on OSS files. Calling the fcntl()
function to unlock a Guardian file affects only OSS locks on that file. If the file has also
been locked by a Guardian procedure call, the Guardian locks are unaffected by a
fcntl() call.
fcntl() can be called from a native OSS process or a TNS Guardian process.
Using the link() Function
The link() function call is not supported for linking across OSS filesets or for OSS
directories. Links to Guardian files, to /dev/tty, to /dev/null, or to the directory
called lost+found in the root directory of an OSS fileset are not allowed.
Using the lseek() Function
You cannot use the lseek() function call with pipes, FIFO files, character special
files, or other devices. Seeks are not allowed on Guardian EDIT files, unless the
offset parameter is 0 (zero) and the whence parameter is set to SEEK_SET;
otherwise, an error is returned.