1getseuserbyname(3) SELinux API documentation getseuserbyname(3)
2
3
4
6 getseuserbyname - get SELinux username and level for a given Linux
7 username
8
10 #include <selinux/selinux.h>
11
12 int getseuserbyname(const char *linuxuser, char **selinuxuser, char
13 **level);
14
16 getseuserbyname retrieves the SELinux username and security level asso‐
17 ciated with a given Linux username. The SELinux username and security
18 level can then be passed to other libselinux functions such as
19 get_ordered_context_list_with_level and get_default_context_with_level.
20
21
22
23 The returned SELinux username and level should be freed by the caller
24 using free.
25
27 On success, 0 is returned. On failure, -1 is returned and errno is set
28 appropriately.
29
30 The errors documented for the stat(2) system call are also applicable
31 here.
32
33
35 selinux(8)
36
37
38
39
40dwalsh@redhat.com 29 September 2005 getseuserbyname(3)