All of lore.kernel.org
 help / color / mirror / Atom feed
From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] Potential discrepance of user's HOME when polyinstantiation is enabled
Date: Wed, 16 Feb 2011 09:03:06 -0500	[thread overview]
Message-ID: <4D5BD91A.80205@tresys.com> (raw)
In-Reply-To: <SNT139-w60070A91615A51F1C22576ABEF0@phx.gbl>

On 02/10/11 22:33, HarryCiao wrote:
> Hi all,
> 
> On my sandbox if polyinstantiation is enabled then user's HOME will be
> created in /home/home.inst/ (the instance directory) and mounted to
> /home/[user] (the base directory). The namespace.conf is quoted below:
> 
> [root/sysadm_r/s0 at localhost ~]# cat /etc/security/namespace.conf
> ...
> /tmp     /tmp-inst/             level     root,adm
> /var/tmp /var/tmp-inst/         level     root,adm
> $HOME    /home/home.inst/       level     root,adm
> [root/sysadm_r/s0 at localhost ~]#
> 
>  [root/sysadm_r/s0 at localhost ~]# matchpathcon /home/
> /home   system_u:object_r:home_root_t:s0-s15:c0.c1023
> [root/sysadm_r/s0 at localhost ~]# matchpathcon /home/home.inst
> /home/home.inst system_u:object_r:tmp_t:s0
> [root/sysadm_r/s0 at localhost ~]# matchpathcon /home/home.inst/something
> /home/home.inst/something       user_u:object_r:user_home_t:s0
> [root/sysadm_r/s0 at localhost ~]#
> 
> 
> As we can see, the instance directory will be labeled as user_home_t,
> rather than user_home_dir_t as the base directory.
> 
> Is this correct? if not, how could I properly define the label of the
> instance directory to be the same as that of the base directory?
> 
> If yes, then I am afraid applications would have to be granted the
> user_home_t:dir search permissions at least along with the search
> permission on user_home_dir_t. The attached patch contains an example
> for [user]_screen_t.
> Thanks a lot!

Its not the desired behavior, in my opinion.  The labeling should be the
same as if there were no polyinstantiation.  Someone more familiar with
how the polyinstantiation is set up with pam_namespace will have to
comment further.  Its probably more appropriate to discuss this on the
SELinux list.

-- 
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com

      reply	other threads:[~2011-02-16 14:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-11  3:33 [refpolicy] Potential discrepance of user's HOME when polyinstantiation is enabled HarryCiao
2011-02-16 14:03 ` Christopher J. PeBenito [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=4D5BD91A.80205@tresys.com \
    --to=cpebenito@tresys.com \
    --cc=refpolicy@oss.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.