From: Daniel J Walsh <dwalsh@redhat.com>
To: Colin Walters <walters@redhat.com>
Cc: rcoker@redhat.com, selinux@tycho.nsa.gov
Subject: Re: [patch] allow rpm_t to create/relabel device files too
Date: Wed, 04 Aug 2004 11:26:55 -0400 [thread overview]
Message-ID: <4111003F.7070500@redhat.com> (raw)
In-Reply-To: <1091633163.9005.26.camel@nexus.verbum.private>
Colin Walters wrote:
>Hi,
>
>The attached patch allows rpm_t to create/relabel device files - I
>needed this when upgrading the "dev" package on my system. I'm
>surprised this hasn't been caught before, maybe I missed something.
>
>Some AVC messages for reference:
>
>Aug 4 11:11:43 decepticon kernel: audit(1091632303.691:0): avc: denied { getattr } for pid=31094 exe=/usr/bin/python path=/dev/dri dev=sda2 ino=10111422 scontext=root:sysadm_r:rpm_t tcontext=system_u:object_r:dri_device_t tclass=dir
>Aug 4 11:16:50 decepticon kernel: audit(1091632610.920:0): avc: denied { relabelfrom } for pid=31149 exe=/usr/bin/python name=dri dev=sda2 ino=10111422 scontext=root:sysadm_r:rpm_t tcontext=system_u:object_r:dri_device_t tclass=dir
>
>
>
The /dev/dri directory is mislabled. It should be device_t. The latest
policy fixes this.
Dan
>------------------------------------------------------------------------
>
>--- policy-1.15.11/domains/program/unused/rpm.te~ 2004-07-31 06:22:37.000000000 -0400
>+++ policy-1.15.11/domains/program/unused/rpm.te 2004-08-04 11:20:40.165411688 -0400
>@@ -90,9 +90,9 @@
> general_domain_access(rpm_script_t)
>
> # read/write/create any files in the system
>-allow rpm_t { file_type - shadow_t }:{ file lnk_file dir fifo_file sock_file chr_file blk_file } { relabelfrom relabelto };
>-allow rpm_t { file_type - shadow_t }:dir create_dir_perms;
>-allow rpm_t { file_type - shadow_t }:{ file lnk_file fifo_file sock_file chr_file blk_file } create_file_perms;
>+allow rpm_t { file_type device_type -shadow_t }:{ file lnk_file dir fifo_file sock_file chr_file blk_file } { relabelfrom relabelto };
>+allow rpm_t { file_type device_type - shadow_t }:dir create_dir_perms;
>+allow rpm_t { file_type device_type - shadow_t }:{ file lnk_file fifo_file sock_file chr_file blk_file } create_file_perms;
> allow rpm_t sysfs_t:filesystem getattr;
> allow rpm_t tmpfs_t:filesystem getattr;
> dontaudit rpm_t domain:{ socket unix_dgram_socket udp_socket unix_stream_socket tcp_socket fifo_file rawip_socket packet_socket } getattr;
>
>
--
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.
prev parent reply other threads:[~2004-08-04 15:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-04 15:26 [patch] allow rpm_t to create/relabel device files too Colin Walters
2004-08-04 15:26 ` Daniel J Walsh [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=4111003F.7070500@redhat.com \
--to=dwalsh@redhat.com \
--cc=rcoker@redhat.com \
--cc=selinux@tycho.nsa.gov \
--cc=walters@redhat.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.