All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christopher J. PeBenito" <cpebenito@tresys.com>
To: Hasan Rezaul-CHR010 <CHR010@motorola.com>
Cc: Stephen Smalley <sds@epoch.ncsc.mil>, SELinux <selinux@tycho.nsa.gov>
Subject: Re: Console Login and SSH Login  Security Contexts...
Date: Mon, 01 Nov 2010 11:59:49 -0400	[thread overview]
Message-ID: <4CCEE3F5.1040802@tresys.com> (raw)
In-Reply-To: <D06FE0A2807BC145B0D38744789D4F5D09C2E5DC@de01exm68.ds.mot.com>

On 10/31/10 18:36, Hasan Rezaul-CHR010 wrote:
> Hi All,
> 
> I know there was a huge email thread recently regarding obtaining
> correct security context after SSH-login, but I didn't really get the
> answer I need from that thread. So hoping someone can help me...
[...]
> After the software_upgrade (when the filesystem has already been labeled
> correctly, and after the reboot, I would expect the "login" process and
> the "sshd" process to run under the correct context
> (system_u:system_r:login_exec_t), (system_u:system_r:sshd_exec_t).  But
> I don't  :-(  I see them both running as  system_u:system_r:kernel_t
> !!!  This tells me that the domain transitions during the init sequence
> perhaps didn't go smoothly ?

This is the first problem.  It sounds like your init program (typically
/sbin/init) is not labeled correctly, which means you don't transition
out of kernel_t when init runs, meaning anything that starts up from
init/init scripts will almost certainly have the wrong context.  The
init program should be init_exec_t.  I would expect sshd to have the
sshd_t domain and local login would be local_login_t (getty processes
getty_t).


-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

--
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.

  reply	other threads:[~2010-11-01 15:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12 20:55 [PATCH] Define CAP_SYSLOG Serge E. Hallyn
2010-03-12 20:55 ` Serge E. Hallyn
2010-03-12 20:58 ` [refpolicy] [PATCH refpolicy] add capability2:syslog perm Serge E. Hallyn
2010-03-14  5:18 ` [PATCH] Define CAP_SYSLOG Michael Kerrisk
2010-03-14  5:35   ` Serge E. Hallyn
2010-03-14  5:35     ` Serge E. Hallyn
2010-03-15  1:16     ` Matthew Helsley
2010-03-15  4:24       ` Serge E. Hallyn
2010-03-15  4:24         ` Serge E. Hallyn
2010-10-31 22:36     ` Console Login and SSH Login Security Contexts Hasan Rezaul-CHR010
2010-11-01 15:59       ` Christopher J. PeBenito [this message]
2010-11-01 21:11         ` Hasan Rezaul-CHR010
2010-11-02  7:48           ` HarryCiao
2010-11-02 13:36           ` Christopher J. PeBenito
2010-11-02 18:12             ` Hasan Rezaul-CHR010
2010-11-01  5:27     ` Format of file_contexts file Hasan Rezaul-CHR010
2010-11-01 16:02       ` Christopher J. PeBenito

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=4CCEE3F5.1040802@tresys.com \
    --to=cpebenito@tresys.com \
    --cc=CHR010@motorola.com \
    --cc=sds@epoch.ncsc.mil \
    --cc=selinux@tycho.nsa.gov \
    /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.