All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tanel Kokk <tanel.kokk@seb.ee>
To: SELinux@tycho.nsa.gov
Subject: Re: Sendmail & SELinux policies
Date: Thu, 06 Apr 2006 15:23:05 +0300	[thread overview]
Message-ID: <44350829.1010106@seb.ee> (raw)
In-Reply-To: <1144325680.6176.36.camel@moss-spartans.epoch.ncsc.mil>

Stephen Smalley wrote:
> On Thu, 2006-04-06 at 14:49 +0300, Tanel Kokk wrote:
>> Stephen Smalley wrote:
>>> On Thu, 2006-04-06 at 12:09 +0300, Tanel Kokk wrote:
>>> This looks suspect, as the null device should be labeled null_device_t,
>>> not just device_t.  ls -Z /dev/null
>> Ouch! I have to note, that I have chrooted sendmail environment and 
>> /sm_chroot/dev/null really has a label device_t. Now fixed to null_device_t.
> 
> Ok.  FYI, setfiles has a -r option for applying it to a chroot'd tree,
> contributed by the Hardened Gentoo folks.  As in:
> 	setfiles -r /path/to/root /etc/selinux/targeted/contexts/files/file_contexts /path/to/root

That's good hind. I didn't know that.

> make relabel is only necessary if you altered file contexts (.fc files),
> and even then, you can usually just apply setfiles or restorecon
> selectively if you know which part of the file tree needs to be updated
> to avoid a full relabel.  I'd try a make clean load to be sure it
> properly rebuilt.
> 
> BTW, a make relabel will likely reset the types on your chroot
> environment unless you've added entries for them to your file contexts.
> 

I have labels for chroot directory, too. Before I have entry:

/sm_chroot/dev(/.*)?       system_u:object_r:device_t

and there wasn't separate labels for specific devise files. Now I added 
right labels for these ones, too.

-- 
Tanel Kokk


--
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:[~2006-04-06 12:23 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-06  9:09 Sendmail & SELinux policies Tanel Kokk
2006-04-06 11:40 ` Stephen Smalley
2006-04-06 11:49   ` Tanel Kokk
2006-04-06 12:14     ` Stephen Smalley
2006-04-06 12:23       ` Tanel Kokk [this message]

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=44350829.1010106@seb.ee \
    --to=tanel.kokk@seb.ee \
    --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.