All of lore.kernel.org
 help / color / mirror / Atom feed
From: Colin Walters <walters@verbum.org>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: selinux@tycho.nsa.gov
Subject: [patch] Re: enforcement and initrds
Date: 15 Jul 2003 15:57:08 -0400	[thread overview]
Message-ID: <1058299027.26237.163.camel@columbia> (raw)
In-Reply-To: <1058289355.13738.705.camel@moss-huskers.epoch.ncsc.mil>

[-- Attachment #1: Type: text/plain, Size: 1130 bytes --]

On Tue, 2003-07-15 at 13:15, Stephen Smalley wrote:
> On Mon, 2003-07-14 at 16:31, Colin Walters wrote:
> > That's a good point, but then again we could just make DEVELOP=n instead
> > mean that once enforcing mode was switched on, it couldn't be switched
> > off.
> 
> I'd prefer to be able to compile out the permissive mode support
> entirely for production kernels.

I can understand that.

> romfs or ramfs?  

romfs, sorry about my initial misstatement.

> It isn't an issue whether it is labeled before the
> policy is loaded; all permission checks are allowed until the policy is
> loaded and the security server is initialized.  

Ahh, I see.  Ok.  

I've created an initrd.te which appears to work for me.  I put it in
types/initrd.te.

> At some point, we'd like
> to generate an initial bootstrapping policy that is built into the
> security server, but there isn't any point in doing that until things
> stabilize a bit more, and that initial policy could be dependent on your
> particular kernel configuration and your initrd setup.

Yeah...I think this initrd.te is a first step towards that bootstrapping
policy.


[-- Attachment #2: initrd.te --]
[-- Type: text/plain, Size: 659 bytes --]

#
# Description: allow ramfs/cramfs initrd bootstrapping from unlabeled_t
# Authors: Colin Walters <walters@verbum.org>

# Operate on unlabeled files.
allow kernel_t unlabeled_t:file_class_set create_file_perms;
allow kernel_t unlabeled_t:dir create_dir_perms;
# Allow running scripts and such on the initrd.
can_exec(kernel_t, unlabeled_t);

# Mount permissions, stolen from mount.te
allow kernel_t unlabeled_t:filesystem mount_fs_perms;
allow kernel_t unlabeled_t:dir mounton;
allow kernel_t proc_t:dir mounton;

# Operate on tmpfs.
allow kernel_t tmpfs_t:file_class_set create_file_perms;
allow kernel_t tmpfs_t:dir create_dir_perms;



      reply	other threads:[~2003-07-15 20:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-14  3:03 enforcement and initrds Colin Walters
2003-07-14 12:33 ` Stephen Smalley
2003-07-14 20:31   ` Colin Walters
2003-07-14 21:33     ` Russell Coker
2003-07-14 22:01       ` Colin Walters
2003-07-15 17:15     ` Stephen Smalley
2003-07-15 19:57       ` Colin Walters [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=1058299027.26237.163.camel@columbia \
    --to=walters@verbum.org \
    --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.