X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;ds=sidebyside;f=man%2Fsd_bus_negotiate_fds.xml;h=90404d2f21190c7cfbd67f2fb852adaaa2ebd64c;hb=76cc80f42e53215b9039ca99dd35687c7518880a;hp=60f3769da051dfbf79fe2fac6e41568c8aeb89ba;hpb=ae9376394babe02685251ecfd6962b6f0f73a662;p=elogind.git diff --git a/man/sd_bus_negotiate_fds.xml b/man/sd_bus_negotiate_fds.xml index 60f3769da..90404d2f2 100644 --- a/man/sd_bus_negotiate_fds.xml +++ b/man/sd_bus_negotiate_fds.xml @@ -3,29 +3,29 @@ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> - + sd_bus_negotiate_fds - systemd + elogind @@ -44,7 +44,7 @@ along with systemd; If not, see . sd_bus_negotiate_fds - sd_bus_negotiate_timestamps + sd_bus_negotiate_timestamp sd_bus_negotiate_creds Control feature negotiation on bus connections @@ -52,7 +52,7 @@ along with systemd; If not, see . - #include <systemd/sd-bus.h> + #include <elogind/sd-bus.h> int sd_bus_negotiate_fds @@ -70,7 +70,7 @@ along with systemd; If not, see . int sd_bus_negotiate_creds sd_bus *bus int b - uint64_t flags + uint64_t mask @@ -81,10 +81,11 @@ along with systemd; If not, see . sd_bus_negotiate_fds() controls whether file descriptor passing shall be negotiated for the specified bus connection. It 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 + enables file descriptor passing, and, when false, disables + it. Note that not all transports and servers support file + descriptor passing. In particular, networked transports generally + do not 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 @@ -101,38 +102,48 @@ along with systemd; If not, see . 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, + when true, enables timestamping, and, when false, disables it. + Use sd_bus_message_get_monotonic_usec3, sd_bus_message_get_realtime_usec3, sd_bus_message_get_seqnum3 - 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. By default, message timestamping is - not negotiated for all connections. + to query the timestamps of incoming messages. If negotiation is + disabled or not supported, these calls will fail with + -ENODATA. Note that not all transports + support timestamping of messages. Specifically, timestamping is + only available on the kdbus transport, but not on dbus1. The + timestamping is applied by the kernel and cannot be manipulated by + userspace. By default, message timestamping is not negotiated for + connections. sd_bus_negotiate_creds() controls - whether implicit sender credentials shall be attached - automatically to all incoming messages. Takes a bus object, a + whether and which implicit sender credentials shall be attached + automatically to all incoming messages. Takes a bus object and a boolean indicating whether to enable or disable the credential parts encoded in the bit mask value argument. Note that not all transports support attaching sender credentials to messages, or do not support all types of sender credential parameters, or might suppress them under certain circumstances for individual - messages. On local transports, the sender credentials are attached - by the kernel and cannot be manipulated by userspace. By default, - no sender credentials are attached. + messages. Specifically, implicit sender credentials on messages + are only fully supported on kdbus transports, and dbus1 only + supports SD_BUS_CREDS_UNIQUE_NAME. The sender + credentials are attached by the kernel and cannot be manipulated + by userspace, and are thus suitable for authorization + decisions. By default, only + SD_BUS_CREDS_WELL_KNOWN_NAMES and + SD_BUS_CREDS_UNIQUE_NAME are enabled. In + fact, these two credential fields are always sent along and cannot + be turned off. The sd_bus_negotiate_fds() function may be called only before the connection has been started with sd_bus_start3. Both sd_bus_negotiate_timestamp() and - sd_bus_negotiate_creds() also may be called - after a connection has been set up. Note that when operating on a + sd_bus_negotiate_creds() may also be called + after a connection has been set up. Note that, when operating on a connection that is shared between multiple components of the same program (for example via - sd_bus_default3) + sd_bus_default3), it is highly recommended to only enable additional per message metadata fields, but never disable them again, in order not to disable functionality needed by other components. @@ -141,7 +152,7 @@ along with systemd; If not, see . Return Value - On success, these functions returns 0 or a + On success, these functions return 0 or a positive integer. On failure, they return a negative errno-style error code. @@ -163,10 +174,10 @@ along with systemd; If not, see . Notes - sd_bus_negotiate_fs() and the other + sd_bus_negotiate_fds() and the other functions described here are available as a shared library, which can be compiled and linked to with the - libsystemd pkg-config1 + libelogind pkg-config1 file. @@ -174,13 +185,15 @@ along with systemd; If not, see . See Also - systemd1, + elogind8, sd-bus3, sd_bus_start3, sd_bus_message_can_send3, sd_bus_message_get_monotonic_usec3, + sd_bus_message_get_realtime_usec3, + sd_bus_message_get_seqnum3, sd_bus_message_get_creds3, - systemd.busname5 + elogind.busname5