All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: russell@coker.com.au, SELinux <SELinux@tycho.nsa.gov>
Subject: Re: issue with SE/Linux - sshd not giving access to /dev/pts/[n]
Date: Wed, 09 Jun 2004 13:21:50 -0400	[thread overview]
Message-ID: <40C7472E.80607@redhat.com> (raw)
In-Reply-To: <200406042132.40136.russell@coker.com.au>

Russell Coker wrote:

>On Thu, 3 Jun 2004 23:14, Stephen Smalley <sds@epoch.ncsc.mil> wrote:
>  
>
>>>The implication is that pam_selinux cannot perform tty relabeling for
>>>openssh 3.8.  Thus, we must revert to using a direct patch.  Someone
>>>want to port the old 3.6 patch?
>>>      
>>>
>>BTW, note that the patch is very simple; you just want to extend the
>>    
>>
>
>It seems to me that pam_selinux is not going to do what we want.
>
>We have to split the module into two parts to get the desired behaviour.  It 
>doesn't work with sshd, and some xdm's.  Now it only works with /bin/login 
>and one xdm variant (AFAIK).
>
>I think that we are taking the wrong approach to this and we should give up 
>and just patch the applications?
>
>
>Dan, as inventor of the pam_selinux module, what do you think?
>
>  
>
openssh has been repatched with the old patch.  Basically openssh 3.8 
has this kind of pseudo code.

Authenticate
If UID != 0
       pam_open_session
       Drop Creds
Alloc TTY
IF UID == 0
       pam_open_session
Exec shell

This causes the stange behavior where if you ssh in to root, pam_selinux 
works correctly.
If you ssh as a normal user pam_selinux does not relabel the tty and you 
get connection dropped.

After investigating how we could get this behavior changed we decided to 
just patch openssh with the setexec and tty relabel, and drop 
pam_selinux from /etc/pam.d/sshd

As far as dropping pam_selinux, I don't think that is a good idea since 
it can be used by third party apps that might want this behavior and it 
works fairly well for su and login.

Dan


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  parent reply	other threads:[~2004-06-09 17:21 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-01  9:03 issue with SE/Linux - sshd not giving access to /dev/pts/[n] Luke Kenneth Casson Leighton
     [not found] ` <40BC51DD.8090609@zip.com.au>
2004-06-01 10:32   ` Luke Kenneth Casson Leighton
2004-06-02  6:31 ` Russell Coker
2004-06-02 17:23   ` Stephen Smalley
2004-06-03  4:04     ` Russell Coker
2004-06-03 12:41       ` Stephen Smalley
2004-06-03 13:14         ` Stephen Smalley
2004-06-04 11:32           ` Russell Coker
2004-06-04 12:08             ` Stephen Smalley
2004-06-09 17:21             ` Daniel J Walsh [this message]
2004-06-10  6:26               ` Russell Coker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40C7472E.80607@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=russell@coker.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.