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

NAME

6       getseuserbyname  -  get  SELinux  username  and level for a given Linux
7       username
8

SYNOPSIS

10       #include <selinux/selinux.h>
11
12       int getseuserbyname(const char  *linuxuser,  char  **selinuxuser,  char
13       **level);
14

DESCRIPTION

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

RETURN VALUE

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

SEE ALSO

35       selinux(8)
36
37
38
39
40dwalsh@redhat.com              29 September 2005            getseuserbyname(3)
Impressum