Bug 885479

Summary: prevent login if installed
Product: [Fedora] Fedora Reporter: Michael S. <misc>
Component: pam_openshiftAssignee: Troy Dawson <tdawson>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: high    
Version: 18CC: admiller, dtrainor, tdawson, tstclair
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-03-11 22:21:43 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:

Description Michael S. 2012-12-09 17:48:06 UTC
While reviewing pam_openshift, I installed it and forgot. After a reboot, i was no longer able to log on my laptop as simple user.

The error message was :
"Cannot make/remove an entry for the specified session", which turn out to be a quite generic pam error message about the session.

Comment 1 Troy Dawson 2012-12-10 19:22:56 UTC
Just to clarify, what do you consider the problem.
That you can't log in as a normal user when this is installed?
Or that the error message isn't clear?
Or both?

What is the expected result when adding pam_openshift?

Comment 2 Michael S. 2012-12-10 21:05:15 UTC
Both. In fact, i was rather surprised to not be able to log after installing for testing purpose the package. And I was surprised after reboot.

In fact, i am quite surprised since no config have been modified.

I could log as root, so i wonder if it doesn't interfer with pam_namespace :

Dec 10 20:03:52 liliana gdm-password][1875]: pam_namespace(gdm-password:session): Unknown user liveuser in configuration
Dec 10 20:03:52 liliana gdm-password][1875]: pam_namespace(gdm-password:session): Unknown user liveuser in configuration
Dec 10 20:03:52 liliana gdm-password][1875]: pam_namespace(gdm-password:session): Unable to unshare from parent namespace, Opération non permise
Dec 10 20:03:52 liliana gdm-password][1875]: pam_unix(gdm-password:session): session opened for user misc by (unknown)(uid=0)
Dec 10 20:04:03 liliana login: pam_namespace(login:session): Unknown user liveuser in configuration
Dec 10 20:04:03 liliana login: pam_namespace(login:session): Unknown user liveuser in configuration
Dec 10 20:04:03 liliana login: pam_unix(login:session): session opened for user root by LOGIN(uid=0)

Once removed, i do not see such error.

Comment 3 Michael S. 2013-02-01 10:36:43 UTC
Yesterday, I got a panicked call from our marketing intern who was unable to login. Upon closer inspection, he wanted to see what openshift, jboss etc was all about and installed it on his fedora laptop. It turn out that pam_openshift was preventing his login.

While I understand the need to have something secure out of the box, I think there is still room for improvement. 

So i looked at the default configuration, and the mention of "liveuser"is a first problem. So I removed it.

Then the issue is now :

févr. 01 11:30:21 liliana login[9194]: pam_namespace(login:session): Failed to mark / as a slave mount point, Permission denied

with a selinux error.

Adding myself to the list :
/var/tmp    $HOME/.tmp/   user:iscript=/usr/sbin/oo-namespace-init root,adm,apache,gdm,misc


make me login again.

So does pam_openshift requires a updated selinux policy ? Using setenforce 0 solve my issue, so I think the problem is that login and others are not able to do the needed mount.

Comment 4 Michael S. 2013-02-01 15:10:41 UTC
Ok so the issue is that selinux requires to enable the boolean polyinstantiation_enabled 
( but my selinux setup seems broken, so I didn't test )

Could we fail more gracefully ? 

Either we enable the boolean on installation, or pam_openshift should be disabled by default.

Comment 5 Troy Dawson 2013-02-01 16:41:42 UTC
I haven't ran into this problem despite making several machines.  Can you please give more details.

OS (F17, F18, ?)
pam_openshift version
selinux policy versions

Did you create these users before or after adding pam_openshift?

Comment 6 Michael S. 2013-02-01 17:13:53 UTC
That's on F18 ( both update and fresh install ), with selinux enabled, on a regular laptop. 

I create some code to fix this :
https://github.com/openshift/origin-server/pull/1275

By default, polyinstantiation_enabled is on off. So if someone just install pam_openshift ( not running anything else ), tty login do not work.

Comment 7 Troy Dawson 2013-02-01 23:05:30 UTC
Fix has been merged into upstream code.  I'll work on getting it into Fedora for a fix.

Comment 8 Timothy St. Clair 2013-02-24 15:36:47 UTC
I hit this on an indirect update, and it locked me out.  

'yum remove pam_openshift' and I was running again.

Comment 9 Troy Dawson 2013-03-01 21:00:31 UTC
This should be fixed in version 1.3.2 which is out now.
http://koji.fedoraproject.org/koji/buildinfo?buildID=396045
Can someone verify that this is fixed and we can close this bug.

Comment 10 Troy Dawson 2013-03-11 22:21:43 UTC
I have verified that pam_openshift does not upset our machine just by installing.  I am closing this bug as fixed.