security_change_sid(2)

security_change_sid2

Compute a sid for relabeling an object

Usage

#include <ss.h>

int security_change_sid(security_id_t ssid, security_id_t tsid, security_class_t tclass, security_id_t *out_sid);

Overview

The security_change_sid call is used to compute a SID to use when relabeling an object in a particular class based on a SID pair.

Return value

A zero is returned if the computation was successful. On error, -1 is returned, and errno is set appropriately.

Errors

EINVAL

The source SID, target SID or target class was invalid.

EACCES

The process is not authorized to invoke this call.

From libselinux-dev 2002031409-4 in Debian 3.0 (Woody). Parsed by carta from the page's man source.