All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <jbrindle@tresys.com>
To: Ivan Gyurdiev <ivg2@cornell.edu>
Cc: SELinux List <SELinux@tycho.nsa.gov>,
	Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: [SEMANAGE] Optional rebuild
Date: Mon, 02 Jan 2006 13:49:23 -0500	[thread overview]
Message-ID: <43B975B3.4000103@tresys.com> (raw)
In-Reply-To: <43AC5726.8090102@cornell.edu>

Ivan Gyurdiev wrote:
> This patch uses the modified flags to skip a rebuild whenever possible.
> It also adds the active boolean header to semanage.h (which I missed 
> because of diff excludes).
> It will now commit changes to the active booleans, so if no policy 
> changes are done (modified = 0), or
> changes are done, but preservebools is enabled (which it is, by 
> default), then changes to active
> booleans in the transaction will work as expected, and will not be 
> overwritten by policy booleans.

I'm not sure I understand this. If preservebools is enabled the policy 
must be rebuilt. Looking at the patch it looks like you do rebuild when 
persistent booleans are changed though.
> 
> This is also an optimization - allows running commit without rebuilding 
> the policy, which could be beneficial for read-only operations using a 
> transaction - it also seems more correct, because a read-only operation 
> should not alter the state of the system - commit should not apply any 
> changes that weren't explicit.

A commit is by definition a write operation. The user is responsible for 
  not committing if there aren't any changes.

> 
> Note that semodule -B with no arguments will break, because now the 
> build will be skipped. I haven't fixed it yet, but I've added an 
> interface for that purpose - semanage_do_rebuild, to parallel 
> semanage_do_reload (but the default in this new function is 0 - no 
> rebuilds if no changes).
> 
I see that you already sent this patch but it's better not to break 
things with the intention of fixing them later.

--
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-01-02 18:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-23 19:59 [SEMANAGE] Optional rebuild Ivan Gyurdiev
2006-01-02 18:49 ` Joshua Brindle [this message]
2006-01-02 17:06   ` Ivan Gyurdiev

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=43B975B3.4000103@tresys.com \
    --to=jbrindle@tresys.com \
    --cc=SELinux@tycho.nsa.gov \
    --cc=ivg2@cornell.edu \
    --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.