From: Daniel J Walsh <dwalsh@redhat.com>
To: Sven Vermeulen <sven.j.vermeulen@gmail.com>
Cc: SELinux <selinux@tycho.nsa.gov>, Stephen Smalley <sds@tycho.nsa.gov>
Subject: Re: Force avc_has_perm to return success if enforcing == 0;
Date: Wed, 15 Feb 2012 10:25:36 -0500 [thread overview]
Message-ID: <4F3BCE70.6060507@redhat.com> (raw)
In-Reply-To: <CAPzO=Nw+T8_QkzHPboQ-s399hmdMF0jb0_3ipSrSyqpHztfOfg@mail.gmail.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 02/15/2012 07:50 AM, Sven Vermeulen wrote:
> On Feb 14, 2012 10:26 PM, "Daniel J Walsh" <dwalsh@redhat.com
> <mailto:dwalsh@redhat.com>> wrote:
>> I would like to patch libselinux to always return 0 on
>> avc_has_perm if the machine is in permissive mode.
>>
>> This will allow Userspace Object Managers to work even if the
>> system is totally mislabeled and processes as running with bad
>> context. Currently if a program like dbus asks with a bad process
>> label it can get denials even in permissive mode.
>
> Shouldn't SELinux-aware applications be aware as well that
> "permissive" exists? I don't know what the impact would be to
> change the libselinux code here, but if dbus (and other
> applications that link with libselinux) would check the selinuxtype
> as well they have full control over what happens.
>
> A similar thing exists with SELinux-aware applications that call
> getexeccon() when their context is wrong. Some of these
> applications expect this call to always result non-NULL which, in
> case of permissive runs, yields abnormal behavior (SSHd segfaulting
> is an example on this, Gentoo's Portage refusing to work is
> another).
>
> In these cases too, it is much more important imo to have the
> application check if the system is running in permissive mode or
> not.
>
> Wkr, Sven Vermeulen
>
Well this code actually already had a check in there to see if it was
in permissive mode. It was just not checking all failure modes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk87znAACgkQrlYvE4MpobPjNwCeJR2x6XWmzJQx6oXuFNeXG4uj
ZxsAoLUS78u1sP9XJW9dY2PFiOQS076Y
=60ac
-----END PGP SIGNATURE-----
--
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 parent reply other threads:[~2012-02-15 15:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAPzO=Nw+T8_QkzHPboQ-s399hmdMF0jb0_3ipSrSyqpHztfOfg@mail.gmail.com>
2012-02-15 15:25 ` Daniel J Walsh [this message]
2012-02-14 21:22 Force avc_has_perm to return success if enforcing == 0; Daniel J Walsh
2012-02-16 14:25 ` Stephen Smalley
2012-02-16 14:37 ` Daniel J Walsh
2012-02-21 20:37 ` Stephen Smalley
2012-02-16 15:18 ` Colin Walters
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=4F3BCE70.6060507@redhat.com \
--to=dwalsh@redhat.com \
--cc=sds@tycho.nsa.gov \
--cc=selinux@tycho.nsa.gov \
--cc=sven.j.vermeulen@gmail.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.