1avc_compute_create(3)     SE Linux API documentation     avc_compute_create(3)
2
3
4

NAME

6       avc_compute_create - obtain SELinux label for new object.
7

SYNOPSIS

9       #include <selinux/selinux.h>
10
11       #include <selinux/avc.h>
12
13       int avc_compute_create(security_id_t ssid, security_id_t tsid,
14                              security_class_t tclass, security_id_t *newsid);
15

DESCRIPTION

17       avc_compute_create  is  used to compute a SID to use for labeling a new
18       object in a particular class based on a SID pair.  This call is identiā€
19       cal  to  security_compute_create,  but does not require converting from
20       userspace SID's to contexts and back again.
21
22       avc_compute_create returns a SID for the computed context in the memory
23       referenced by sid, incrementing its reference count by 1.
24
25

RETURN VALUE

27       On  success,  zero  is returned.  On error, -1 is returned and errno is
28       set appropriately.
29
30

ERRORS

32       EINVAL The tclass and/or the security contexts referenced by  ssid  and
33              tsid  are not recognized by the currently loaded policy, or tsid
34              or ssid has a zero reference count and is invalid.
35
36
37       ENOMEM An attempt to allocate memory failed.
38
39

AUTHOR

41       Eamon Walsh <ewalsh@tycho.nsa.gov>
42
43

SEE ALSO

45       avc_init(3),     avc_context_to_sid(3),     security_compute_create(3),
46       selinux(8)
47
48
49
50                                  30 Mar 2007            avc_compute_create(3)
Impressum