All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <method@manicmethod.com>
To: "Todd C. Miller" <tmiller@tresys.com>
Cc: SELinux Mail List <selinux@tycho.nsa.gov>
Subject: Re: [PATCH] genhomedircon: fix find() return value usage
Date: Tue, 21 Aug 2007 14:46:14 -0400	[thread overview]
Message-ID: <46CB32F6.3000106@manicmethod.com> (raw)
In-Reply-To: <200708202032.l7KKWWCY009001@tex.courtesan.com>

Todd C. Miller wrote:
> This patch fixes a bug in the genhomedircon python script that would
> ignore valid entries such as:
>
> /tmp/\.exchange-USER(/.*)?  system_u:object_r:ROLE_evolution_exchange_tmp_t:s0
>
> With this fix the python genhomedircon and the C replacement produce
> equivalent output.
>
>   
Note that this is for the stable branch only, since it conflicts with 
the pending genhomedircon replacement patch for trunk. Does anyone 
object to this going into stable?

> Signed-Off-By: Todd Miller <tmiller@tresys.com>
>
> Index: policycoreutils/scripts/genhomedircon
> ===================================================================
> --- policycoreutils/scripts/genhomedircon	(revision 2519)
> +++ policycoreutils/scripts/genhomedircon	(working copy)
> @@ -272,7 +272,7 @@
>  		ret = ""
>  		fd = open(self.getHomeDirTemplate(), 'r')
>  		for i in  fd.readlines():
> -			if i.find("USER") == 1:
> +			if i.find("USER") >= 0:
>  				i = i.replace("USER", user)
>  				i = i.replace("ROLE", prefix)
>  				i = i.replace("system_u", sel_user)
>
> --
> This message was distributed to subscribers of the selinux mailing list.
> If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
> the words "unsubscribe selinux" without quotes as the message.
>
>   



--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.

  reply	other threads:[~2007-08-21 18:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-20 20:32 [PATCH] genhomedircon: fix find() return value usage Todd C. Miller
2007-08-21 18:46 ` Joshua Brindle [this message]
2007-08-23 13:40   ` Stephen Smalley
2007-08-23 14:57 ` Stephen Smalley

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=46CB32F6.3000106@manicmethod.com \
    --to=method@manicmethod.com \
    --cc=selinux@tycho.nsa.gov \
    --cc=tmiller@tresys.com \
    /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.