polkit authentication does not work after byobu-reconnect-sockets (plus more environment update stuff)

Reported by Ryan Thompson on 2012-01-31
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Medium
Unassigned

Bug Description

I've discovered that after restarting X sourcing byobu-reconnect-sockets, any admin action that requires PolicyKit authenticaion fails. An easy example is the "Unlock" button in the User Accounts section of Gnome Control Center, which is greyed out when started from an affected byobu session.

It appears that updating the XDG_SESSION_COOKIE variable fixes the problem. The related variable XDG_SESSION_PATH also changes between X sessions and should probably also be updated.

Also, as long as we're adding more variables, we may as well add some for Gnome Keyring Daemon. Look at the bottom of this page: http://live.gnome.org/GnomeKeyring/RunningDaemon . When I run gnome-keyring-daemon, it lists the following 4 environment variables, which it expects to have exported into the user's environment:

GNOME_KEYRING_CONTROL=/tmp/keyring-cnev6h
SSH_AUTH_SOCK=/tmp/keyring-cnev6h/ssh
GPG_AGENT_INFO=/tmp/keyring-cnev6h/gpg:0:1
GNOME_KEYRING_PID=18511

So we should probably add those to the list as well. I can confirm that all 4 of those are different in my byobu session compared to their values in a regular terminal. Ditto for SSH_AGENT_PID, which is not gnome-keyring related, but rather needed for ssh-agent to work.

So, the full list of variables that I am proposing to add to the update list (in both byobu-reconnect-sockets AND byobu-select-session) is:

XDG_SESSION_COOKIE
XDG_SESSIOn_PATH
GNOME_KEYRING_CONTROL
GNOME_KEYRING_PID
GPG_AGENT_INFO
SSH_AUTH_SOCK
SSH_AGENT_PID

Ryan Thompson (rct86) on 2012-01-31
summary: - polkit authentication does not work after byobu-reconnect-sockets
+ polkit authentication does not work after byobu-reconnect-sockets (plus
+ more environment update stuff)
Dustin Kirkland  (kirkland) wrote :

Thanks, Ryan. Could you get me a branch and a merge proposal?

Cheers!
Dustin

Changed in byobu:
importance: Undecided → Medium
status: New → Triaged
Changed in byobu:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers