From: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
To: Stephen Smalley <sds@epoch.ncsc.mil>
Cc: Colin Walters <walters@redhat.com>,
Daniel J Walsh <dwalsh@redhat.com>,
SELinux <selinux@tycho.nsa.gov>
Subject: Re: Proposed Hardware File Context file.
Date: Fri, 3 Sep 2004 15:38:08 +0100 [thread overview]
Message-ID: <20040903143808.GA26568@lkcl.net> (raw)
In-Reply-To: <1094218416.19206.116.camel@moss-spartans.epoch.ncsc.mil>
On Fri, Sep 03, 2004 at 09:33:36AM -0400, Stephen Smalley wrote:
> On Fri, 2004-09-03 at 09:17, Luke Kenneth Casson Leighton wrote:
> > ironically, it's scripted - with regexps matching nodes :)
> >
> > and then the owner, group and permissions are specified.
> >
> > there's also a system for dealing with classes of devices.
> >
> > so ide and scsi and also cd symbolic links are dealt with separately,
> > with scripts.
>
> It seems desirable to keep the SELinux context mapping approach for udev
> consistent with the base udev permissions approach. Using a separate
> config file is reasonable (and allows us to keep it as part of the
> policy package), but the syntax should mirror the existing udev
> permission syntax as much as possible, I think, and we may even want
> udev itself to directly interpret it, just as dbusd is handling its
> service->context mapping (iirc). How does that sound? Not sure how to
> integrate SELinux labeling with the scripts.
what do you think of the idea of
"run-time enabling of alternative file contexts"?
because i still think that extending the existing
file_contexts syntax to have an optional keyword at the
end, and then providing extended versions of the existing
libselinux file context related functions, would provide
the simplest from-here-to-there approach.
it's a cut/paste job in libselinux.
it's generic enough to be used by programs other than udev should
it prove necessary.
udev can determine what the type of the device is and can simply
pass the keyword representing that device type to the extended-syntax
versions of the libselinux fscontext functions.
for simplicity of coding (in udev), the behaviour of the
extended-libselinux-fscontext could be that if there doesn't
happen to _be_ a line matching the keyword, the keyword is ignored
[and the filecontext matching the regexp, mode_t are used as is
presently normal].
alternatively if that could result in undesirable side-effects,
return an error code if the keyword is not available.
for example... oh, i dunno... you could set the "default" keyword
to something different.
what about postfix's chroot-labelled files: you don't want those
to be in there under certain circumstances: you certainly don't
want them activated if the admin decides they don't want to chroot
postfix.
... but they have to _be_ there because at present there's no
flexibility to disable them - without editing
file_contexts/programs/postfix.te.
if you had a keyword "postfix" on the end of the chroot lines
in file_contexts, you could enable those as required
(setfiles --keyword "postfix" /etc/selinux/contexts/file_contexts
/var/lib/postfix/chroot/)
more if i think of it.
if you add the keyword argument to setfiles and restorecon, it's
possible to entirely change, at runtime, all or any part of the
filesystem to a different configuration - without recompiling the
policy.
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-09-03 16:03 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-24 8:18 policy patch Russell Coker
2004-08-24 12:23 ` Stephen Smalley
2004-08-24 16:54 ` Russell Coker
2004-08-27 20:58 ` James Carter
2004-08-28 13:46 ` Russell Coker
2004-08-30 20:24 ` James Carter
2004-09-02 12:46 ` Latest Patches Daniel J Walsh
2004-09-02 12:54 ` Stephen Smalley
2004-09-02 15:23 ` Daniel J Walsh
2004-09-02 15:46 ` Stephen Smalley
2004-09-02 15:53 ` Daniel J Walsh
2004-09-02 16:48 ` Stephen Smalley
2004-09-02 16:57 ` Stephen Smalley
2004-09-02 19:48 ` Luke Kenneth Casson Leighton
2004-09-02 19:42 ` Daniel J Walsh
2004-09-02 20:23 ` Luke Kenneth Casson Leighton
2004-09-02 13:10 ` Stephen Smalley
2004-09-02 13:38 ` Russell Coker
2004-09-02 14:46 ` Stephen Smalley
2004-09-02 15:52 ` Proposed Hardware File Context file Daniel J Walsh
2004-09-02 19:38 ` Stephen Smalley
2004-09-02 19:48 ` Daniel J Walsh
2004-09-02 19:59 ` Stephen Smalley
2004-09-02 20:08 ` Daniel J Walsh
2004-09-02 20:09 ` Stephen Smalley
2004-09-02 20:15 ` Daniel J Walsh
2004-09-02 23:30 ` Colin Walters
2004-09-03 11:28 ` Stephen Smalley
2004-09-03 13:17 ` Luke Kenneth Casson Leighton
2004-09-03 13:33 ` Stephen Smalley
2004-09-03 14:38 ` Luke Kenneth Casson Leighton [this message]
2004-09-03 16:28 ` Stephen Smalley
2004-09-03 17:03 ` Luke Kenneth Casson Leighton
2004-09-09 16:52 ` Daniel J Walsh
2004-09-02 22:45 ` Luke Kenneth Casson Leighton
2004-09-02 20:11 ` Please review openssh patch for selinux Daniel J Walsh
2004-09-03 12:48 ` Stephen Smalley
2004-09-04 11:21 ` Daniel J Walsh
2004-09-07 19:14 ` Stephen Smalley
2004-09-06 18:23 ` Nigel Kukard
2004-09-07 16:28 ` Nigel Kukard
2004-09-02 22:59 ` Proposed Hardware File Context file Luke Kenneth Casson Leighton
2004-09-02 19:54 ` Luke Kenneth Casson Leighton
2004-09-02 19:51 ` Daniel J Walsh
2004-09-02 15:38 ` Latest Patches Daniel J Walsh
2004-09-02 17:15 ` Luke Kenneth Casson Leighton
2004-09-02 18:56 ` James Carter
2004-09-02 13:27 ` Russell Coker
2004-09-02 16:30 ` Joshua Brindle
2004-09-02 16:40 ` Stephen Smalley
2004-09-02 18:00 ` Daniel J Walsh
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=20040903143808.GA26568@lkcl.net \
--to=lkcl@lkcl.net \
--cc=dwalsh@redhat.com \
--cc=sds@epoch.ncsc.mil \
--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.