From: Lennart Poettering Date: Tue, 18 Mar 2014 20:05:16 +0000 (+0100) Subject: man: dcument sd_bus_negotiate_fds() and friends X-Git-Tag: v212~105 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=ce236b57bee9a081d62db04bcc5be34e3ba6d217;ds=sidebyside man: dcument sd_bus_negotiate_fds() and friends --- diff --git a/Makefile-man.am b/Makefile-man.am index 079ba63e7..d772defb8 100644 --- a/Makefile-man.am +++ b/Makefile-man.am @@ -698,6 +698,7 @@ MANPAGES += \ man/sd_bus_message_append_strv.3 \ man/sd_bus_message_get_cookie.3 \ man/sd_bus_message_get_monotonic_usec.3 \ + man/sd_bus_negotiate_fds.3 \ man/sd_bus_new.3 \ man/sd_bus_open_user.3 \ man/sd_bus_path_encode.3 \ @@ -750,6 +751,8 @@ MANPAGES_ALIAS += \ man/sd_bus_message_get_realtime_usec.3 \ man/sd_bus_message_get_reply_cookie.3 \ man/sd_bus_message_get_seqnum.3 \ + man/sd_bus_negotiate_creds.3 \ + man/sd_bus_negotiate_timestamps.3 \ man/sd_bus_open_system.3 \ man/sd_bus_open_system_container.3 \ man/sd_bus_open_system_remote.3 \ @@ -803,6 +806,8 @@ man/sd_bus_message_append_string_space.3: man/sd_bus_message_append_string_memfd man/sd_bus_message_get_realtime_usec.3: man/sd_bus_message_get_monotonic_usec.3 man/sd_bus_message_get_reply_cookie.3: man/sd_bus_message_get_cookie.3 man/sd_bus_message_get_seqnum.3: man/sd_bus_message_get_monotonic_usec.3 +man/sd_bus_negotiate_creds.3: man/sd_bus_negotiate_fds.3 +man/sd_bus_negotiate_timestamps.3: man/sd_bus_negotiate_fds.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 @@ -946,6 +951,12 @@ man/sd_bus_message_get_reply_cookie.html: man/sd_bus_message_get_cookie.html man/sd_bus_message_get_seqnum.html: man/sd_bus_message_get_monotonic_usec.html $(html-alias) +man/sd_bus_negotiate_creds.html: man/sd_bus_negotiate_fds.html + $(html-alias) + +man/sd_bus_negotiate_timestamps.html: man/sd_bus_negotiate_fds.html + $(html-alias) + man/sd_bus_open_system.html: man/sd_bus_open_user.html $(html-alias) @@ -1430,6 +1441,7 @@ EXTRA_DIST += \ man/sd_bus_message_append_strv.xml \ man/sd_bus_message_get_cookie.xml \ man/sd_bus_message_get_monotonic_usec.xml \ + man/sd_bus_negotiate_fds.xml \ man/sd_bus_new.xml \ man/sd_bus_open_user.xml \ man/sd_bus_path_encode.xml \ diff --git a/man/sd_bus_negotiate_fds.xml b/man/sd_bus_negotiate_fds.xml new file mode 100644 index 000000000..38e1fad68 --- /dev/null +++ b/man/sd_bus_negotiate_fds.xml @@ -0,0 +1,176 @@ + + + + + + + + + sd_bus_new + systemd + + + + Developer + Lennart + Poettering + lennart@poettering.net + + + + + + sd_bus_negotiate_fds + 3 + + + + sd_bus_negotiate_fds + sd_bus_negotiate_timestamps + sd_bus_negotiate_creds + + Control feature negotiation on bus connections + + + + + #include <systemd/sd-bus.h> + + + int sd_bus_negotiate_fds + sd_bus *bus + int b + + + + int sd_bus_negotiate_timestamp + sd_bus *bus + int b + + + + int sd_bus_negotiate_creds + sd_bus *bus + int b + + + + + + Description + + sd_bus_negotiate_fds() controls whether + file descriptor passing shall be negotiated for the specified bus + connection. Takes a bus object and a boolean, which when true + enables file descriptor passing, and when false disables it. Note + that not all transports and servers support file descriptor + passing. To find out whether file descriptor passing is available + after negotiation use + sd_bus_can_send3 + and pass SD_BUS_TYPE_UNIX_FD. Note that file + descriptor passing is always enabled for both sending and + receiving or for neither, but never only in one direction. By + default file descriptor passing is negotiated for all + connections. + + Note that when bus activation is used it is highly + recommended to set the + setting in the .busname unit file to the same + setting as negotiated by the program ultimately activated. By + default file descriptor passing is enabled for both. + + sd_bus_negotiate_timestamps() controls + whether implicit sender timestamps shall be attached automatically + to all incoming messages. Takes a bus object and a boolean, which + when true enables timestamping, and when false disables it. If + this is disabled, + sd_bus_message_get_monotonic_usec3, + sd_bus_message_get_realtime_usec3, + sd_bus_message_get_seqno3 + fail with -ENODATA on incoming messages. Note + that not all transports support timestamping of messages. On local + transports the timestamping is applied by the kernel and cannot be + manipulated by userspace. + + sd_bus_negotiate_creds() controls + whether implicit sender credentials shall be attached + automatically to all incoming messages. Takes a bus object and a + bit mask value, which controls which credential parameters are + attached. If this is not used, + sd_bus_message_get_creds3 + fails with -ENODATA on incoming + messages. Note that not all transports support attaching sender + credentials to messages, or do not support all types of sender + credential parameters. On local transports the sender credentials + are attached by the kernel and cannot be manipulated by + userspace. By default no sender credentials are attached. + + These functions may be called only before the connection has + been started with + sd_bus_start3. + + + + Return Value + + On success, these functions returns 0 or a + positive integer. On failure, it returns a negative errno-style + error code. + + + + Errors + + Returned errors may indicate the following problems: + + + + -EPERM + + The bus connection has already been started. + + + + + + Notes + + sd_bus_negotiate_fs() 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. + + + + See Also + + + systemd1, + sd-bus3, + sd_bus_start3, + sd_bus_message_can_send3, + sd_bus_message_get_monotonic_usec3, + sd_bus_message_get_creds3 + + + +