Merge ~sylvain-pineau/checkbox-ng:fix-1972946 into checkbox-ng:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 7fbf21e8cdfa8064533f18dc278387feecba5a07
Merged at revision: 8ed7d4755ce5040f5b6dbde4f66557288e4a71c0
Proposed branch: ~sylvain-pineau/checkbox-ng:fix-1972946
Merge into: checkbox-ng:master
Diff against target: 12 lines (+1/-0)
1 file modified
plainbox/impl/session/remote_assistant.py (+1/-0)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+423858@code.launchpad.net

Description of the change

Fixes the linked bug. Parsing proc environ to extract XDG_SESSION_TYPE was only checking for the presence of DISPLAY and XAUTHORITY.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

self-approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/plainbox/impl/session/remote_assistant.py b/plainbox/impl/session/remote_assistant.py
2index e3c6c11..770c351 100644
3--- a/plainbox/impl/session/remote_assistant.py
4+++ b/plainbox/impl/session/remote_assistant.py
5@@ -250,6 +250,7 @@ class RemoteSessionAssistant():
6 if (
7 "DISPLAY" in p_environ and
8 "XAUTHORITY" in p_environ and
9+ "XDG_SESSION_TYPE" in p_environ and
10 p_user != 'gdm'
11 ): # gdm uses :1024
12 uid = pwd.getpwnam(self._normal_user).pw_uid

Subscribers

People subscribed via source and target branches