All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Gyurdiev <ivg2@cornell.edu>
To: SELinux List <SELinux@tycho.nsa.gov>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Subject: [SEMODULE] Make -B flag force rebuild (without changes)
Date: Fri, 23 Dec 2005 20:00:29 -0500	[thread overview]
Message-ID: <43AC9DAD.1050903@cornell.edu> (raw)

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

Use semanage_set_rebuild() to make the -B flag force a rebuild.
This is necessary since I changed commit to only rebuild if changes were 
made.

The whitespace in semodule is an awful mess..

[-- Attachment #2: semodule.force_rebuild.diff --]
[-- Type: text/x-patch, Size: 790 bytes --]

diff -Naurp --exclude-from excludes old/policycoreutils/semodule/semodule.c new/policycoreutils/semodule/semodule.c
--- old/policycoreutils/semodule/semodule.c	2005-11-29 10:55:01.000000000 -0500
+++ new/policycoreutils/semodule/semodule.c	2005-12-23 19:51:39.000000000 -0500
@@ -334,13 +334,13 @@ int main(int argc, char *argv[]) {
         }
         
         if (commit) {
-                if (verbose) {
-                        printf("Committing changes:\n");
-                }
-		if (no_reload) {
+		if (verbose)
+			printf("Committing changes:\n");
+		if (no_reload)
 			semanage_set_reload(sh, 0);
-		}
-                result = semanage_commit(sh);
+		if (build)
+			semanage_set_rebuild(sh, 1);
+ 		result = semanage_commit(sh);
         }
         
         if (result < 0) {

                 reply	other threads:[~2005-12-24  1:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=43AC9DAD.1050903@cornell.edu \
    --to=ivg2@cornell.edu \
    --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.