From: Ivan Gyurdiev <ivg2@cornell.edu>
To: sds@tycho.nsa.gov
Cc: Joshua Brindle <jbrindle@tresys.com>,
"Christopher J. PeBenito" <cpebenito@tresys.com>,
Daniel J Walsh <dwalsh@redhat.com>,
SE Linux <selinux@tycho.nsa.gov>
Subject: Re: The sort algorithm is broken by the second rule, We need a way to pin these rules to the top.
Date: Fri, 31 Mar 2006 12:26:23 -0500 [thread overview]
Message-ID: <442D663F.8010200@cornell.edu> (raw)
In-Reply-To: <442D5A3F.9090409@cornell.edu>
[-- Attachment #1: Type: text/plain, Size: 384 bytes --]
> Hmm, I think we actually don't have this capability as of right now -
> my fault, as I didn't get around to addressing this issue, which would
> consist of either not merging the .local file into the other one (as
> we do now), or moving the sort algorithm into libsemanage, where it
> would sort the local things separately from the module things.
...maybe this will help.
[-- Attachment #2: libsemanage.install_fc_local.diff --]
[-- Type: text/x-patch, Size: 2896 bytes --]
diff -Naurp --exclude-from excludes old/libsemanage/src/policy_components.c new/libsemanage/src/policy_components.c
--- old/libsemanage/src/policy_components.c 2006-03-15 12:21:56.000000000 -0500
+++ new/libsemanage/src/policy_components.c 2006-03-31 12:22:34.000000000 -0500
@@ -136,8 +136,11 @@ int semanage_base_merge_components(
{ semanage_bool_dbase_local(handle),
semanage_bool_dbase_policy(handle), MODE_SET },
+#if 0
+ /* Sorting algorithm must be moved to libsemanage first */
{ semanage_fcontext_dbase_local(handle),
semanage_fcontext_dbase_policy(handle), MODE_MODIFY },
+#endif
{ semanage_seuser_dbase_local(handle),
semanage_seuser_dbase_policy(handle), MODE_MODIFY },
@@ -219,7 +222,10 @@ int semanage_commit_components(
semanage_user_extra_dbase_policy(handle),
semanage_port_dbase_local(handle),
semanage_fcontext_dbase_local(handle),
+#if 0
+ /* Sorting algorithm must be moved to libsemanage first */
semanage_fcontext_dbase_policy(handle),
+#endif
semanage_seuser_dbase_local(handle),
semanage_seuser_dbase_policy(handle),
semanage_bool_dbase_active(handle),
diff -Naurp --exclude-from excludes old/libsemanage/src/semanage_store.c new/libsemanage/src/semanage_store.c
--- old/libsemanage/src/semanage_store.c 2006-03-08 12:15:25.000000000 -0500
+++ new/libsemanage/src/semanage_store.c 2006-03-31 12:11:13.000000000 -0500
@@ -931,6 +931,7 @@ static int semanage_install_active(seman
struct stat astore, istore;
const char *active_kernel = semanage_path(SEMANAGE_ACTIVE,SEMANAGE_KERNEL);
const char *active_fc = semanage_path(SEMANAGE_ACTIVE, SEMANAGE_FC);
+ const char *active_fc_local = semanage_path(SEMANAGE_ACTIVE, SEMANAGE_FC_LOCAL);
const char *active_hd = semanage_path(SEMANAGE_ACTIVE, SEMANAGE_HOMEDIR_TMPL);
const char *active_seusers = semanage_path(SEMANAGE_ACTIVE, SEMANAGE_SEUSERS);
@@ -944,6 +945,7 @@ static int semanage_install_active(seman
* building code in libselinux so that you can get paths for a given
* POLICYTYPE and should probably be done in the future. */
char store_fc[PATH_MAX];
+ char store_fc_local[PATH_MAX];
char store_hd[PATH_MAX];
char store_pol[PATH_MAX];
char store_seusers[PATH_MAX];
@@ -979,6 +981,13 @@ static int semanage_install_active(seman
goto cleanup;
}
+ /* Should not be necessary once sorting algorithm is moved into libsemanage */
+ snprintf(store_fc_local, PATH_MAX, "%s%s.local", storepath, running_fc);
+ if (semanage_copy_file(active_fc_local, store_fc_local, sh->conf->file_mode) == -1) {
+ ERR(sh, "Could not copy %s to %s.", active_fc_local, store_fc_local);
+ goto cleanup;
+ }
+
snprintf(store_seusers, PATH_MAX, "%s%s", storepath, running_seusers);
if (semanage_copy_file(active_seusers, store_seusers, sh->conf->file_mode) == -1) {
INFO(sh, "Non-fatal error: Could not copy %s to %s.", active_seusers, store_seusers);
next prev parent reply other threads:[~2006-03-31 17:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-31 14:50 The sort algorithm is broken by the second rule, We need a way to pin these rules to the top Daniel J Walsh
2006-03-31 14:57 ` Joshua Brindle
2006-03-31 15:01 ` Daniel J Walsh
2006-03-31 15:17 ` Joshua Brindle
2006-03-31 16:01 ` Christopher Ashworth
2006-03-31 19:27 ` Stephen Smalley
2006-03-31 15:17 ` Stephen Smalley
2006-03-31 15:20 ` Stephen Smalley
2006-03-31 15:10 ` Stephen Smalley
2006-03-31 16:35 ` Ivan Gyurdiev
2006-03-31 17:26 ` Ivan Gyurdiev [this message]
2006-04-02 11:32 ` Ivan Gyurdiev
2006-03-31 18:52 ` Stephen Smalley
2006-03-31 19:03 ` Ivan Gyurdiev
2006-03-31 19:15 ` Stephen Smalley
2006-03-31 19:18 ` Joshua Brindle
2006-03-31 19:32 ` Stephen Smalley
2006-04-02 17:55 ` Joshua Brindle
2006-04-02 20:13 ` Ivan Gyurdiev
2006-04-02 20:31 ` Joshua Brindle
2006-03-31 22:17 ` 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=442D663F.8010200@cornell.edu \
--to=ivg2@cornell.edu \
--cc=cpebenito@tresys.com \
--cc=dwalsh@redhat.com \
--cc=jbrindle@tresys.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.