From f6f7a9848e27fbc1748aec9264e58a2aeaf736db Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 23 Jun 2015 20:42:57 +0200 Subject: man: fully document sd_bus_creds subsystem [@zonque: typo fixed, reported by @ronnychevalier] --- man/sd_bus_creds_get_pid.xml | 59 +++++++++++++++++++++++++++++--------------- 1 file changed, 39 insertions(+), 20 deletions(-) (limited to 'man/sd_bus_creds_get_pid.xml') diff --git a/man/sd_bus_creds_get_pid.xml b/man/sd_bus_creds_get_pid.xml index 13f885cd5d..4162fab065 100644 --- a/man/sd_bus_creds_get_pid.xml +++ b/man/sd_bus_creds_get_pid.xml @@ -61,8 +61,9 @@ sd_bus_creds_get_cmdline sd_bus_creds_get_cgroup sd_bus_creds_get_unit - sd_bus_creds_get_user_unit sd_bus_creds_get_slice + sd_bus_creds_get_user_unit + sd_bus_creds_get_user_slice sd_bus_creds_get_session sd_bus_creds_get_owner_uid sd_bus_creds_has_effective_cap @@ -192,6 +193,12 @@ const char **unit + + int sd_bus_creds_get_slice + sd_bus_creds *c + const char **slice + + int sd_bus_creds_get_user_unit sd_bus_creds *c @@ -199,7 +206,7 @@ - int sd_bus_creds_get_slice + int sd_bus_creds_get_user_slice sd_bus_creds *c const char **slice @@ -288,9 +295,9 @@ Description - These functions return information from an - sd_bus_creds credential object. Credential - objects may be created with + These functions return credential information from an + sd_bus_creds object. Credential objects may + be created with sd_bus_creds_new_from_pid3, in which case they describe the credentials of the process identified by the specified PID, with @@ -301,7 +308,13 @@ in which case they describe the credentials of the creator of a bus, or with sd_bus_message_get_creds3, - in which case they describe the credentials of the sender of the message. + in which case they describe the credentials of the sender of the + message. + + Not all credential fields are part of every + sd_bus_creds object. Use + sd_bus_creds_get_mask3 + to determine the mask of fields available. sd_bus_creds_get_pid() will retrieve the PID (process identifier). Similar, @@ -374,19 +387,22 @@ sd_bus_creds_get_slice() will retrieve the systemd slice (a unit in the system instance of systemd) that the process is part of. See - systemd.slice5. + systemd.slice5. Similar, + sd_bus_creds_get_user_slice() retrieves the + systemd slice of the process, in the user instance of systemd. sd_bus_creds_get_session() will - retrieve the logind session that the process is part of. See + retrieve the identifier of the login session that the process is + part of. See systemd-logind.service8. For processes that are not part of a session returns -ENXIO. sd_bus_creds_get_owner_uid() will retrieve the numeric UID (user identifier) of the user who owns - the session that the process is part of. See - systemd.slice5 + the login session that the process is part of. See + systemd-logind.service8. For processes that are not part of a session returns -ENXIO. @@ -395,7 +411,7 @@ capability was set in the effective capabilities mask. A positive return value means that is was set, zero means that it was not set, and a negative return - value signifies an error. See + value indicates an error. See capabilities7 and Capabilities= and CapabilityBoundingSet= settings in @@ -427,8 +443,8 @@ processes that are not part of an audit session. sd_bus_creds_get_tty() will retrieve - the controlling TTY. Returns -ENXIO for processes that have no - controlling TTY. + the controlling TTY, without the prefixing "/dev/". Returns -ENXIO + for processes that have no controlling TTY. sd_bus_creds_get_unique_name() will retrieve the D-Bus unique name. See Given field is not specified for the described process or peer. This will be returned by sd_bus_get_unit(), - sd_bus_get_user_unit(), sd_bus_get_slice(), + sd_bus_get_user_unit(), + sd_bus_get_user_slice(), sd_bus_get_session(), and sd_bus_get_owner_uid() if the process is not part of a systemd system unit, systemd user unit, systemd @@ -526,10 +543,11 @@ Notes - sd_bus_open_user() and other functions - described here are available as a shared library, which can be - compiled and linked to with the - libsystemd pkg-config1 + sd_bus_creds_get_pid() and the other + functions described here are available as a shared library, which + can be compiled and linked to with the + libsystemd pkg-config1 file. @@ -539,8 +557,9 @@ systemd1, sd-bus3, - fork2, - execve2, + sd_bus_creds_new_from_pid2, + fork2, + execve2, credentials7, free3, proc5, -- cgit v1.2.3-54-g00ecf