Bug 912778 - "runuser -l" doesn't register session to systemd and doesn't initialize various XDG_ environment variables
"runuser -l" doesn't register session to systemd and doesn't initialize vario...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: coreutils (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ondrej Vasik
Fedora Extras Quality Assurance
:
Depends On:
Blocks: 896648
  Show dependency treegraph
 
Reported: 2013-02-19 11:29 EST by Adam Tkac
Modified: 2013-12-10 11:31 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-11-28 15:04:35 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Tkac 2013-02-19 11:29:30 EST
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 11:49:11 EST
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 06:51:21 EST
(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 09:14:33 EST
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 15:04:35 EST
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 07:27:32 EST
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 07:34:25 EST
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 11:31:57 EST
(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.