All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: Stephen Smalley <sds@tycho.nsa.gov>, SE Linux <selinux@tycho.nsa.gov>
Subject: policycoreutils patch
Date: Fri, 01 Jun 2007 10:32:35 -0400	[thread overview]
Message-ID: <46602E03.8080200@redhat.com> (raw)

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

policycoreutils should be checking if the user is the default_type not 
hard coded to user_u.

Also if selinux is not enabled, the verification step should not 
happen.  This is causing problems in chroot environments for the install.

Both these fixes should go into the new genhomedircon that is being 
added to semanage.

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

diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-2.0.19/scripts/genhomedircon
--- nsapolicycoreutils/scripts/genhomedircon	2007-05-18 09:58:33.000000000 -0400
+++ policycoreutils-2.0.19/scripts/genhomedircon	2007-06-01 10:29:32.000000000 -0400
@@ -193,7 +193,7 @@
 		return prefix
 		
 	def adduser(self, udict, user, seuser, prefix):
-		if seuser == "user_u" or user == "__default__" or user == "system_u":
+		if seuser == self.default_user or user == "__default__" or user == "system_u":
 			return
 		# !!! chooses first prefix in the list to use in the file context !!!
 		try:
@@ -263,7 +263,7 @@
 				i = i.replace("system_u", seuser)
 				# Validate if the generated context exists.  Some user types may not exist
 				scon = i.split()[-1]
-				if selinux.security_check_context(scon) == 0:
+				if selinux.is_selinux_enabled() < 1 or selinux.security_check_context(scon) == 0:
 					ret = ret+i
 		fd.close()
 		return ret

             reply	other threads:[~2007-06-01 14:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-01 14:32 Daniel J Walsh [this message]
2007-06-05 14:05 ` policycoreutils patch Stephen Smalley
  -- strict thread matches above, loose matches on Subject: below --
2008-10-23 17:15 Daniel J Walsh
2008-11-10 15:52 ` Joshua Brindle
2008-08-01 11:43 Daniel J Walsh
2008-08-05 13:44 ` Stephen Smalley
2008-08-05 13:57   ` Stephen Smalley
2008-08-05 14:20   ` Daniel J Walsh
2008-01-11 21:15 Daniel J Walsh
2008-01-23 21:01 ` Stephen Smalley
2007-12-06 18:34 Daniel J Walsh
2007-12-07 20:19 ` Stephen Smalley
2007-04-26 15:30 Daniel J Walsh
2007-04-26 19:18 ` Karl MacMillan
2007-04-27 12:50   ` Daniel J Walsh
2007-04-27 14:30     ` Karl MacMillan
2007-04-27 15:10       ` Stephen Smalley
     [not found] <45DB0AB8.3070803@redhat.com>
2007-02-21 17:22 ` Stephen Smalley
2006-03-29 15:19 Daniel J Walsh
2003-11-19  3:40 Russell Coker

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=46602E03.8080200@redhat.com \
    --to=dwalsh@redhat.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.