Skip to content

WPA_Supplicant DBUS Interface Permissions #6

@buildscientist

Description

@buildscientist

@mark2b Opening this up as an issue more for documentation purposes in case anyone else runs into this. I ran into this issue while developing a Go service using your library on Ubuntu. Likely not an issue on Raspberry PI OS since it doesn't use Polkit.

When using DBUS to manage wpa_supplicant some Linux distributions utilize Polkit (formerly known as PolicyKit) to manage permissions for processes that can interface directly with the bus.

This blog provides a good treatise on the subject matter. Developers running on Debian based distro's like Ubuntu will need to modify the /etc/dbus-1/system.d/wpa_supplicant.conf to allow your user (non-root) access to interface with dbus.

Add another <policy_user> block in addition to the existing one.

<busconfig>
        <policy user="yourUserName">
                <allow own="fi.w1.wpa_supplicant1"/>

                <allow send_destination="fi.w1.wpa_supplicant1"/>
                <allow send_interface="fi.w1.wpa_supplicant1"/>
                <allow receive_sender="fi.w1.wpa_supplicant1" receive_type="signal"/>
        </policy>
</busconfig>

Note the policy user you set should be identical to the owner of the process running the Go binary using the wpa-connect library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions