Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 231869 - OpenSSH 5.0 doesn't properly detect selinux permissive mode
Summary: OpenSSH 5.0 doesn't properly detect selinux permissive mode
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: SE Linux Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-15 15:07 UTC by Robert Piasek (RETIRED)
Modified: 2009-12-16 02:01 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Piasek (RETIRED) gentoo-dev 2008-07-15 15:07:01 UTC
I've got openssh-5.0 installed on selinux/2007.0/amd64 profile.

My selinux settings are set to:

SELINUX=permissive
SELINUXTYPE=targeted

I'm using sec-policy/selinux-base-policy-20080525


From the remove side it looks like (10.0.0.5):

mail ~ # ssh -l piasekr 10.0.3.31
Password: 
Connection to 10.0.3.31 closed by remote host.
Connection to 10.0.3.31 closed.


Error message in local logs (10.0.3.31):

Jul 15 15:52:53 [sshd] Accepted keyboard-interactive/pam for piasekr from 10.0.0.5 port 43912 ssh2
Jul 15 15:52:53 [sshd] pam_unix(sshd:session): session opened for user piasekr by (uid=0)
Jul 15 15:52:53 [sshd] error: ssh_selinux_getctxbyname: Failed to get default SELinux security context for piasekr
                - Last output repeated twice -
Jul 15 15:52:53 [sshd] error: ssh_selinux_setup_pty: security_compute_relabel: Invalid argument


Reproducible: Always

Steps to Reproduce:
Comment 1 Dan A. Dickey 2008-08-26 15:54:02 UTC
I'm now seeing this too, after restarting sshd.

However, I'm seeing this with version 4.7_p1-r6.

Is there any known workaround?
Comment 2 Dan A. Dickey 2008-09-02 23:26:05 UTC
Wow... shot myself in the foot, once again.  :)

Ok, for me - what worked was to restart sshd using run_init.
Now everything is happy again, can login remotely as someone other than root
and everything seems to be working well.

I am *not* running openssh 5.0 though, so I can't comment directly on this bug.

Only on the condition of my feet.
Sorry for the noise.
Comment 3 Chris PeBenito (RETIRED) gentoo-dev 2009-12-16 02:01:06 UTC
closing stale bugs.  this should work in current openssh.  please open a new bug if this is not the case.