diff options
author | Mike Yuan <me@yhndnzj.com> | 2023-02-24 00:48:10 +0800 |
---|---|---|
committer | Mike Yuan <me@yhndnzj.com> | 2023-02-24 02:12:08 +0800 |
commit | d71f5b1217986a18e8ddaef3191afddfe731b2d7 (patch) | |
tree | fda06dd39c5b2114440d10186936d755573fcc52 /man/sd_session_is_active.xml | |
parent | f1e1614e10f866daa6e62366ba06fa0b10739174 (diff) | |
download | systemd-d71f5b1217986a18e8ddaef3191afddfe731b2d7.tar.gz |
sd-login: add sd_session_get_username
Diffstat (limited to 'man/sd_session_is_active.xml')
-rw-r--r-- | man/sd_session_is_active.xml | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/man/sd_session_is_active.xml b/man/sd_session_is_active.xml index b69fa13782..b62c35ae74 100644 --- a/man/sd_session_is_active.xml +++ b/man/sd_session_is_active.xml @@ -21,6 +21,7 @@ <refname>sd_session_is_remote</refname> <refname>sd_session_get_state</refname> <refname>sd_session_get_uid</refname> + <refname>sd_session_get_username</refname> <refname>sd_session_get_seat</refname> <refname>sd_session_get_service</refname> <refname>sd_session_get_type</refname> @@ -61,6 +62,12 @@ </funcprototype> <funcprototype> + <funcdef>int <function>sd_session_get_username</function></funcdef> + <paramdef>const char *<parameter>session</parameter></paramdef> + <paramdef>char **<parameter>username</parameter></paramdef> + </funcprototype> + + <funcprototype> <funcdef>int <function>sd_session_get_seat</function></funcdef> <paramdef>const char *<parameter>session</parameter></paramdef> <paramdef>char **<parameter>seat</parameter></paramdef> @@ -155,6 +162,13 @@ determine the user identifier of the Unix user the session identified by the specified session identifier belongs to.</para> + <para><function>sd_session_get_username()</function> may be used to + determine the name of the Unix user the session identified by + the specified session identifier belongs to. The returned string + needs to be freed with the libc + <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry> + call after use.</para> + <para><function>sd_session_get_seat()</function> may be used to determine the seat identifier of the seat the session identified by the specified session identifier belongs to. Note that not all @@ -252,6 +266,7 @@ positive integer; if it fails, 0. On success, <function>sd_session_get_state()</function>, <function>sd_session_get_uid()</function>, + <function>sd_session_get_username()</function>, <function>sd_session_get_seat()</function>, <function>sd_session_get_service()</function>, <function>sd_session_get_type()</function>, |