diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2023-02-24 09:20:52 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-24 09:20:52 +0900 |
commit | 9cddd367077f8841b5f84786d113ebc4556b06d3 (patch) | |
tree | 65c4bd8fe4401076686578d7a5c75e38e79480d4 /man | |
parent | c73676dcbbe3032c75d893d43ac309998c5f23e5 (diff) | |
parent | c4ef14dc2a0eaae6b93d41e5c82f50ee86e480a4 (diff) | |
download | systemd-9cddd367077f8841b5f84786d113ebc4556b06d3.tar.gz |
Merge pull request #26574 from YHNdnzj/sd-login-new-interface
sd-login: add two interfaces for retriving session info
Diffstat (limited to 'man')
-rw-r--r-- | man/sd_session_is_active.xml | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/man/sd_session_is_active.xml b/man/sd_session_is_active.xml index b69fa13782..716d8e162e 100644 --- a/man/sd_session_is_active.xml +++ b/man/sd_session_is_active.xml @@ -21,7 +21,9 @@ <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_start_time</refname> <refname>sd_session_get_service</refname> <refname>sd_session_get_type</refname> <refname>sd_session_get_class</refname> @@ -61,12 +63,24 @@ </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> </funcprototype> <funcprototype> + <funcdef>int <function>sd_session_get_start_time</function></funcdef> + <paramdef>const char *<parameter>session</parameter></paramdef> + <paramdef>uint64_t *<parameter>usec</parameter></paramdef> + </funcprototype> + + <funcprototype> <funcdef>int <function>sd_session_get_service</function></funcdef> <paramdef>const char *<parameter>session</parameter></paramdef> <paramdef>char **<parameter>service</parameter></paramdef> @@ -155,6 +169,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 @@ -164,6 +185,10 @@ <citerefentry project='man-pages'><refentrytitle>free</refentrytitle><manvolnum>3</manvolnum></citerefentry> call after use.</para> + <para><function>sd_session_get_start_time()</function> may be used to + determine the start time of the session identified by the specified + session identifier belongs to.</para> + <para><function>sd_session_get_service()</function> may be used to determine the name of the service (as passed during PAM session setup) that registered the session identified by the specified @@ -252,6 +277,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>, |