diff options
| author | Steven Allen | 2024-07-09 13:16:43 +0200 |
|---|---|---|
| committer | Michael Albinus | 2024-07-09 13:16:43 +0200 |
| commit | 551a71c313be26d067e59fa11c79e4ef5c550e92 (patch) | |
| tree | ccb4349e4ddb3de5a0f2e5e77f148a4ceec46a3e /doc/misc | |
| parent | 24cad0e2e773a6f9cbd4a9721694a44246a7c974 (diff) | |
| download | emacs-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/misc')
| -rw-r--r-- | doc/misc/dbus.texi | 12 |
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 | |||
| 1208 | be called, and a reply message returning the resulting output | 1208 | be called, and a reply message returning the resulting output |
| 1209 | parameters from the object. | 1209 | parameters 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} |
| 1213 | This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is | 1213 | This function calls @var{method} on the D-Bus @var{bus}. @var{bus} is |
| 1214 | either the keyword @code{:system} or the keyword @code{:session}. | 1214 | either 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 | |||
| 1223 | call doesn't return in time, a D-Bus error is raised (@pxref{Errors | 1223 | call doesn't return in time, a D-Bus error is raised (@pxref{Errors |
| 1224 | and Events}). | 1224 | and Events}). |
| 1225 | 1225 | ||
| 1226 | If the parameter @code{:authorizable} is given and the following | ||
| 1227 | @var{auth} is non-@code{nil}, the invoked method may interactively | ||
| 1228 | prompt the user for authorization. The default is @code{nil}. | ||
| 1229 | |||
| 1226 | The remaining arguments @var{args} are passed to @var{method} as | 1230 | The remaining arguments @var{args} are passed to @var{method} as |
| 1227 | arguments. They are converted into D-Bus types as described in | 1231 | arguments. 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 |
| 1306 | This function calls @var{method} on the D-Bus @var{bus} | 1310 | This function calls @var{method} on the D-Bus @var{bus} |
| 1307 | asynchronously. @var{bus} is either the keyword @code{:system} or the | 1311 | asynchronously. @var{bus} is either the keyword @code{:system} or the |
| 1308 | keyword @code{:session}. | 1312 | keyword @code{:session}. |
| @@ -1321,6 +1325,10 @@ reply message must arrive. The default value is 25,000. If there is | |||
| 1321 | no reply message in time, a D-Bus error is raised (@pxref{Errors and | 1325 | no reply message in time, a D-Bus error is raised (@pxref{Errors and |
| 1322 | Events}). | 1326 | Events}). |
| 1323 | 1327 | ||
| 1328 | If the parameter @code{:authorizable} is given and the following | ||
| 1329 | @var{auth} is non-@code{nil}, the invoked method may interactively | ||
| 1330 | prompt the user for authorization. The default is @code{nil}. | ||
| 1331 | |||
| 1324 | The remaining arguments @var{args} are passed to @var{method} as | 1332 | The remaining arguments @var{args} are passed to @var{method} as |
| 1325 | arguments. They are converted into D-Bus types as described in | 1333 | arguments. They are converted into D-Bus types as described in |
| 1326 | @ref{Type Conversion}. | 1334 | @ref{Type Conversion}. |