1getseuserbyname(3)         SELinux 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
17       associated with a given Linux username.  The SELinux username and secu‐
18       rity  level  can  then  be passed to other libselinux functions such as
19       get_ordered_context_list_with_level(3)                              and
20       get_default_context_with_level(3).
21
22       The  returned  SELinux username and level should be freed by the caller
23       using free.
24

RETURN VALUE

26       On success, 0 is returned.  On failure, -1 is returned and errno is set
27       appropriately.
28
29       The  errors  documented for the stat(2) system call are also applicable
30       here.
31

SEE ALSO

33       selinux(8)
34
35
36
37dwalsh@redhat.com              29 September 2005            getseuserbyname(3)
Impressum