From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: SE-Linux <selinux@tycho.nsa.gov>
Subject: Re: policy patch for tunable "/dev/hdc is removable drive"
Date: Tue, 24 Aug 2004 15:22:01 +0100 [thread overview]
Message-ID: <20040824142201.GB4698@lkcl.net> (raw)
In-Reply-To: <20040824091520.GE11911@rom.cip.ifi.lmu.de>
On Tue, Aug 24, 2004 at 11:15:20AM +0200, Thomas Bleher wrote:
> * Luke Kenneth Casson Leighton <lkcl@lkcl.net> [2004-08-24 03:38]:
> > in amongst this lot are two lines that say /dev/hdc something here
> > we go:
> >
> > > +/.?u?dev/hdc -b system_u:object_r:tunably_defined_disk_t
> > > +/.?u?dev/[h]d[^/^c]* -b system_u:object_r:fixed_disk_device_t
>
> I don't think this is the right approach. Not all users have their
> CD-Rom on /dev/hdc.
no, i know: that's why i set it to a tunable called
"tunably_defined_disk_t" :)
> I've been using a hack to the Makefile which works well on the
> hundred-odd machines we have here:
>
> --- orig/Makefile
> +++ mod/Makefile
> @@ -145,6 +145,7 @@
> @grep -v "^/root" $@.tmp > $@.root
> @/usr/sbin/genhomedircon . $@.root > $@
> @grep "^/root" $@.tmp >> $@
> + @for i in /proc/ide/hd*/media; do grep -q cdrom $$i && echo $$i | awk -F / '{ print "/dev/"$$4"\t-b\tsystem_u:object_r:removable_device_t"}' >> $@; done
> @-rm $@.tmp $@.root
okay... that's fine on a system that doesn't use udev :) :)
> This inserts a special line into the file_contexts file for every cdrom
> found on the system (according to proc).
> I am however not sure how a proper solution would look like; do we want
> to make policy that system dependant?
> Maybe we need a tool like genhomedircon for devices.
perhaps udev could communicate to run-time tunables to "switch"
certain device types (like the example tunably_defined_disk_t)
from their aliases fixed_disk_device_t to removable_disk_device_t?
of course, it would be necessary to do "prep" things with a
tunably_defined_hda_t, tunably_defined_hdb_t, tunably_defined you
get the idea.
l.
--
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.
next prev parent reply other threads:[~2004-08-24 14:10 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-23 21:42 policy patch for tunable "/dev/hdc is removable drive" Luke Kenneth Casson Leighton
2004-08-24 0:22 ` Luke Kenneth Casson Leighton
2004-08-24 9:15 ` Thomas Bleher
2004-08-24 12:22 ` Valdis.Kletnieks
2004-08-25 11:38 ` Thomas Bleher
2004-08-24 14:22 ` Luke Kenneth Casson Leighton [this message]
2004-08-25 11:40 ` Russell Coker
2004-08-25 13:53 ` Luke Kenneth Casson Leighton
2004-08-25 13:57 ` Russell Coker
2004-08-25 16:20 ` Luke Kenneth Casson Leighton
2004-08-25 23:51 ` Russell Coker
2004-08-26 11:00 ` Luke Kenneth Casson Leighton
2004-08-25 17:07 ` Colin Walters
2004-08-28 13:54 ` Russell Coker
2004-08-29 13:17 ` Colin Walters
2004-09-01 6:19 ` Russell Coker
2004-08-24 11:06 ` Stephen Smalley
2004-08-24 14:58 ` Luke Kenneth Casson Leighton
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=20040824142201.GB4698@lkcl.net \
--to=lkcl@lkcl.net \
--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.