All of lore.kernel.org
 help / color / mirror / Atom feed
From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] two fixups for semanage_t: able to read from userhomedirs and manage policy store dir
Date: Mon, 10 Jan 2011 09:27:06 -0500	[thread overview]
Message-ID: <4D2B173A.4010905@tresys.com> (raw)
In-Reply-To: <SNT139-W164EF0C060280ACE8CAB4FAB1A0@phx.gbl>

On 12/20/10 22:35, HarryCiao wrote:
> 1. Make semanage_t able to read from user homedirs or /tmp. Otherwise it
> would fail to upgrade a .pp installed in there with below error messages.
> BTW, semanage_t should be able to upgrade existing pp no matter if the
> MLS is enabled or not.
>  
> root at qemu-host:/root> semodule -u selinuxutil.pp
> type=1400 audit(1288862875.298:60): avc: denied { search } for pid=759
> comm="semodule" name="root" dev=sda ino=81921
> scontext=root:secadm_r:semanage_t:s0-s15:c0.c1023
> tcontext=root:object_r:user_home_dir_t:s0-s15:c0.c1023 tclass=dir
> semodule: Failed on selinuxutil.pp!
> root at qemu-host:/root> setenforce 0
> type=1404 audit(1288862957.386:61): enforcing=0 old_enforcing=1
> auid=4294967295 ses=4294967295
> root at qemu-host:/root> semodule -u selinuxutil.pp
> type=1400 audit(1288862959.494:62): avc: denied { search } for pid=761
> comm="semodule" name="root" dev=sda ino=81921
> scontext=root:secadm_r:semanage_t:s0-s15:c0.c1023
> tcontext=root:object_r:user_home_dir_t:s0-s15:c0.c1023 tclass=dir
> type=1400 audit(1288862959.498:63): avc: denied { read } for pid=761
> comm="semodule" name="selinuxutil.pp" dev=sda ino=82505
> scontext=root:secadm_r:semanage_t:s0-s15:c0.c1023
> tcontext=root:object_r:user_home_t:s0 tclass=file
> type=1400 audit(1288862959.503:64): avc: denied { open } for pid=761
> comm="semodule" name="selinuxutil.pp" dev=sda ino=82505
> scontext=root:secadm_r:semanage_t:s0-s15:c0.c1023
> tcontext=root:object_r:user_home_t:s0 tclass=file
> type=1400 audit(1288862959.507:65): avc: denied { getattr } for pid=761
> comm="semodule" path="/root/selinuxutil.pp" dev=sda ino=82505
> scontext=root:secadm_r:semanage_t:s0-s15:c0.c1023
> tcontext=root:object_r:user_home_t:s0 tclass=file
> type=1403 audit(1288863419.918:66): policy loaded auid=4294967295
> ses=4294967295
> root at qemu-host:/root>

Merged.

> 2. 
> Make semanage_t able to manage the policy store directory, otherwise it
> would fail to update an existing pp.
>  
> root at qemu-host:/root> semodule -u vlock.pp
> type=1400 audit(1288236528.567:27): avc: denied { rename } for pid=696
> comm="semodule" name="active" dev=sda ino=76175
> scontext=root:sysadm_r:semanage_t
> tcontext=unconfined_u:object_r:selinux_config_t tclass=dir
> libsemanage.semanage_commit_sandbox: Error while renaming
> /etc/selinux/refpolicy/modules/active to
> /etc/selinux/refpolicy/modules/previous. (Permission denied).
> semodule: Failed!
>  
> type=1400 audit(1288239973.335:31): avc: denied { rmdir } for pid=701
> comm="semodule" name="modules" dev=sda ino=76184
> scontext=root:sysadm_r:semanage_t
> tcontext=unconfined_u:object_r:selinux_config_t tclass=dir

These directories are mislabeled.  They should be semanage_store_t, not
selinux_config_t.

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

  reply	other threads:[~2011-01-10 14:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-21  3:35 [refpolicy] two fixups for semanage_t: able to read from userhomedirs and manage policy store dir HarryCiao
2011-01-10 14:27 ` Christopher J. PeBenito [this message]
2011-01-11  3:38   ` HarryCiao

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=4D2B173A.4010905@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.