aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorSteven Allen2024-07-09 13:16:43 +0200
committerMichael Albinus2024-07-09 13:16:43 +0200
commit551a71c313be26d067e59fa11c79e4ef5c550e92 (patch)
treeccb4349e4ddb3de5a0f2e5e77f148a4ceec46a3e /doc
parent24cad0e2e773a6f9cbd4a9721694a44246a7c974 (diff)
downloademacs-551a71c313be26d067e59fa11c79e4ef5c550e92.tar.gz
emacs-551a71c313be26d067e59fa11c79e4ef5c550e92.zip
Support interactive D-Bus authorization
When invoking D-Bus methods, let the user enable interactive authorization by passing an :authorizable t parameter. This makes it possible to D-Bus methods that require polkit authorization. * configure.ac (HAVE_DBUS_MESSAGE_SET_ALLOW_INTERACTIVE_AUTHORIZATION): Set a new variable if `dbus_message_set_allow_interactive_authorization' is available. * src/dbusbind.c (dbus-message-internal): Allow interactive authorization by passing :authorizable t. * doc/misc/dbus.texi (Synchronous Methods, Asynchronous Methods): * etc/NEWS: * lisp/net/dbus.el (dbus-call-method-asynchronously): Document the new parameter.
Diffstat (limited to 'doc')
-rw-r--r--doc/misc/dbus.texi12
1 files changed, 10 insertions, 2 deletions
diff --git a/doc/misc/dbus.texi b/doc/misc/dbus.texi
index e5d867acd40..20d26c80d38 100644
--- a/doc/misc/dbus.texi
+++ b/doc/misc/dbus.texi
@@ -1208,7 +1208,7 @@ which carries the input parameters to the object owning the method to
1208be called, and a reply message returning the resulting output 1208be called, and a reply message returning the resulting output
1209parameters from the object. 1209parameters from the object.
1210 1210
1211@defun dbus-call-method bus service path interface method &optional :timeout timeout &rest args 1211@defun dbus-call-method bus service path interface method &optional :timeout timeout :authorizable auth &rest args
1212@anchor{dbus-call-method} 1212@anchor{dbus-call-method}
1213This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is 1213This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is
1214either the keyword @code{:system} or the keyword @code{:session}. 1214either the keyword @code{:system} or the keyword @code{:session}.
@@ -1223,6 +1223,10 @@ method call must return. The default value is 25,000. If the method
1223call doesn't return in time, a D-Bus error is raised (@pxref{Errors 1223call doesn't return in time, a D-Bus error is raised (@pxref{Errors
1224and Events}). 1224and Events}).
1225 1225
1226If the parameter @code{:authorizable} is given and the following
1227@var{auth} is non-@code{nil}, the invoked method may interactively
1228prompt the user for authorization. The default is @code{nil}.
1229
1226The remaining arguments @var{args} are passed to @var{method} as 1230The remaining arguments @var{args} are passed to @var{method} as
1227arguments. They are converted into D-Bus types as described in 1231arguments. They are converted into D-Bus types as described in
1228@ref{Type Conversion}. 1232@ref{Type Conversion}.
@@ -1302,7 +1306,7 @@ emulate the @code{lshal} command on GNU/Linux systems:
1302@cindex method calls, asynchronous 1306@cindex method calls, asynchronous
1303@cindex asynchronous method calls 1307@cindex asynchronous method calls
1304 1308
1305@defun dbus-call-method-asynchronously bus service path interface method handler &optional :timeout timeout &rest args 1309@defun dbus-call-method-asynchronously bus service path interface method handler &optional :timeout timeout :authorizable auth &rest args
1306This function calls @var{method} on the D-Bus @var{bus} 1310This function calls @var{method} on the D-Bus @var{bus}
1307asynchronously. @var{bus} is either the keyword @code{:system} or the 1311asynchronously. @var{bus} is either the keyword @code{:system} or the
1308keyword @code{:session}. 1312keyword @code{:session}.
@@ -1321,6 +1325,10 @@ reply message must arrive. The default value is 25,000. If there is
1321no reply message in time, a D-Bus error is raised (@pxref{Errors and 1325no reply message in time, a D-Bus error is raised (@pxref{Errors and
1322Events}). 1326Events}).
1323 1327
1328If the parameter @code{:authorizable} is given and the following
1329@var{auth} is non-@code{nil}, the invoked method may interactively
1330prompt the user for authorization. The default is @code{nil}.
1331
1324The remaining arguments @var{args} are passed to @var{method} as 1332The remaining arguments @var{args} are passed to @var{method} as
1325arguments. They are converted into D-Bus types as described in 1333arguments. They are converted into D-Bus types as described in
1326@ref{Type Conversion}. 1334@ref{Type Conversion}.