subgraph / citadel

Subgraph Citadel image builder
17 stars 14 forks source link

nm-connection-editor / NetworkManager insufficient privileges in Sway #11

Closed mckinney-subgraph closed 6 years ago

mckinney-subgraph commented 6 years ago

When running nm-connection-editor in Sway, attempting to change the wifi settings will generate an error message indicating that there are insufficient privileges to "initiate the (wifi config) editor". Underneath this, PolicyKit is rejecting the authorization:

error time=1522021521.370256 sender=:1.4 -> destination=:1.209 error_name=org.freedesktop.Net
workManager.Settings.PermissionDenied reply_serial=11
   string "Insufficient privileges."

This operation does succeed in GNOME on CItadel.

The workaround is to su in Citadel terminal and run nm-connection-editor, which one would expect to not work but does. Or to configure the wifi network in GNOME first.

mckinney-subgraph commented 6 years ago

The problem is there is that no polkit AuthenticationAgent launched for these operations in Sway (gnome-shell launches its own agent to prompt users for authentication). To simulate this manually, the following command can be run in a Citadel terminal:

pkttyagent --process `pidof nm-connection-editor`

Solutions to this might be:

  1. Relax the network configuration policies
  2. Implement something in sgmenu to launch pkttyagent
  3. Look at other polkit agent solutions to see if one of those can step in to fulfill this duty in Sway
mckinney-subgraph commented 6 years ago

Addressed here: b115862e5ae5af4a9df28876bb60ceffc81166c5