Congratulations to our 2022 Qt Champions!

Howto add DBUS call flags in qtdbus (eg. ALLOW_INTERACTIVE_AUTHORIZATION)

  • I'm trying to send a method call from an unprivileged process to systemd using qtdbus. Unfortunately I get an InteractiveAuthorizationRequired error:

    QDBusMessage(type=Error, service="", error name="org.freedesktop.DBus.Error.InteractiveAuthorizationRequired", error message="Interactive authentication required.", signature="", contents=([]) )

    That is because I did not send a ALLOW_INTERACTIVE_AUTHORIZATION flag with the message. Trying the same request with busctl with --allow-interactive-authorization=false and --allow-interactive-authorization=true yields the same result.

    How can I set the ALLOW_INTERACTIVE_AUTHORIZATION flag with qtdbus? I know there is a sd_bus_message_set_allow_interactive_authorization method in sd-bus, is there something similar in qtbus?

Log in to reply