All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joshua Brindle <method@manicmethod.com>
To: "Christopher J. PeBenito" <cpebenito@tresys.com>
Cc: selinux <selinux@tycho.nsa.gov>
Subject: Re: [PATCH] homedir_template generation skips USER lines
Date: Tue, 11 Nov 2008 15:39:03 -0500	[thread overview]
Message-ID: <4919ED67.7090605@manicmethod.com> (raw)
In-Reply-To: <1226414940.24358.15.camel@gorn>

Christopher J. PeBenito wrote:
> The current libsemanage code does not correctly add lines which include
> USER in them into the homedir_template, for example:
>
> /tmp/gconfd-USER -d	system_u:object_r:ROLE_tmp_t
>
> This line was included in the past since it has ROLE.  However, with the
> switch to UBAC separations, the line has changed to:
>
> /tmp/gconfd-USER -d	system_u:object_r:user_tmp_t
>
> and is no longer included.  The follwing patch fixes.
>
> diff --git a/libsemanage/src/semanage_store.c b/libsemanage/src/semanage_store.c
> index ab79c28..9f197ed 100644
> --- a/libsemanage/src/semanage_store.c
> +++ b/libsemanage/src/semanage_store.c
> @@ -983,7 +983,8 @@ int semanage_split_fc(semanage_handle_t * sh)
>  
>  	while (fgets_unlocked(buf, PATH_MAX, file_con)) {
>  		if (!strncmp(buf, "HOME_DIR", 8) ||
> -		    !strncmp(buf, "HOME_ROOT", 9) || strstr(buf, "ROLE")) {
> +		    !strncmp(buf, "HOME_ROOT", 9) || strstr(buf, "ROLE") ||
> +		    strstr(buf, "USER")) {
>  			/* This contains one of the template variables, write it to homedir.template */
>  			if (write(hd, buf, strlen(buf)) < 0) {
>  				ERR(sh, "Write to %s failed.",
>
>
>
>   


Merged in libsemanage-2.0.29


--
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:[~2008-11-11 20:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-11 14:49 [PATCH] homedir_template generation skips USER lines Christopher J. PeBenito
2008-11-11 20:39 ` Joshua Brindle [this message]

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=4919ED67.7090605@manicmethod.com \
    --to=method@manicmethod.com \
    --cc=cpebenito@tresys.com \
    --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.