Guardian Native C Library Calls Reference Manual (G06.29+, H06.08+, J06.03+)
remove_oss(3) Guardian Native C Library Calls Reference Manual
NAME
remove_oss - Removes a file (OSS remove( ) function)
LIBRARY
G-series native Guardian processes: $SYSTEM.SYSnn.ZCRTLSRL
G-series native OSS processes: /G/system/sysnn/zcrtlsrl
H-series and J-series native Guardian processes: $SYSTEM.ZDLLnnn.ZCRTLDLL
32-bit H-series and J-series OSS processes: /G/system/zdllnnn/zcrtldll
64-bit H-series and J-series OSS processes: /G/system/zdllnnn/ycrtldll
SYNOPSIS
#include <stdio.h>
int remove(
const char *file_name);
int remove_oss(
const char *file_name);
PARAMETERS
file_name Points to the file to be removed.
DESCRIPTION
The remove() OSS function and remove_oss() function cause a file named by the string pointed
to by file_name to be no longer accessible by that name. A subsequent attempt to open that file
using that name will fail unless it is created anew.
These functions are identical in the OSS environment. Unless otherwise noted, this reference
page uses remove() to refer to both the remove() OSS function and remove_oss( ) function.
If the file_name parameter refers to a directory, the call is equivalent to calling the rmdir() func-
tion on that directory.
If the file_name parameter refers to a file (not a directory), the call is equivalent to calling the
unlink() function on that file.
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.
Interoperability Variants
The C run-time library supports two variants of the remove() function: remove_oss() and
remove_guardian(). The variants support the unique file naming conventions and structures of
the OSS and Guardian file systems, respectively.
The header file maps calls to remove() to the variant that matches the target compilation
environment. The target environment is set with the systype pragma.
Explicit calls to the remove_oss( ) and remove_guardian() variants in source code are only
made when the behavior of one environment is desired from the other environment.
5−118 Hewlett-Packard Company 527192-018