All of lore.kernel.org
 help / color / mirror / Atom feed
From: Russell Coker <russell@coker.com.au>
To: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Cc: Thomas Bleher <bleher@informatik.uni-muenchen.de>,
	SE-Linux <selinux@tycho.nsa.gov>
Subject: Re: policy patch for tunable "/dev/hdc is removable drive"
Date: Wed, 25 Aug 2004 23:57:08 +1000	[thread overview]
Message-ID: <200408252357.08855.russell@coker.com.au> (raw)
In-Reply-To: <20040825135316.GF4241@lkcl.net>

On Wed, 25 Aug 2004 23:53, Luke Kenneth Casson Leighton <lkcl@lkcl.net> wrote:
> > > --- 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
> >
> > Good work, but there's one minor bug.
>
>  would it work with udev, too?

udev uses the same file_contexts file, so it should work.  The only possible 
problem I can think of is that if you have a machine which boots without IDE 
disk access and which has no IDE modules loaded at the time that it has the 
file_contexts file generated then this would not work (think of servers that 
have IDE CD-ROM or DVD drives but hardware RAID or SCSI for main storage).

Of course this is not necessarily a problem, Fedora kernels have the IDE 
drivers statically linked into the kernel, and there were some issues last 
time I tried building a Debian kernel with IDE as a module so the number of 
people who might get hit by this is very small.

-- 
http://www.coker.com.au/selinux/   My NSA Security Enhanced Linux packages
http://www.coker.com.au/bonnie++/  Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/    Postal SMTP/POP benchmark
http://www.coker.com.au/~russell/  My home page

--
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:[~2004-08-25 13:57 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
2004-08-25 11:40     ` Russell Coker
2004-08-25 13:53       ` Luke Kenneth Casson Leighton
2004-08-25 13:57         ` Russell Coker [this message]
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=200408252357.08855.russell@coker.com.au \
    --to=russell@coker.com.au \
    --cc=bleher@informatik.uni-muenchen.de \
    --cc=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.