CAP(3)CAP(3)
NAME
cap – capabilities for setting the user id of processes
SYNOPSIS
DESCRIPTION
This device enables a trusted process to
create a capability that another process
may then use to change its user id. The intent is to allow
server processes, for example
A capability is a null terminated string consisting of the concatenation of
an old user name, an “@”, a new user name, an “@”, and a string of randomly
generated characters called the key.
The trusted process enables the kernel to authenticate
capabilities passed to it by writing to
hmac_sha1(old_at_new, strlen(old_at_new), key, strlen(key), hash, nil);
The kernel maintains a list of hashes, freeing them after the
corresponding capability is used or after a minute has passed
since the write to
The trusted process may then pass the capability to any process
running as the old user. That process may then
use the capability to change identity to the new user.
A process uses a capability by writing it to
SOURCE
SEE ALSO
DIAGNOSTICS
Errors generated by reading and writing