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-10
OSS C Programming Considerations
You cannot use ACLs to protect individual OSS files. However, you can “protect” the
disk volume in which OSS files reside with respect to users’ ability to create files in that
volume. To determine whether there is an ACL on a Guardian file, use the Guardian
FILE_GETINFOLISTBYNAME_ procedure.
OSS regular file access policies differ from Guardian disk file access policies. For OSS
files, file owner, file group, and other file classes are treated as mutually exclusive.
Remotely authenticated and locally authenticated processes are not distinguished. A
distinction between locally authenticated and remotely authenticated subjects applies
only to appropriate privileges (locally authenticated effective user ID of 65535). The
security database is consulted only for OSS file creation, and there is no concept of
group manager for OSS files.
Security Interoperability
There is some security interoperability between Guardian and OSS environments. All
processes have the same identity attributes, and an object-oriented control model is
used. A process’s effective user ID (EUID) and its process access ID (PAID) are kept
synchronized by OSS functions and Guardian procedure calls. Guardian disk file
access control has been generalized to use a process’s effective group ID (EGID) and
group list. The execution of a PROGID program alters the child program’s identity in
the same manner as does the execution of a set-user-ID and set-group-ID program.
UNIX programs ported to the OSS environment (without using the additional features
provided by Guardian process attributes or Guardian files) should see very little, if any,
difference in behavior when executed in the OSS environment. It is only when these
programs access Guardian files or processes or use Guardian features using Guardian
procedure calls that a difference in behavior is noticed. API interoperability aspects are
discussed further in Section 5, Interoperating Between Programming Environments.
See also Using HP Extensions on page 7-25.
OSS C Programming Considerations
The OSS C compilers for the TNS/R and TNS/E native environments support the
ISO/ANSI C standard, Common C, plus extensions specific to HP. The OSS C
compiler for the G-series TNS environment supports the ISO/ANSI C standard, plus
extensions specific to HP. An OSS C compiler is not supported in the H-series TNS
environment.
ISO/ANSI C adds a number of features and capabilities not present in Common C.
Many of these features are listed in ISO/ANSI C Standard and the HP NonStop C
Compiler on page 1-4. Because the definition of ISO/ANSI C is more precise than
Common C, UNIX programs written in ISO/ANSI C are more portable and easily
maintained. This subsection deals with porting programs written in Common C to the
OSS environment. See Section 2, The Development Environment, for a discussion on
the differences between the C compilation tools in the native and G-series TNS
environments.