File: getseuserbyname.3

package info (click to toggle)
libselinux 2.0.65-5
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 1,660 kB
  • ctags: 2,682
  • sloc: ansic: 18,495; python: 296; sh: 195; makefile: 183
file content (28 lines) | stat: -rw-r--r-- 932 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
.TH "getseuserbyname" "3" "29 September 2005" "dwalsh@redhat.com" "SELinux API documentation"
.SH "NAME"
getseuserbyname \- get SELinux username and level for a given Linux username
.SH "SYNOPSIS"
.B #include <selinux/selinux.h>
.sp
.BI "int getseuserbyname(const char *" linuxuser ", char **" selinuxuser ", char **" level ");
.SH "DESCRIPTION"
.B getseuserbyname
retrieves the SELinux username and security level associated with 
a given Linux username.  The SELinux username and security level can
then be passed to other libselinux functions such as 
get_ordered_context_list_with_level and get_default_context_with_level.



The returned SELinux username and level should be freed by the caller
using free.  
.SH "RETURN VALUE"
On success, 0 is returned.
On failure, \-1 is returned and errno is set appropriately.

The errors documented for the stat(2) system call are also applicable
here.

.SH "SEE ALSO"
.BR selinux "(8)"