73 lines
2.1 KiB
HTML
73 lines
2.1 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of getseuserbyname</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>getseuserbyname</H1>
|
|
Section: SELinux API documentation (3)<BR>Updated: 29 September 2005<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
getseuserbyname - get SELinux username and level for a given Linux username
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>#include <<A HREF="file:///usr/include/selinux/selinux.h">selinux/selinux.h</A>></B>
|
|
|
|
<P>
|
|
<B>int getseuserbyname(const char *</B><I>linuxuser</I><B>, char **</B><I>selinuxuser</I><B>, char **</B><I>level</I><B>);</B>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>getseuserbyname</B>()
|
|
|
|
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
|
|
<B><A HREF="/cgi-bin/man/man2html?3+get_ordered_context_list_with_level">get_ordered_context_list_with_level</A></B>(3)
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?3+get_default_context_with_level">get_default_context_with_level</A></B>(3).
|
|
|
|
<P>
|
|
The returned SELinux username and level should be freed by the caller
|
|
using free.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>RETURN VALUE</H2>
|
|
|
|
On success, 0 is returned.
|
|
On failure, -1 is returned and
|
|
<I>errno</I>
|
|
|
|
is set appropriately.
|
|
<P>
|
|
The errors documented for the
|
|
<B><A HREF="/cgi-bin/man/man2html?2+stat">stat</A></B>(2)
|
|
|
|
system call are also applicable here.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+selinux">selinux</A></B>(8)
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="1"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="2"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="3"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="4"><A HREF="#lbAE">RETURN VALUE</A><DD>
|
|
<DT id="5"><A HREF="#lbAF">SEE ALSO</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:44 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|