Bug 912778

Summary: "runuser -l" doesn't register session to systemd and doesn't initialize various XDG_ environment variables
Product: [Fedora] Fedora Reporter: Adam Tkac <atkac>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: admiller, bkelly, bobgus, j.mark.brooks, kdudka, kzak, Leon, ooprala, ovasik, p, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-11-28 20:04:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 896648    

Description Adam Tkac 2013-02-19 16:29:30 UTC
Description of problem:
"runuser -l" doesn't register session to systemd and doesn't initialize various XDG_ environment variables. Due to this it is no longer possible to start GNOME 3 session under VNC (bug #896648). Note that su utility registers sessions to systemd and sets XDG_ variables correctly.

Version-Release number of selected component (if applicable):
coreutils-8.17-8.fc18.x86_64

How reproducible:
always

Steps to Reproduce:
1. under root run runuser -l <username> -c 'env |grep XDG'
2. for comparison run su - <username> -c 'env |grep XDG'
  
Actual results:
Outputs are different

Expected results:
Outputs are same, since runuser is lightweight version of su.

Additional info:
Addition of following line into /etc/pam.d/runuser-l (after "session optional pam_keyinit.so ..." line) fixes the problem:

-session        optional        pam_systemd.so

Not sure if this line should be added into /etc/pam.d/runuser but I think it should.

Comment 1 Ondrej Vasik 2013-02-19 16:49:11 UTC
Probably - please note that since F19 (aka in Rawhide) is su/runuser part of util-linux - so the fix should be done there as well...

Comment 2 Karel Zak 2013-02-20 11:51:21 UTC
(In reply to comment #1)
> Probably - please note that since F19 (aka in Rawhide) is su/runuser part of
> util-linux - so the fix should be done there as well...

Fixed (util-linux >= 2.22.2-6).

Comment 3 Adam Tkac 2013-02-26 14:14:33 UTC
Please note there might be needed more work than written in original comment to fix both #915498 and this bug. I wrote proposal of the fix on https://bugzilla.redhat.com/show_bug.cgi?id=753882#c35

Comment 5 Ondrej Vasik 2013-11-28 20:04:35 UTC
Closing next release, reporter is no longer in RH and this bugzilla was fixed in F19 in util-linux and I don't plan coreutils updates for F18.

Comment 6 Mark 2013-12-09 12:27:32 UTC
This isn't actually fixed, and there was a dependency, so why was it closed?

I hope it really is fixed in F20.

Comment 7 Ondrej Vasik 2013-12-09 12:34:25 UTC
If not, feel free to move it against util-linux - comment #2 indicates fix in util-linux and runuser is no longer part of coreutils.

Comment 8 Bob Gustafson 2013-12-10 16:31:57 UTC
(In reply to Karel Zak from comment #2)
> (In reply to comment #1)
> > Probably - please note that since F19 (aka in Rawhide) is su/runuser part of
> > util-linux - so the fix should be done there as well...
> 
> Fixed (util-linux >= 2.22.2-6).

My util-linux:
Package util-linux-2.23.2-4.fc19.x86_64 already installed and latest version

Still broken VNC (bug #896648)