All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <jbrindle@tresys.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: SELinux-dev@tresys.com, SELinux List <SELinux@tycho.nsa.gov>
Subject: Re: [PATCH] mls in modules
Date: Mon, 03 Oct 2005 13:09:55 -0400	[thread overview]
Message-ID: <434165E3.5050804@tresys.com> (raw)
In-Reply-To: <1128353485.26285.119.camel@moss-spartans.epoch.ncsc.mil>

Stephen Smalley wrote:
> On Fri, 2005-09-30 at 16:42 -0400, Joshua Brindle wrote:
> 
>>This patch allows both base modules and modules to be built with the -M
>>(MLS) flag. For base modules it adds all the MLS components that are in
>>the normal policy. For modules it sets the MLS flag. The following
>>restrictions are currently placed on the policy:
>>
>>- Users cannot be declared in MLS modules, because levels cannot be
>>'required'
> 
> 
> Will this be addressed soon?  Or are modules in Fedora going to be
> unable to declare users at all?

This is on the list to do but is currently low priority. There are no 
plans to add this for FC5. As long as all users are added through the 
user files (system.user and local.user), it should not be necessary to 
add users in modules. Note, users with levels can be in the base module 
so the failsafe users will still be in the policy. If you disagree with 
the need for this please let us know.


> 
> diff -purN -x .svn libsepol/include/sepol/context.h libsepol/include/sepol/context.h
> --- libsepol/include/sepol/context.h	2005-09-19 09:03:15.000000000 -0400
> +++ libsepol/include/sepol/context.h	2005-09-30 11:16:30.000000000 -0400
> @@ -38,6 +38,10 @@ typedef struct context_struct {
>  static inline void mls_context_init(context_struct_t * c)
>  {
>  	memset(&c->range, 0, sizeof(c->range));
> +	memset(&c->range.level[0], 0, sizeof(c->range.level[0]));
> +	memset(&c->range.level[1], 0, sizeof(c->range.level[1]));
> +	ebitmap_init(&c->range.level[0].cat);
> +	ebitmap_init(&c->range.level[1].cat);
>  }
> 
> Seems a bit redundant?
> 
> @@ -75,12 +73,9 @@ static inline int mls_context_cmp(contex
>  
>  static inline void mls_context_destroy(context_struct_t * c)
>  {
> -	if (!sepol_mls_enabled())
> -		return;
> -
>  	ebitmap_destroy(&c->range.level[0].cat);
>  	ebitmap_destroy(&c->range.level[1].cat);
> -	mls_context_init(c);
> +	memset(&c->range, 0, sizeof(c->range));
>  }
> 
> Seems equivalent.

Yes, I got a little overzealous with the initialization, go ahead and 
remove these.

Joshua


--
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:[~2005-10-03 17:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-30 20:42 [PATCH] mls in modules Joshua Brindle
2005-10-03 15:31 ` Stephen Smalley
2005-10-03 17:09   ` Joshua Brindle [this message]
2005-10-03 19:32     ` Stephen Smalley
2005-10-03 21:14     ` Stephen Smalley
2005-10-04 11:56       ` 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=434165E3.5050804@tresys.com \
    --to=jbrindle@tresys.com \
    --cc=SELinux-dev@tresys.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=sds@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.