All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ivan Gyurdiev <ivg2@cornell.edu>
To: selinux@tycho.nsa.gov
Cc: Joshua Brindle <jbrindle@tresys.com>,
	Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: [SEMANAGE] User extra data (part 1)
Date: Mon, 09 Jan 2006 22:48:30 -0700	[thread overview]
Message-ID: <43C34AAE.1060908@cornell.edu> (raw)
In-Reply-To: <43C33ECB.2020608@cornell.edu>

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

Bugfix for modified flags attached. I need to write support for re-using 
the linked policy from the last run - none of the file backed components 
needs to relink every time. Otherwise those modified flags aren't very 
useful - they only do something for the case of active booleans (prevent 
overwrite by policy booleans).

[-- Attachment #2: libsemanage.users_extra_modified.diff --]
[-- Type: text/x-patch, Size: 1769 bytes --]

diff -Naurp --exclude ports_local.c --exclude-from excludes old/libsemanage/src/direct_api.c new/libsemanage/src/direct_api.c
--- old/libsemanage/src/direct_api.c	2006-01-09 22:41:55.000000000 -0700
+++ new/libsemanage/src/direct_api.c	2006-01-09 22:39:18.000000000 -0700
@@ -368,6 +368,7 @@ static int semanage_direct_commit(semana
 	/* Check if anything was changed */
 	int modified = sh->modules_modified;
 	dbase_config_t* users = semanage_user_dbase_local(sh);
+	dbase_config_t* users_extra = semanage_user_extra_dbase_local(sh);
 	dbase_config_t* ports = semanage_port_dbase_local(sh);
 	dbase_config_t* bools = semanage_bool_dbase_local(sh);
 	dbase_config_t* ifaces = semanage_iface_dbase_local(sh);
@@ -375,15 +376,17 @@ static int semanage_direct_commit(semana
 	dbase_config_t* seusers = semanage_seuser_dbase(sh);
 	int fcontexts_modified = fcontexts->dtable->is_modified(fcontexts->dbase);
 	int seusers_modified = seusers->dtable->is_modified(seusers->dbase);
+	int users_extra_modified = users_extra->dtable->is_modified(users_extra->dbase);
 	modified |= users->dtable->is_modified(users->dbase);
 	modified |= ports->dtable->is_modified(ports->dbase);
 	modified |= bools->dtable->is_modified(bools->dbase);
-	modified |= fcontexts_modified;
 	modified |= ifaces->dtable->is_modified(ifaces->dbase);
 
-	/* FIXME: get rid of this, once we support loading the existing policy,
-	 * instead of rebuilding it for seusers */
+	/* FIXME: get rid of these, once we support loading the existing policy,
+	 * instead of rebuilding it */
 	modified |= seusers_modified;
+	modified |= fcontexts_modified;
+	modified |= users_extra_modified;
 
 	/* If there were policy changes, or explicitly requested, rebuild the policy */
 	if (sh->do_rebuild || modified) {

  reply	other threads:[~2006-01-10  5:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-10  4:57 [SEMANAGE] User extra data (part 1) Ivan Gyurdiev
2006-01-10  5:48 ` Ivan Gyurdiev [this message]
2006-01-13 13:50   ` Stephen Smalley
2006-01-10 15:37 ` Joshua Brindle
2006-01-12 22:58   ` Ivan Gyurdiev
2006-01-14  5:26     ` Daniel J Walsh
2006-01-14  6:39       ` 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=43C34AAE.1060908@cornell.edu \
    --to=ivg2@cornell.edu \
    --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.