next up previous contents index
Next: 11.2.4 member_sid: Compute a Up: 11.2 oskit_security: Security Server Previous: 11.2.2 notify_perm: Notify of

11.2.3 transition_sid: Compute a SID for a new object

 

SYNOPSIS

#include <oskit/flask/security.h>

OSKIT_COMDECL oskit_security_transition_sid(oskit_security_t *security, oskit_security_id_t ssid, oskit_security_id_t tsid, oskit_security_class_t tclass, [out] oskit_security_id_t *out_sid);

DESCRIPTION

The oskit_security_transition_sid function computes a SID for a new object based on a SID pair and a class. The object managers call this function when objects are created if a SID was not specified for the object and there is more than one relevant SID that might be used as input in determining the SID of the new object. In particular, the file system code calls this function to obtain the SID of a new file based on the SID of the creating process and the SID of the parent directory, and the process management code calls this function to obtain the SID of a process transformed by an execve based on the current SID of the process and the SID of the executable program.

PARAMETERS

security
The security server.
ssid
The source SID.
tsid
The target SID.
tclass
The security class of the object to be labeled.
out_sid
The SID with which to label the object.

RETURNS

Returns 0 on success, or an error code specified in <oskit/error.h>, on error.



Utah Flux Research Group