HP-UX 11i Version 2 Release Notes (October 2003)

Libraries and Programming
File Descriptor Allocation
Chapter 9
213
File Descriptor Allocation
A file descriptor is a positive integer that is generated by the system when a process
opens a file. Operations which perform I/O on the file would use this descriptor to refer to
the file.
Summary of Change
The behavior of the file descriptor allocation in HP-UX 11i v2 has been changed to
prevent security problems such as unauthorized modification of root-owned files. This
change will keep the file descriptors 0, 1 and 2 (STDIN, STDOUT, and STDERR) open if they
are closed in the target program invoked using an exec() system call. The exec'd target
program can be any UNIX95 compliant function, setuid()/setgid(), or non-UNIX95
compliant program.
Impact
The change in file descriptor allocation will not affect most applications because they
already have these file descriptors open. The change will affect applications that depend
on these specific file descriptors being available at the time the program starts. If it
breaks an application, the change can be disabled by setting the value of the dynamic
tunable, cleanup_stdio, to 0. By default, the value of cleanup_stdio will be set to 1
and the new functionality is enabled.
Compatibility
This change will affect applications that depend on these specific file descriptors being
available at the time the program starts. To fix this problem, you can disable the change
in file descriptor allocation by setting the value of the dynamic tunable, cleanup_stdio,
to 0.
Performance
There are no performance issues.
Documentation
There are no other document changes.
Obsolescence
Not applicable.