summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-03-17 18:14:26 +0100
committerLennart Poettering <lennart@poettering.net>2014-03-17 18:15:57 +0100
commitbf34ab149f3038686bc75e1592179abac1700322 (patch)
tree42a953b9e17ef1614a890f699f245c84bd6a831b /man
parent7366b080b324caf66e2ca1671f8ce7f57ace7553 (diff)
sd-login: add calls that retrieve credentials of peers connected to AF_UNIX peers
This is supposed to be an extension of SO_PEERCRED and SO_PEERSEC, except for cgroup information.
Diffstat (limited to 'man')
-rw-r--r--man/sd_pid_get_session.xml68
1 files changed, 63 insertions, 5 deletions
diff --git a/man/sd_pid_get_session.xml b/man/sd_pid_get_session.xml
index 1e762f450b..a8266e0206 100644
--- a/man/sd_pid_get_session.xml
+++ b/man/sd_pid_get_session.xml
@@ -49,9 +49,15 @@
<refname>sd_pid_get_owner_uid</refname>
<refname>sd_pid_get_machine_name</refname>
<refname>sd_pid_get_slice</refname>
+ <refname>sd_peer_get_session</refname>
+ <refname>sd_peer_get_unit</refname>
+ <refname>sd_peer_get_user_unit</refname>
+ <refname>sd_peer_get_owner_uid</refname>
+ <refname>sd_peer_get_machine_name</refname>
+ <refname>sd_peer_get_slice</refname>
<refpurpose>Determine session, service, owner of a
session, container/VM or slice of a specific
- PID</refpurpose>
+ PID or socket peer</refpurpose>
</refnamediv>
<refsynopsisdiv>
@@ -93,6 +99,42 @@
<paramdef>pid_t <parameter>pid</parameter></paramdef>
<paramdef>char** <parameter>slice</parameter></paramdef>
</funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_peer_get_session</function></funcdef>
+ <paramdef>int <parameter>fd</parameter></paramdef>
+ <paramdef>char** <parameter>session</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_peer_get_unit</function></funcdef>
+ <paramdef>int <parameter>fd</parameter></paramdef>
+ <paramdef>char** <parameter>unit</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_peer_get_user_unit</function></funcdef>
+ <paramdef>int <parameter>fd</parameter></paramdef>
+ <paramdef>char** <parameter>unit</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_peer_get_owner_uid</function></funcdef>
+ <paramdef>int <parameter>fd</parameter></paramdef>
+ <paramdef>uid_t* <parameter>uid</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_peer_get_machine_name</function></funcdef>
+ <paramdef>int <parameter>fd</parameter></paramdef>
+ <paramdef>char** <parameter>name</parameter></paramdef>
+ </funcprototype>
+
+ <funcprototype>
+ <funcdef>int <function>sd_peer_get_slice</function></funcdef>
+ <paramdef>int <parameter>fd</parameter></paramdef>
+ <paramdef>char** <parameter>slice</parameter></paramdef>
+ </funcprototype>
</funcsynopsis>
</refsynopsisdiv>
@@ -167,6 +209,16 @@
<para>If the <varname>pid</varname> parameter of any
of these functions is passed as 0, the operation is
executed for the calling process.</para>
+
+ <para>The <function>sd_peer_get_session()</function>,
+ <function>sd_peer_get_unit()</function>,
+ <function>sd_peer_get_user_unit()</function>,
+ <function>sd_peer_get_owner_uid()</function>,
+ <function>sd_peer_get_machine_name()</function> and
+ <function>sd_peer_get_slice()</function> calls operate
+ similar to their PID counterparts, but operate on a
+ connected AF_UNIX socket and retrieve information
+ about the connected peer process.</para>
</refsect1>
<refsect1>
@@ -184,10 +236,16 @@
<function>sd_pid_get_unit()</function>,
<function>sd_pid_get_user_unit()</function>,
<function>sd_pid_get_owner_uid()</function>,
- <function>sd_pid_get_machine_name()</function> and
- <function>sd_pid_get_slice()</function> interfaces are
- available as a shared library, which can be compiled and
- linked to with the
+ <function>sd_pid_get_machine_name()</function>,
+ <function>sd_pid_get_slice()</function>,
+ <function>sd_peer_get_session()</function>,
+ <function>sd_peer_get_unit()</function>,
+ <function>sd_peer_get_user_unit()</function>,
+ <function>sd_peer_get_owner_uid()</function>,
+ <function>sd_peer_get_machine_name()</function> and
+ <function>sd_peer_get_slice()</function> interfaces are
+ available as a shared library, which can be compiled
+ and linked to with the
<constant>libsystemd</constant> <citerefentry><refentrytitle>pkg-config</refentrytitle><manvolnum>1</manvolnum></citerefentry>
file.</para>