All of lore.kernel.org
 help / color / mirror / Atom feed
From: KaiGai Kohei <kaigai@ak.jp.nec.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: selinux@tycho.nsa.gov, James Morris <jmorris@namei.org>,
	Eric Paris <eparis@parisplace.org>,
	Paul Moore <paul.moore@hp.com>,
	"Christopher J. PeBenito" <cpebenito@tresys.com>,
	Joshua Brindle <jbrindle@tresys.com>
Subject: Re: [PATCH v4 2/2] selinux:  generate flask headers during kernel build
Date: Wed, 30 Sep 2009 12:00:47 +0900	[thread overview]
Message-ID: <4AC2C9DF.2010402@ak.jp.nec.com> (raw)
In-Reply-To: <1254250342.2252.203.camel@moss-pluto.epoch.ncsc.mil>

> One other note:  before we can allow arbitrary ordering of class
> definitions, we need to update all userspace object managers to use
> selinux_set_mapping().  This includes cronie,  usermode, pam, mcstrans,
> passwd, shadow-utils, util-linux-ng, nscd (glibc), dbus and possibly
> others I am forgetting.  Also libselinux rpm_execcon().

busybox. It uses checkPasswdAccess() which internally calls
string_to_security_class() but requested access vector is
delivered without any translation.

#if ENABLE_SELINUX
static void check_selinux_update_passwd(const char *username)
{
        security_context_t context;
        char *seuser;

        if (getuid() != (uid_t)0 || is_selinux_enabled() == 0)
                return;         /* No need to check */

        if (getprevcon_raw(&context) < 0)
                bb_perror_msg_and_die("getprevcon failed");
        seuser = strtok(context, ":");
        if (!seuser)
                bb_error_msg_and_die("invalid context '%s'", context);
        if (strcmp(seuser, username) != 0) {
                if (checkPasswdAccess(PASSWD__PASSWD) != 0)
                        bb_error_msg_and_die("SELinux: access denied");
        }
        if (ENABLE_FEATURE_CLEAN_UP)
                freecon(context);
}
#else
#define check_selinux_update_passwd(username) ((void)0)
#endif

-- 
OSS Platform Development Division, NEC
KaiGai Kohei <kaigai@ak.jp.nec.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:[~2009-09-30  3:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-29 17:09 [PATCH v4 1/2] selinux: dynamic class/perm discovery Stephen Smalley
2009-09-29 17:14 ` [PATCH v4 2/2] selinux: generate flask headers during kernel build Stephen Smalley
2009-09-29 18:03   ` Stephen Smalley
2009-09-29 18:52     ` Stephen Smalley
2009-09-30  3:00       ` KaiGai Kohei [this message]
2009-09-30  2:32     ` KaiGai Kohei
2009-09-30 12:39       ` Stephen Smalley
2009-09-30 12:53         ` Stephen Smalley
2009-09-30 21:46           ` James Morris
2009-10-01 12:32             ` Stephen Smalley
2009-10-01 12:55               ` Joshua Brindle
2009-10-01 13:46               ` Paul Moore
2009-10-01 15:31                 ` Stephen Smalley
2009-10-03  0:33               ` Chris PeBenito
2009-10-03 18:30                 ` 欧珂塔维亚
2009-09-30 13:54         ` Stephen Smalley
2009-09-30 14:47           ` Stephen Smalley
2009-09-30 15:10             ` Stephen Smalley
2009-09-30 15:25       ` Stephen Smalley
2009-09-30 16:40         ` Stephen Smalley

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=4AC2C9DF.2010402@ak.jp.nec.com \
    --to=kaigai@ak.jp.nec.com \
    --cc=cpebenito@tresys.com \
    --cc=eparis@parisplace.org \
    --cc=jbrindle@tresys.com \
    --cc=jmorris@namei.org \
    --cc=paul.moore@hp.com \
    --cc=sds@tycho.nsa.gov \
    --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.