diff --git a/man/rules/meson.build b/man/rules/meson.build index d9a0f81201..f6786b23ef 100644 --- a/man/rules/meson.build +++ b/man/rules/meson.build @@ -335,8 +335,10 @@ manpages = [ ''], ['sd_bus_message_set_expect_reply', '3', - ['sd_bus_message_get_auto_start', + ['sd_bus_message_get_allow_interactive_authorization', + 'sd_bus_message_get_auto_start', 'sd_bus_message_get_expect_reply', + 'sd_bus_message_set_allow_interactive_authorization', 'sd_bus_message_set_auto_start'], ''], ['sd_bus_message_skip', '3', [], ''], diff --git a/man/sd-bus.xml b/man/sd-bus.xml index 0a0297bd7b..958e3d674f 100644 --- a/man/sd-bus.xml +++ b/man/sd-bus.xml @@ -72,6 +72,7 @@ sd_bus_error3, sd_bus_error_add_map3, sd_bus_get_address3, +sd_bus_get_allow_interactive_authorization3, sd_bus_get_bus_id3, sd_bus_get_current_handler3, sd_bus_get_current_message3, @@ -96,6 +97,7 @@ sd_bus_message_at_end3, sd_bus_message_copy3, sd_bus_message_dump3, +sd_bus_message_get_allow_interactive_authorization3, sd_bus_message_get_cookie3, sd_bus_message_get_monotonic_usec3, sd_bus_message_get_property3, @@ -115,6 +117,7 @@ sd_bus_message_read_strv3, sd_bus_message_rewind3, sd_bus_message_seal3, +sd_bus_message_set_allow_interactive_authorization3, sd_bus_message_set_destination3, sd_bus_message_set_sender3, sd_bus_message_set_expect_reply3, @@ -129,6 +132,7 @@ sd_bus_request_name3, sd_bus_send3, sd_bus_set_address3, +sd_bus_set_allow_interactive_authorization3, sd_bus_set_bus_client3, sd_bus_set_close_on_exit3, sd_bus_set_connected_signal3, diff --git a/man/sd_bus_message_set_expect_reply.xml b/man/sd_bus_message_set_expect_reply.xml index 6f22e82057..43a94c83c7 100644 --- a/man/sd_bus_message_set_expect_reply.xml +++ b/man/sd_bus_message_set_expect_reply.xml @@ -20,6 +20,8 @@ sd_bus_message_get_expect_reply sd_bus_message_set_auto_start sd_bus_message_get_auto_start + sd_bus_message_set_allow_interactive_authorization + sd_bus_message_get_allow_interactive_authorization Set and query bus message metadata @@ -49,41 +51,61 @@ int sd_bus_message_get_auto_start sd_bus_message *message - + + int sd_bus_message_set_allow_interactive_authorization + sd_bus_message *message + int b + + + + int sd_bus_message_get_allow_interactive_authorization + sd_bus_message *message + + Description sd_bus_message_set_expect_reply() sets or clears the - NO_REPLY_EXPECTED flag on the message m. This flag - matters only for method call messages and is used to specify that no method return or error - reply is expected. It is ignored for other types. Thus, for a method call message, calling - sd_bus_message_set_expect_reply(…, 0) sets the flag and - suppresses the reply. + NO_REPLY_EXPECTED flag on the message m. This flag matters + only for method call messages and is used to specify that no method return or error reply is expected. + It is ignored for other types. Thus, for a method call message, calling + sd_bus_message_set_expect_reply(…, 0) sets the flag and suppresses the + reply. sd_bus_message_get_expect_reply() checks if the - NO_REPLY_EXPECTED flag is set on the message m. It - will return positive if it is not set, and zero if it is. + NO_REPLY_EXPECTED flag is set on the message m. It will + return positive if it is not set, and zero if it is. sd_bus_message_set_auto_start() sets or clears the - NO_AUTO_START flag on the message m. When the flag - is set the bus must not launch an owner for the destination name in response to this message. - Calling - sd_bus_message_set_auto_start(…, 0) sets the flag. - + NO_AUTO_START flag on the message m. When the flag is set, + the bus must not launch an owner for the destination name in response to this message. Calling + sd_bus_message_set_auto_start(…, 0) sets the flag. sd_bus_message_get_auto_start() checks if the - NO_AUTO_START flag is set on the message m. It - will return positive if it is not set, and zero if it is. + NO_AUTO_START flag is set on the message m. It will return + positive if it is not set, and zero if it is. + + sd_bus_message_set_allow_interactive_authorization() sets or clears the + ALLOW_INTERACTIVE_AUTHORIZATION flag on the message m. + Setting this flag informs the receiver that the caller is prepared to wait for interactive authorization + via polkit or a similar framework. Note that setting this flag does not guarantee that the receiver will + actually perform interactive authorization. Also, make sure to set a suitable message timeout when using + this flag since interactive authorization could potentially take a long time as it depends on user input. + If b is non-zero, the flag is set. + + sd_bus_message_get_allow_interactive_authorization() checks if the + ALLOW_INTERACTIVE_AUTHORIZATION flag is set on the message m. + It will return a positive integer if the flag is set. Otherwise, it returns zero. Return Value - On success, these functions return 0 or a positive integer. On failure, they return a - negative errno-style error code. + On success, these functions return a non-negative integer. On failure, they return a negative + errno-style error code. Errors @@ -94,18 +116,17 @@ -EINVAL - The message parameter is - NULL. + The message parameter is NULL. + -EPERM - The message message is sealed - when trying to set a flag. + + The message message is sealed when trying to set a flag. - The message message has wrong - type. + The message message has wrong type. @@ -123,5 +144,4 @@ sd_bus_set_description3 -