avc_compute_member3
Obtain selinux label for new object
Part of avc_compute_create(3).
Overview
avc_compute_create() is used to compute a SID to use for labeling a new object in a particular class based on a SID pair. This call is identical to security_compute_create(), but does not require converting from userspace SID's to contexts and back again.
avc_compute_member() is used to compute a SID to use for labeling a polyinstantiated object instance of a particular class based on a SID pair. This call is identical to security_compute_member(), but does not require converting from userspace SID's to contexts and back again.
These functions return a SID for the computed context in the memory referenced by sid.
Return value
On success, zero is returned. On error, -1 is returned and errno is set appropriately.
Errors
- EINVAL
-
The tclass and/or the security contexts referenced by ssid and tsid are not recognized by the currently loaded policy.
- ENOMEM
-
An attempt to allocate memory failed.
History
- Debian 13 (Trixie) to Debian 8 (Jessie): the text shown here
- Debian 7 (Wheezy) to Debian 6.0 (Squeeze)
- Debian 5.0 (Lenny)