Bug 912778 - "runuser -l" doesn't register session to systemd and doesn't initialize various XDG_ environment variables
Summary: "runuser -l" doesn't register session to systemd and doesn't initialize vario...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ondrej Vasik
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 896648
TreeView+ depends on / blocked
 
Reported: 2013-02-19 16:29 UTC by Adam Tkac
Modified: 2013-12-10 16:31 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-28 20:04:35 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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)


Note You need to log in before you can comment on or make changes to this bug.