diff --git a/Makefile-man.am b/Makefile-man.am
index 4a0d339ac2b..35174cca5fb 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -20,7 +20,10 @@ MANPAGES += \
man/sd-id128.3 \
man/sd-journal.3 \
man/sd_booted.3 \
+ man/sd_bus_creds_get_pid.3 \
man/sd_bus_message_get_cookie.3 \
+ man/sd_bus_new.3 \
+ man/sd_bus_open_user.3 \
man/sd_bus_request_name.3 \
man/sd_id128_get_machine.3 \
man/sd_id128_randomize.3 \
@@ -135,8 +138,38 @@ MANPAGES_ALIAS += \
man/init.1 \
man/poweroff.8 \
man/reboot.8 \
+ man/sd_bus_creds_get_audit_login_uid.3 \
+ man/sd_bus_creds_get_audit_session_id.3 \
+ man/sd_bus_creds_get_cgroup.3 \
+ man/sd_bus_creds_get_cmdline.3 \
+ man/sd_bus_creds_get_comm.3 \
+ man/sd_bus_creds_get_exe.3 \
+ man/sd_bus_creds_get_gid.3 \
+ man/sd_bus_creds_get_owner_uid.3 \
+ man/sd_bus_creds_get_pid_starttime.3 \
+ man/sd_bus_creds_get_selinux_context.3 \
+ man/sd_bus_creds_get_session.3 \
+ man/sd_bus_creds_get_slice.3 \
+ man/sd_bus_creds_get_tid.3 \
+ man/sd_bus_creds_get_tid_comm.3 \
+ man/sd_bus_creds_get_uid.3 \
+ man/sd_bus_creds_get_unique_name.3 \
+ man/sd_bus_creds_get_unit.3 \
+ man/sd_bus_creds_get_user_unit.3 \
+ man/sd_bus_creds_get_well_known_names.3 \
+ man/sd_bus_creds_has_bounding_cap.3 \
+ man/sd_bus_creds_has_effective_cap.3 \
+ man/sd_bus_creds_has_inheritable_cap.3 \
+ man/sd_bus_creds_has_permitted_cap.3 \
+ man/sd_bus_default_system.3 \
+ man/sd_bus_default_user.3 \
man/sd_bus_message_get_reply_cookie.3 \
+ man/sd_bus_open_system.3 \
+ man/sd_bus_open_system_container.3 \
+ man/sd_bus_open_system_remote.3 \
+ man/sd_bus_ref.3 \
man/sd_bus_release_name.3 \
+ man/sd_bus_unref.3 \
man/sd_id128_equal.3 \
man/sd_id128_from_string.3 \
man/sd_id128_get_boot.3 \
@@ -239,8 +272,38 @@ man/SD_WARNING.3: man/sd-daemon.3
man/init.1: man/systemd.1
man/poweroff.8: man/halt.8
man/reboot.8: man/halt.8
+man/sd_bus_creds_get_audit_login_uid.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_audit_session_id.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_cgroup.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_cmdline.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_comm.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_exe.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_gid.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_owner_uid.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_pid_starttime.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_selinux_context.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_session.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_slice.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_tid.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_tid_comm.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_uid.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_unique_name.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_unit.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_user_unit.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_get_well_known_names.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_has_bounding_cap.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_has_effective_cap.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_has_inheritable_cap.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_creds_has_permitted_cap.3: man/sd_bus_creds_get_pid.3
+man/sd_bus_default_system.3: man/sd_bus_open_user.3
+man/sd_bus_default_user.3: man/sd_bus_open_user.3
man/sd_bus_message_get_reply_cookie.3: man/sd_bus_message_get_cookie.3
+man/sd_bus_open_system.3: man/sd_bus_open_user.3
+man/sd_bus_open_system_container.3: man/sd_bus_open_user.3
+man/sd_bus_open_system_remote.3: man/sd_bus_open_user.3
+man/sd_bus_ref.3: man/sd_bus_new.3
man/sd_bus_release_name.3: man/sd_bus_request_name.3
+man/sd_bus_unref.3: man/sd_bus_new.3
man/sd_id128_equal.3: man/sd-id128.3
man/sd_id128_from_string.3: man/sd_id128_to_string.3
man/sd_id128_get_boot.3: man/sd_id128_get_machine.3
@@ -399,12 +462,102 @@ man/poweroff.html: man/halt.html
man/reboot.html: man/halt.html
$(html-alias)
+man/sd_bus_creds_get_audit_login_uid.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_audit_session_id.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_cgroup.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_cmdline.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_comm.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_exe.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_gid.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_owner_uid.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_pid_starttime.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_selinux_context.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_session.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_slice.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_tid.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_tid_comm.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_uid.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_unique_name.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_unit.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_user_unit.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_get_well_known_names.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_has_bounding_cap.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_has_effective_cap.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_has_inheritable_cap.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_creds_has_permitted_cap.html: man/sd_bus_creds_get_pid.html
+ $(html-alias)
+
+man/sd_bus_default_system.html: man/sd_bus_open_user.html
+ $(html-alias)
+
+man/sd_bus_default_user.html: man/sd_bus_open_user.html
+ $(html-alias)
+
man/sd_bus_message_get_reply_cookie.html: man/sd_bus_message_get_cookie.html
$(html-alias)
+man/sd_bus_open_system.html: man/sd_bus_open_user.html
+ $(html-alias)
+
+man/sd_bus_open_system_container.html: man/sd_bus_open_user.html
+ $(html-alias)
+
+man/sd_bus_open_system_remote.html: man/sd_bus_open_user.html
+ $(html-alias)
+
+man/sd_bus_ref.html: man/sd_bus_new.html
+ $(html-alias)
+
man/sd_bus_release_name.html: man/sd_bus_request_name.html
$(html-alias)
+man/sd_bus_unref.html: man/sd_bus_new.html
+ $(html-alias)
+
man/sd_id128_equal.html: man/sd-id128.html
$(html-alias)
@@ -1112,7 +1265,10 @@ EXTRA_DIST += \
man/sd-login.xml \
man/sd-readahead.xml \
man/sd_booted.xml \
+ man/sd_bus_creds_get_pid.xml \
man/sd_bus_message_get_cookie.xml \
+ man/sd_bus_new.xml \
+ man/sd_bus_open_user.xml \
man/sd_bus_request_name.xml \
man/sd_get_seats.xml \
man/sd_id128_get_machine.xml \
diff --git a/man/sd_bus_creds_get_pid.xml b/man/sd_bus_creds_get_pid.xml
new file mode 100644
index 00000000000..9de5001d491
--- /dev/null
+++ b/man/sd_bus_creds_get_pid.xml
@@ -0,0 +1,445 @@
+
+
+
+
+
+
+
+
+ sd_bus_creds_get_pid
+ systemd
+
+
+
+ A monkey with a typewriter
+ Zbigniew
+ Jędrzejewski-Szmek
+ zbyszek@in.waw.pl
+
+
+
+
+
+ sd_bus_creds_get_pid
+ 3
+
+
+
+ sd_bus_creds_get_pid
+ sd_bus_creds_get_pid_starttime
+ sd_bus_creds_get_tid
+ sd_bus_creds_get_uid
+ sd_bus_creds_get_gid
+ sd_bus_creds_get_comm
+ sd_bus_creds_get_tid_comm
+ sd_bus_creds_get_exe
+ 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_session
+ sd_bus_creds_get_owner_uid
+ sd_bus_creds_has_effective_cap
+ sd_bus_creds_has_permitted_cap
+ sd_bus_creds_has_inheritable_cap
+ sd_bus_creds_has_bounding_cap
+ sd_bus_creds_get_selinux_context
+ sd_bus_creds_get_audit_session_id
+ sd_bus_creds_get_audit_login_uid
+ sd_bus_creds_get_unique_name
+ sd_bus_creds_get_well_known_names
+
+ Retrieve fields from a credentials object
+
+
+
+
+ #include <systemd/sd-bus.h>
+
+
+ int sd_bus_creds_get_pid
+ sd_bus_creds* c
+ pid_t *pid
+
+
+
+ int sd_bus_creds_get_pid_starttime
+ sd_bus_creds* c
+ uint64_t *usec
+
+
+
+ int sd_bus_creds_get_tid
+ sd_bus_creds* c
+ pid_t *tid
+
+
+
+ int sd_bus_creds_get_pid
+ sd_bus_creds* c
+ uid_t *uid
+
+
+
+ int sd_bus_creds_get_gid
+ sd_bus_creds* c
+ gid_t *gid
+
+
+
+ int sd_bus_creds_get_comm
+ sd_bus_creds* c
+ const char **comm
+
+
+
+ int sd_bus_creds_get_tid_comm
+ sd_bus_creds* c
+ const char **comm
+
+
+
+ int sd_bus_creds_get_exe
+ sd_bus_creds* c
+ const char **exe
+
+
+
+ int sd_bus_creds_get_cmdline
+ sd_bus_creds* c
+ char ***cmdline
+
+
+
+ int sd_bus_creds_get_cgroup
+ sd_bus_creds* c
+ const char **cgroup
+
+
+
+ int sd_bus_creds_get_unit
+ sd_bus_creds* c
+ const char **unit
+
+
+
+ int sd_bus_creds_get_user_unit
+ sd_bus_creds* c
+ const char **unit
+
+
+
+ int sd_bus_creds_get_slice
+ sd_bus_creds* c
+ const char **slice
+
+
+
+ int sd_bus_creds_get_session
+ sd_bus_creds* c
+ const char **slice
+
+
+
+ int sd_bus_creds_get_owner_uid
+ sd_bus_creds* c
+ uid_t *uid
+
+
+
+ int sd_bus_creds_has_effective_cap
+ sd_bus_creds* c
+ int capability
+
+
+
+ int sd_bus_creds_has_permitted_cap
+ sd_bus_creds* c
+ int capability
+
+
+
+ int sd_bus_creds_has_inheritable_cap
+ sd_bus_creds* c
+ int capability
+
+
+
+ int sd_bus_creds_has_bounding_cap
+ sd_bus_creds* c
+ int capability
+
+
+
+ int sd_bus_creds_get_selinux_context
+ sd_bus_creds* c
+ const char **context
+
+
+
+ int sd_bus_creds_get_audit_session_id
+ sd_bus_creds* c
+ uint32_t *sessionid
+
+
+
+ int sd_bus_creds_get_audit_login_uid
+ sd_bus_creds* c
+ uid_t *loginuid
+
+
+
+ int sd_bus_creds_get_unique_name
+ sd_bus_creds* c
+ const char **name
+
+
+
+ int sd_bus_creds_get_well_known_names
+ sd_bus_creds* c
+ char ***name
+
+
+
+
+
+
+ Description
+
+ Those functions return information from an
+ sd_bus_creds object. It may be created with
+ sd_bus_creds_new_from_pid3,
+ in which case it will describe the specified process, or it may be
+ created by
+ sd_bus_get_peer_creds3,
+ in which case it will describe the process at the other endpoint
+ of a connection.
+
+
+ sd_bus_creds_get_pid will retrieve the
+ PID (process identifier).
+
+ sd_bus_creds_get_pid_starttime will
+ retrieve the time since the start of the epoch in microseconds
+ since the process was started.
+
+ sd_bus_creds_get_tid will retrieve the
+ TID (thread identifier).
+
+ sd_bus_creds_get_uid will retrieve the
+ UID (user identifier).
+
+ sd_bus_creds_get_gid will retrieve the
+ GID (group identifier).
+
+ sd_bus_creds_get_comm will retrieve the
+ comm field (name of the executable, as stored in
+ /proc/pid/comm).
+
+
+ sd_bus_creds_get_tid_comm will retrieve
+ the comm field of the thread (as stored in
+ /proc/pid/task/tid/comm).
+
+
+ sd_bus_creds_get_exe will retrieve the
+ path to the program (as stored in the
+ /proc/pid/exe
+ link, but with (deleted) suffix removed).
+
+
+ sd_bus_creds_get_cmdline will retrieve
+ an array of command-line arguments (as stored in
+ /proc/pid/cmdline).
+
+
+ sd_bus_creds_get_cgroup will retrieve
+ the cgroup path. See cgroups.txt.
+
+
+ sd_bus_creds_get_unit will retrieve the
+ systemd unit name (in the system instance of systemd) that the
+ process is part of. See
+ systemd.unit5.
+
+
+ sd_bus_creds_get_user_unit will
+ retrieve the systemd unit name (in the user instance of systemd)
+ that the process is part of. See
+ systemd.unit5.
+
+
+ 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.
+
+
+ sd_bus_creds_get_session will retrieve
+ the logind session that the process is part of. See
+ systemd-logind.service8.
+
+
+ sd_bus_creds_get_owner_uid will retrieve
+ the UID (user identifier) of the user who owns the slice
+ that the process is part of. See
+ systemd.slice5
+ .
+
+
+ sd_bus_creds_has_effective_cap will
+ check whether all of the capabilities specified by
+ capability were set in the effective
+ capabilities mask. A positive return value means that they were
+ set, zero means that they were not set, and a negative return
+ value signifies an error. See
+ capabilities7
+ and Capabilities= and
+ CapabilityBoundingSet= settings in
+ systemd.exec5.
+
+
+ sd_bus_creds_has_permitted_cap is
+ similar to sd_bus_creds_has_effective_cap,
+ but will check the permitted capabilities mask.
+
+ sd_bus_creds_has_inheritable_cap is
+ similar to sd_bus_creds_has_effective_cap,
+ but will check the inheritable capabilities mask.
+
+ sd_bus_creds_has_bounding_cap is
+ similar to sd_bus_creds_has_effective_cap,
+ but will check the bounding capabilities mask.
+
+ sd_bus_creds_get_selinux_context will
+ retrieve the SELinux context of the process.
+
+ sd_bus_creds_get_audit_session_id will
+ retrieve the audit session identifier of the process.
+
+ sd_bus_creds_get_audit_login_uid will
+ retrieve the audit user login identifier (the identifier of the
+ user who is "responsible" for the session).
+
+ sd_bus_creds_get_unique_name will
+ retrieve the D-Bus unique name. See The
+ D-Bus specification.
+
+ sd_bus_creds_get_well_known_names will
+ retrieve the set of D-Bus well-known names. See The
+ D-Bus specification.
+
+ All functions that take a const
+ char** parameter will store the answer there as an
+ address of a NUL-terminated string. It will be valid as long as
+ c remains valid, and should not be freed or
+ modified by the caller.
+
+ All functions that take a char***
+ parameter will store the answer there as an address of a an array
+ of strings. Each invidividual string is NUL-terminated, and the
+ array is NULL-terminated as a whole. It will be valid as long as
+ c remains valid, and should not be freed or
+ modified by the caller.
+
+
+
+ Return Value
+
+ On success, these calls return 0 or a positive integer. On
+ failure, these calls return a negative errno-style error code.
+
+
+
+
+ Errors
+
+ Returned errors may indicate the following problems:
+
+
+
+ -ENODATA
+
+ Given field is not available in
+ c.
+
+
+
+
+ -ENOENT
+
+ Given field is not specified for the sender.
+ This will be returned by sd_bus_get_unit,
+ sd_bus_get_user_unit,
+ sd_bus_get_slice,
+ sd_bus_get_session, and
+ sd_bus_get_owner_uid if the sender is not
+ part of a systemd system unit, systemd user unit, systemd
+ slice, logind session, or a systemd user session.
+
+
+
+
+ -EINVAL
+
+ Specified pointer parameter is NULL.
+
+
+
+
+ -ENOMEM
+
+ Memory allocation failed.
+
+
+
+
+
+ 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-bus pkg-config1
+ file.
+
+
+
+ See Also
+
+
+ systemd1,
+ sd-bus3,
+ credentials7,
+ fork2,
+ execve2,
+ free3,
+ proc5,
+ systemd.journald-fields7
+
+
+
+
diff --git a/man/sd_bus_new.xml b/man/sd_bus_new.xml
new file mode 100644
index 00000000000..1931424b86c
--- /dev/null
+++ b/man/sd_bus_new.xml
@@ -0,0 +1,145 @@
+
+
+
+
+
+
+
+
+ sd_bus_new
+ systemd
+
+
+
+ A monkey with a typewriter
+ Zbigniew
+ Jędrzejewski-Szmek
+ zbyszek@in.waw.pl
+
+
+
+
+
+ sd_bus_new
+ 3
+
+
+
+ sd_bus_new
+ sd_bus_ref
+ sd_bus_unref
+
+ Create a new bus object and create or destroy references to it
+
+
+
+
+ #include <systemd/sd-bus.h>
+
+
+ int sd_bus_new
+ sd_bus** bus
+
+
+
+ sd_bus* sd_bus_ref
+ sd_bus* bus
+
+
+
+ sd_bus* sd_bus_unref
+ sd_bus* bus
+
+
+
+
+
+ Description
+
+ sd_bus_new() creates a new bus
+ object. This object is reference counted, and will be destroyed
+ when all references are gone. Initially, the caller of this
+ function owns the sole reference.
+
+ sd_bus_ref() creates a new reference to
+ bus. This bus object will not be destroyed
+ until sd_bus_unref() has been called as many
+ times plus once more. Once the reference count has dropped to
+ zero, bus cannot be used anymore, so
+ further calls to sd_bus_ref() or
+ sd_bus_unref() are illegal.
+
+ sd_bus_unref() destroyes a reference to
+ bus.
+
+
+
+ Return Value
+
+ On success, sd_bus_new() returns 0 or a
+ positive integer. On failure, it returns a negative errno-style
+ error code.
+
+ sd_bus_ref always returns the argument.
+
+
+ sd_bus_unref always returns
+ NULL.
+
+
+
+ Errors
+
+ Returned errors may indicate the following problems:
+
+
+
+ -ENOMEM
+
+ Memory allocation failed.
+
+
+
+
+
+ Notes
+
+ sd_bus_new() and other functions
+ described here are available as a shared library, which can be
+ compiled and linked to with the
+ libsystemd-bus pkg-config1
+ file.
+
+
+
+ See Also
+
+
+ systemd1,
+ sd-bus3,
+ sd_bus_open_user3,
+ sd_bus_open_system3,
+ sd_bus_default_user3,
+ sd_bus_default_system3
+
+
+
+
diff --git a/man/sd_bus_open_user.xml b/man/sd_bus_open_user.xml
new file mode 100644
index 00000000000..62b856993d2
--- /dev/null
+++ b/man/sd_bus_open_user.xml
@@ -0,0 +1,217 @@
+
+
+
+
+
+
+
+
+ sd_bus_open_user
+ systemd
+
+
+
+ A monkey with a typewriter
+ Zbigniew
+ Jędrzejewski-Szmek
+ zbyszek@in.waw.pl
+
+
+
+
+
+ sd_bus_open_user
+ 3
+
+
+
+ sd_bus_open_user
+ sd_bus_open_system
+ sd_bus_open_system_remote
+ sd_bus_open_system_container
+
+ sd_bus_default_user
+ sd_bus_default_system
+
+ Open a connection to the system or user bus
+
+
+
+
+ #include <systemd/sd-bus.h>
+
+
+ int sd_bus_open_user
+ sd_bus** bus
+
+
+
+ int sd_bus_open_system
+ sd_bus** bus
+
+
+
+ int sd_bus_open_system_remote
+ const char *host
+ sd_bus** bus
+
+
+
+ int sd_bus_open_system_container
+ const char *machine
+ sd_bus** bus
+
+
+
+ int sd_bus_default_user
+ sd_bus** bus
+
+
+
+ int sd_bus_default_system
+ sd_bus** bus
+
+
+
+
+
+ Description
+
+ sd_bus_open_user() creates a new bus
+ object and opens a connection to the the user bus.
+ sd_bus_open_system() does the same, but
+ connects to the system bus.
+
+ If $DBUS_SESSION_BUS_ADDRESS environment
+ variable is set
+ (c.f. environ7),
+ it will be used as the address of the user bus. This variable can
+ contain multiple addresses separated by ;. If
+ this variable is not set, a suitable default for the default user
+ D-Bus instance will be used.
+
+ If $DBUS_SYSTEM_BUS_ADDRESS environment
+ variable is set, it will be used as the address of the system
+ bus. This variable uses the same syntax as
+ $DBUS_SESSION_BUS_ADDRESS/. If this variable is
+ not set, a suitable default for the default system D-Bus instance
+ will be used.
+
+ sd_bus_open_system_remote() connects to
+ the system bus on the specified host using
+ SSH. host consists of an optional user name
+ followed by the @ symbol, and the hostname.
+
+
+ sd_bus_open_system_remote() connects to
+ the system bus in the specified machine,
+ where machine is the name of a container.
+ See
+ machinectl1
+ for more information about "machines".
+
+ sd_bus_default_user() returns a bus
+ object connected to the user bus. This bus object is shared
+ per-thread. It is created on the first invocation of
+ sd_bus_default_user(), and subsequent
+ invocations returns a reference to the same object.
+
+ sd_bus_default_system() is similar to
+ sd_bus_default_user(), but connects to the
+ system bus.
+
+
+
+ Return Value
+
+ On success, these calls return 0 or a positive
+ integer. On failure, these calls return a negative
+ errno-style error code.
+
+
+
+ Reference ownership
+ Functions sd_bus_open_user(),
+ sd_bus_open_system(),
+ sd_bus_open_system_remote(), and
+ sd_bus_open_system_machine() return a new
+ object and the caller owns the sole reference. When not needed
+ anymore, this reference should be destroyed with
+ sd_bus_unref3.
+
+
+ Functions sd_bus_default_user() and
+ sd_bus_default_system() do not create a new
+ reference.
+
+
+
+ Errors
+
+ Returned errors may indicate the following problems:
+
+
+
+
+ -EINVAL
+
+ Specified parameter is invalid
+ (NULL in case of output
+ parameters).
+
+
+
+ -ENOMEM
+
+ Memory allocation failed.
+
+
+ In addition, any further connection-related errors may be
+ by returned. See sd_bus_send3.
+
+
+
+
+ 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-bus pkg-config1
+ file.
+
+
+
+ See Also
+
+
+ systemd1,
+ sd-bus3,
+ sd_bus_new3,
+ sd_bus_ref3,
+ sd_bus_unref3,
+ ssh1,
+ systemd-machined.service8,
+ machinectl1
+
+
+
+
diff --git a/src/libsystemd-bus/sd-bus.c b/src/libsystemd-bus/sd-bus.c
index 61dc0e56a88..c2f77a990fe 100644
--- a/src/libsystemd-bus/sd-bus.c
+++ b/src/libsystemd-bus/sd-bus.c
@@ -1234,7 +1234,7 @@ _public_ void sd_bus_close(sd_bus *bus) {
/* We'll leave the fd open in case this is a kernel bus, since
* there might still be memblocks around that reference this
- * bus, and they might need to invoke the * KDBUS_CMD_FREE
+ * bus, and they might need to invoke the KDBUS_CMD_FREE
* ioctl on the fd when they are freed. */
}
diff --git a/src/systemd/sd-bus.h b/src/systemd/sd-bus.h
index b3b92ad612e..1134b584377 100644
--- a/src/systemd/sd-bus.h
+++ b/src/systemd/sd-bus.h
@@ -286,11 +286,11 @@ int sd_bus_creds_get_pid_starttime(sd_bus_creds *c, uint64_t *usec);
int sd_bus_creds_get_tid(sd_bus_creds *c, pid_t *tid);
int sd_bus_creds_get_uid(sd_bus_creds *c, uid_t *uid);
int sd_bus_creds_get_gid(sd_bus_creds *c, gid_t *gid);
-int sd_bus_creds_get_comm(sd_bus_creds *c, const char **r);
-int sd_bus_creds_get_tid_comm(sd_bus_creds *c, const char **r);
-int sd_bus_creds_get_exe(sd_bus_creds *c, const char **r);
+int sd_bus_creds_get_comm(sd_bus_creds *c, const char **comm);
+int sd_bus_creds_get_tid_comm(sd_bus_creds *c, const char **comm);
+int sd_bus_creds_get_exe(sd_bus_creds *c, const char **exe);
int sd_bus_creds_get_cmdline(sd_bus_creds *c, char ***cmdline);
-int sd_bus_creds_get_cgroup(sd_bus_creds *c, const char **r);
+int sd_bus_creds_get_cgroup(sd_bus_creds *c, const char **cgroup);
int sd_bus_creds_get_unit(sd_bus_creds *c, const char **unit);
int sd_bus_creds_get_user_unit(sd_bus_creds *c, const char **unit);
int sd_bus_creds_get_slice(sd_bus_creds *c, const char **slice);
@@ -300,7 +300,7 @@ int sd_bus_creds_has_effective_cap(sd_bus_creds *c, int capability);
int sd_bus_creds_has_permitted_cap(sd_bus_creds *c, int capability);
int sd_bus_creds_has_inheritable_cap(sd_bus_creds *c, int capability);
int sd_bus_creds_has_bounding_cap(sd_bus_creds *c, int capability);
-int sd_bus_creds_get_selinux_context(sd_bus_creds *c, const char **r);
+int sd_bus_creds_get_selinux_context(sd_bus_creds *c, const char **context);
int sd_bus_creds_get_audit_session_id(sd_bus_creds *c, uint32_t *sessionid);
int sd_bus_creds_get_audit_login_uid(sd_bus_creds *c, uid_t *loginuid);
int sd_bus_creds_get_unique_name(sd_bus_creds *c, const char **name);