From: James Antill <jantill@redhat.com>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: Re: secon (Was: Policycoreutils patch)
Date: Mon, 08 May 2006 16:44:52 -0400 [thread overview]
Message-ID: <1147121092.3469.24.camel@code.and.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 2112 bytes --]
On Mon, 2006-05-08 at 10:54 -0400, Stephen Smalley wrote:
> What is the purpose of the secon utility added by this patch?
> Assuming that it is useful, a few quick comments on the implementation:
> - The my_getXcon_raw functions should be moved into libselinux (without
> the my_ prefix, of course) so that we don't need any code outside of
> libselinux directly reading /proc/pid/attr files.
Yes, I'd known about that ... I'll be providing changes for libselinux
in the next day or so.
The initial version with my_ functions was simply to make it easier for
others to be able to compile the code.
> - Falling back to the current context when the exec or fscreate context
> is not set is not correct. Absence of exec or fscreate context just
> means that the default policy behavior (e.g. type_transition or default
> inheritance) will be applied. While default inheritance would mean that
> the current context is applied for exec, there could be a
> type_transition, and it makes no sense at all for fscreate (where
> default inheritance combines information from the current context with
> the parent directory context). I think you just want to report NULL /
> none or similar to the user.
I was wary of reporting just a blank, but it's a simple change to fix
that.
> - The call to selinux_trans_to_raw_context() doesn't make sense since
> you are already calling the _raw functions. If opt->disp_raw is set,
> then no further processing should be required, right?
If the context comes from the user (Ie. stdin or argument), we don't
know if the context is raw or translated. So we always convert. This
allows:
id -Z | secon -R -
...to output the right thing.
The other thing we are looking at is what the default should be, Steve
Grubb suggested that reading from stdin should be it ... but I don't
like that from a UI POV and that most cases are better handled otherwise
(Ie. ls -Z is never going to be parsable, IMO, so secon -f is much
better).
--
James Antill
<james.antill@redhat.com>
--
James Antill
<james.antill@redhat.com>
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 191 bytes --]
next reply other threads:[~2006-05-08 20:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-08 20:44 James Antill [this message]
[not found] ` <1148330873.24463.139.camel@moss-spartans.epoch.ncsc.mil>
[not found] ` <1148332107.29408.2.camel@code.and.org>
[not found] ` <1148388875.24463.152.camel@moss-spartans.epoch.ncsc.mil>
2006-05-25 21:25 ` secon (Was: Policycoreutils patch) James Antill
[not found] <445BB803.4050409@redhat.com>
2006-05-08 14:54 ` Stephen Smalley
2006-05-08 16:13 ` 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=1147121092.3469.24.camel@code.and.org \
--to=jantill@redhat.com \
--cc=james.antill@redhat.com \
--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.