Bug 961510 - Please get sudo to create /run/user/$UID as part of session setup
Please get sudo to create /run/user/$UID as part of session setup
Product: Fedora
Classification: Fedora
Component: sudo (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Daniel Kopeček
Fedora Extras Quality Assurance
Depends On:
Blocks: 961235 985016
  Show dependency treegraph
Reported: 2013-05-09 15:05 EDT by Nalin Dahyabhai
Modified: 2015-02-17 10:12 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-02-17 10:12:44 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed sample changes (1.57 KB, patch)
2013-05-09 15:05 EDT, Nalin Dahyabhai
no flags Details | Diff

  None (edit)
Description Nalin Dahyabhai 2013-05-09 15:05:53 EDT
Created attachment 745787 [details]
proposed sample changes

Description of problem:
As components (in this case, krb5) start expecting to find a runtime directory for the current user in the default location, commands run under sudo are going to be confused when the runtime directory isn't present.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. sudo ls /run/user
Actual results:
If the user the "ls" command runs as isn't/hasn't logged in, their directory under /run/user won't be there.

Expected results:
I'd like to see the directory there.
Comment 1 Karel Zak 2013-05-21 12:28:30 EDT
Sounds like a bug #965419 for su(1). IMHO it's nasty hack to hardcode something like to this on multiple places. Why we we have PAM or logind?
Comment 2 Nalin Dahyabhai 2013-05-21 13:47:55 EDT
The logind process creates the directory for proper login sessions, but it uses the user's loginuid, which I expect isn't something we want to start changing in su and sudo.  I guess we don't already have a PAM module that does this specifically because pam_systemd causes the thing which we want to happen to be done the rest of the time.
Comment 3 Tomas Mraz 2013-05-21 14:19:09 EDT
Nalin, perhaps pam_systemd should do the right thing and not use loginuid but the uid of the user to be logged in.
Comment 4 Nalin Dahyabhai 2013-05-21 14:59:07 EDT
(In reply to Tomas Mraz from comment #3)
> Nalin, perhaps pam_systemd should do the right thing and not use loginuid
> but the uid of the user to be logged in.

For the login shells, XDG_RUNTIME_DIR still points to the location that was created, but given that su can also be used to drop from root to an unprivileged user, there are cases where that's not so helpful ("ssh -t root@localhost su someuser", for example).  I haven't dug into the full set of design goals there, though, so I can't say for sure that it should be changed.
Comment 5 Fedora End Of Life 2015-01-09 13:05:35 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Fedora End Of Life 2015-02-17 10:12:44 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this

Thank you for reporting this bug and we are sorry it could not be fixed.

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