On the operating system, appropriate privileges are
associated with a process with an effective UID set to 0.
To obtain privileges, a user can log in as
root
or as any other user whose UID is 0, or issue the
su
command with no arguments to change the current user identity to superuser.
An unprivileged process with a saved set-user-ID or real user
UID of 0 can use the
setuid()
system call to change its effective UID to 0, the superuser UID.
Saved set-user-ID and real user ID are set to 0 for an unprivileged
process if that process has a privileged ancestor process.
Privileges can be associated with executable code through the use of
the
S_ISUID
bit. The
S_ISUID
bit is an attribute of a file stored on the file system.
If the
S_ISUID
bit is set on a binary, whenever that binary is executed, the
effective UID of the process that results through the execution
of the binary is set to the UID of the owner of the binary file.
Thus, if the owner of the binary file is
root,
which has a UID of 0, the effective UID of the process that results
from the execution of the binary is UID 0, and the process is privileged.
The operating system supports character special file types in addition to terminal device types. Information about these files appears in the System Administration guide.
Other than regular file, character special file, block special file, FIFO special file, and directory file, the following file types are available:
On the operating system, if a child process continues to exist
after its creator process ceases to exist, the
parent process ID
becomes the
process ID
of the
init
process, which has a PID of 1.
A pathname that begins with two slashes (//) is interpreted as if it began with a single slash (/).
The following process resources are returned
to the system after a process terminates but before
its process ID is reaped by a call to
wait()
or
waitpid():
wait
or
waitpid
for the terminated process is issued, the PID of the terminated
process and the kernel data structures associated with the terminated
process are recycled.
The operating system does not allow users to create, write, or update objects residing on read-only file systems.
How scheduling policy can affect process priority, under SCHED_FIFO and SCHED_RR policies:
Under the SCHED_OTHER timesharing scheduling policy, if a process is preempted or yields to another process, it goes to the end of the process list for the new priority.
Under the SCHED_OTHER scheduling policy, processes are allowed to run until they are preempted, yield to another process, or finish their quantum. If no equal or higher priority processes are waiting to run, the executing process is allowed to continue. However, while a process is running, the scheduler changes the process's priority. Over time, it is likely that a higher priority process will exist because the scheduler adjusts priority.
A process's effective group ID is included in its list of supplementary group IDs only if the effective group ID refers to a group of which the UID associated with the process is a member.
A system reboot (not a system crash, but an intentional reboot) will flush data to disk. Therefore, file data associated with message queues, semaphores, and memory mapped files will be saved to disk. Processes are not persistent across a system reboot.
This section discusses extended security controls, file access permissions, and updating file times.
Files that are marked for update are updated periodically.
In addition to the errors listed in this clause, the operating system supports the following errors under the stated conditions:
| Name | Description |
| [EADDRINUSE] | Address already in use |
| [EADDRNOTAVAIL] | Cannot assign requested address |
| [EAFNOSUPPORT] | Address family not supported by protocol family |
| [EALREADY] | Operation already in progress |
| [EBADMSG] | Next message has wrong type |
| [EBADRPC] | RPC struct is bad |
| [ECANCELED] | Operation canceled |
| [ECLONEME] | Tells open() to clone the device |
| [ECONNABORTED] | Software caused connection abort |
| [ECONNREFUSED] | Connection refused |
| [ECONNRESET] | Connection reset by peer |
| [EDESTADDRREQ] | Destination address required |
| [EDIRTY] | Mounting a dirty file system without force |
| [EDQUOT] | Disc quota exceeded |
| [EDUPPKG] | Duplicate package name on install |
| [EFAIL] | Cannot start operation |
| [EFTYPE] | Inappropriate operation for file type |
| [EHOSTDOWN] | Host is down |
| [EHOSTUNREACH] | No route to host |
| [EIDRM] | Identifier removed |
| [EINPROG] | Operation now in progress |
| [EINPROGRESS] | Operation now in progress |
| [EISCONN] | Socket already in use |
| [ELOOP] | Too many levels of symbolic links |
| [EMEDIA] | Hard ECC or similar disk media failure |
| [EMSGSIZE] | Message too long |
| [EMTIMERS] | Too many timers |
| [ENETDOWN] | Network is down |
| [ENETRESET] | Network dropped connection on reset |
| [ENETUNREACH] | Network is unreachable |
| [ENOBUFS] | No buffer space available |
| [ENODATA] | No message on stream head read queue |
| [ENOMSG] | No message of desired type |
| [ENOPKG] | Unresolved package name |
| [ENOPROTOOPT] | Protocol not available |
| [ENOSR] | Out of streams resources |
| [ENOSTR] | File descriptor not associated with a stream |
| [ENOSYM] | Unresolved symbol name |
| [ENOTBLK] | Block device required |
| [ENOTCONN] | Socket is not connected |
| [ENOTSOCK] | Socket operation on nonsocket |
| [ENOTSUP] | Function not implemented |
| [EOPNOTSUPP] | Operation not supported on socket |
| [EPFNOSUPPORT] | Protocol family not supported |
| [EPROGMISMATCH] | Program version wrong |
| [EPROGUNAVAIL] | RPC program not available |
| [EPROCLIM] | Too many processes |
| [EPROCUNAVAIL] | Bad procedure for program |
| [EPROTO] | Streams protocol error |
| [EPROTONOSUPPORT] | Protocol not supported |
| [EPROTOTYPE] | Protocol wrong type for socket |
| [EREMOTE] | Too many levels of remote in path |
| [ERPCMISMATCH] | RPC version wrong |
| [ESHUTDOWN] | Cannot send after socket shutdown |
| [ESOCKTNOSUPPORT] | Socket type not supported |
| [ESOFT] | Correctable disk error |
| [ESTALE] | Stale file system |
| [ETIME] | System call timed out |
| [ETIMEDOUT] | Connection timed out |
| [ETOOMANYREFS] | Too many references: cannot splice |
| [ETXTBSY] | Text file busy |
| [EUSERS] | Too many users |
| [EVERSION] | Version number mismatch |
| [EWOULDBLOCK] | Operation would block |
The operating system reliably detects the [EFAULT] error condition if the address is actually used.
On the operating system, the [EFBIG] error occurs when the size of a file exceeds the maximum file size of 2^40 bytes.
In addition to those primitive system data types listed in
POSIX.1 Table 2-1, the operating system supports
the following types whose names end with
_t
in headers specified by POSIX.1:
| Defined Type | Header |
caddr_t
|
sys/types.h
|
chan_t
|
sys/types.h
|
clock_t
|
sys/types.h
|
cnt_t
|
sys/types.h
|
daddr_t
|
sys/types.h
|
devs_t
|
sys/types.h
|
fixpt_t
|
sys/types.h
|
fpos_t
|
sys/types.h
|
key_t
|
sys/types.h
|
label_t
|
sys/types.h
|
level_t
|
sys/types.h
|
major_t
|
sys/types.h
|
mid_t
|
sys/types.h
|
minor_t
|
sys/types.h
|
paddr_t
|
sys/types.h
|
physadr_t
|
sys/types.h
|
ptrdiff_t
|
sys/types.h
|
qaddr_t
|
sys/types.h
|
sig_t
|
sys/types.h
|
sigset_t
|
sys/types.h
|
slab_t
|
sys/types.h
|
swblk_t
|
sys/types.h
|
time_t
|
sys/types.h
|
timer_t
|
sys/types.h
|
uchar_t
|
sys/types.h
|
uint_t
|
sys/types.h
|
ulong_t
|
sys/types.h
|
ushort_t
|
sys/types.h
|
vuchar_t
|
sys/types.h
|
vuint_t
|
sys/types.h
|
vulong_t
|
sys/types.h
|
vushort_t
|
sys/types.h
|
wchar_t
|
sys/types.h
|
Environment variable names can contain any 8-bit character except the equal sign (=) or NUL ('\0').
This section contains information on POSIX.1 symbols.
The following additional feature test macros are available under the operating system:
_ANSI_C_SOURCE
_XOPEN_SOURCE
_AES_SOURCE
_OSF_SOURCE
{NGROUPS_MAX} is set to 32 in
<limits.h>.
On the operating system, the following magnitude
limitations (names and values) are defined when
<limits.h>
is included.
| Name | Value | Comments |
| ARG_MAX | 38912 |
Maximum bytes for an
exec
function
|
| CHILD_MAX | 100 | Maximum processes per user |
| OPEN_MAX | 64 |
See
sysconf(3)
for details
|
| STREAM_MAX | Omitted | Value is indeterminate |
| TZNAME_MAX | 255 | Maximum number of bytes supported for the name of a time zone (not of the TZ variable) |
The values in this table are constant from one pathname to another:
| Name | Value | Comments |
| LINK_MAX | 32767 | Maximum link file count |
| MAX_CANON | 255 | Maximum bytes in a terminal canonical input line |
| MAX_INPUT | 255 | Maximum number of supplemental group IDs |
| NAME_MAX | 255 | Maximum number of bytes in a filename |
| PATH_MAX | 1023 | Maximum number of bytes in a pathname |
| PIPE_BUF | 4096 | Maximum number of bytes that can be written atomically when writing to a pipe |
All constants in Table 2-10 are defined TRUE (1), except:
_POSIX_PRIORITIZED_IO, not defined in
<unistd.h>
_POSIX_VERSION, defined 199506L
All constants in Table 2-11 are defined TRUE (1), except:
_POSIX_CHOWN_RESTRICTED = 0
_POSIX_NO_TRUC = 0
On the operating system, the following values are used when
<unistd.h>
is included:
| Symbolic Constant | Value | Comments |
On the operating system,
<unistd.h>
contains the following values:
| Symbolic Constant | Value | Comments | Files |
| _POSIX_CHOWN_RESTRICTED | 0 |
The
chown
command requires appropriate privileges.
|
all files |
| _POSIX_NO_TRUNC | 0 | Pathname components longer than {NAME_MAX} generate an error. | all files |
| _POSIX_VDISABLE | 0377 | Terminal special characters defined in Section 7.1.1.9 can be disabled using this character value. | all terminal device files |