All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>
Cc: SE Linux <selinux@tycho.nsa.gov>,
	Karl MacMillan <kmacmillan@mentalrootkit.com>
Subject: Re: Policycoreutils patches
Date: Thu, 04 Jan 2007 17:07:56 -0500	[thread overview]
Message-ID: <459D7ABC.6060902@redhat.com> (raw)
In-Reply-To: <1167929394.18961.86.camel@moss-spartans.epoch.ncsc.mil>

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

Ok this part of the seobject patch should not be controversial.

This patch fixes modification of roles.
>   


[-- Attachment #2: diff --]
[-- Type: text/plain, Size: 937 bytes --]

diff --exclude-from=exclude --exclude POTFILES.in --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-1.33.8/semanage/seobject.py
--- nsapolicycoreutils/semanage/seobject.py	2006-11-16 17:14:26.000000000 -0500
+++ policycoreutils-1.33.8/semanage/seobject.py	2007-01-04 17:06:25.000000000 -0500
@@ -525,8 +525,12 @@
 				semanage_user_set_prefix(self.sh, u, prefix)
 
 			if len(roles) != 0:
-				for r in roles:
-					semanage_user_add_role(self.sh, u, r)
+                               for r in rlist:
+                                      if r not in roles:
+                                             semanage_user_del_role(u, r)
+                               for r in roles:
+                                      if r not in rlist:
+                                             semanage_user_add_role(self.sh, u, r)
 
 			rc = semanage_begin_transaction(self.sh)
 			if rc < 0:

  reply	other threads:[~2007-01-04 22:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-03 18:05 Policycoreutils patches Daniel J Walsh
2007-01-04 16:28 ` Stephen Smalley
2007-01-04 16:49   ` Stephen Smalley
2007-01-04 22:07     ` Daniel J Walsh [this message]
2007-01-05 18:16       ` Stephen Smalley
2007-01-05 18:55         ` Stephen Smalley
2007-01-08 16:15           ` Daniel J Walsh
  -- strict thread matches above, loose matches on Subject: below --
2007-08-02 18:46 policycoreutils patches Daniel J Walsh
2007-08-16 17:21 ` Stephen Smalley
2007-08-17 13:20   ` Karl MacMillan

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=459D7ABC.6060902@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=kmacmillan@mentalrootkit.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.