Research
.
Skip Search Box

SELinux Mailing List

Re: [RFC PATCH v8 05/18] LSM: Add secctx_to_secid() LSM hook

From: Casey Schaufler <casey_at_schaufler-ca.com>
Date: Mon, 17 Dec 2007 12:42:06 -0800 (PST)

  • Stephen Smalley <sds@tycho.nsa.gov> wrote:

> On Fri, 2007-12-14 at 16:50 -0500, Paul Moore wrote:
> > Add a secctx_to_secid() LSM hook to go along with the existing
> > secid_to_secctx() LSM hook. This patch also includes the SELinux
> > implementation for this hook.
>
> Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
>
> This one can go up anytime, as we have other people wanting such a hook
> too.

I can't provide any justifications why it shouldn't go in, and there will no doubt be places where the continued use of secids will require it going forward.

> Or alternatively we need to rationalize the entire selinux/exports
> interface with these hooks as used by the networking and audit
> subsystems, as that issue will be coming up anyway for other LSMs.

Yeah. Smack is taking the pragmatic path, assuming that secid and secctx will be around at least until pigs nest in trees. You left out the USB subsystems's use of secid's, which may be the least savory of all.

> One thing to note is that some of these interfaces treat the context as
> an opaque byte array of a given length, while other ones depend on the
> context to be a NUL-terminated string (e.g. audit).

Smack and SELiunx always provide a NUL-terminated string. I would be in favor of defining a secctx as the textual representation of a security blob. If we don't, we'll need to define a third thing that is the text representation for audit before it's possible to convert audit from SELinux calls to LSM calls. Converting audit to use LSM calls will be mostly straitforward if the secctx can be assumed to be a string.

Casey Schaufler
casey@schaufler-ca.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.
Received on Mon 17 Dec 2007 - 15:42:29 EST
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service