Open System Services Porting Guide (G06.24+, H06.03+)
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to Porting
- 2 The Development Environment
- 3 Useful Porting Tools
- 4 Interoperating Between User Environments
- Purpose of Interoperability
- The OSS User Environment
- OSS Commands for the Guardian User
- Guardian Commands for the UNIX User
- OSS Pathname and Guardian Filename Conversions
- Running the OSS Shell and Commands From TACL
- Running Guardian Commands From the OSS Shell
- Running OSS Processes With Guardian Attributes
- Using OSS Commands to Manage Guardian Objects
- 5 Interoperating Between Programming Environments
- 6 OSS Porting Considerations
- 7 Porting UNIX Applications to the OSS Environment
- 8 Migrating Guardian Applications to the OSS Environment
- General Migration Guidelines
- C Compiler Issues for Guardian Programs
- Using New and Extended Guardian Procedures
- Using OSS Functions in a Guardian Program
- Interoperating With OSS Programs
- Starting an OSS Program From the Guardian Environment
- C Compiler Considerations for OSS Programs
- Porting a Guardian Program to the OSS Environment
- How Arguments Are Passed to the C or C++ Program
- Differences in the Two Run-Time Environments
- Which Run-Time Routines Are Available
- Use of Common Run-Time Environment (CRE) Functions
- Replacing Guardian Procedure Calls With Equivalent OSS Functions
- Which IPC Mechanisms Can Be Used
- Interactions Between Guardian and OSS Functions
- 9 Porting From Specific UNIX Systems
- 10 Native Migration Overview
- 11 Porting or Migrating Sockets Applications
- 12 Porting Threaded Applications
- A Equivalent OSS and UNIX Commands for Guardian Users
- B Equivalent Guardian Commands for OSS and UNIX Users
- C Equivalent Inspect Debugging Commands for dbx Commands
- D Equivalent Native Inspect Debugging Commands for dbx Commands
- E Standard POSIX Threads Functions: Differences Between the Previous and Current Standards
- Glossary
- Index
Porting UNIX Applications to the OSS Environment
Open System Services Porting Guide—520573-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.