All of lore.kernel.org
 help / color / mirror / Atom feed
* Force avc_has_perm to return success if enforcing == 0;
@ 2012-02-14 21:22 Daniel J Walsh
  2012-02-16 14:25 ` Stephen Smalley
  2012-02-16 15:18 ` Colin Walters
  0 siblings, 2 replies; 6+ messages in thread
From: Daniel J Walsh @ 2012-02-14 21:22 UTC (permalink / raw)
  To: Stephen Smalley, SELinux

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

Does anyone see a problem with this?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk860IQACgkQrlYvE4MpobNPFwCfVbE1QGJ0M8byHYZlf2U3XpdE
Ga0An2Z2/wBklr/e6OX+4EYTrFDvL69o
=btOY
-----END PGP SIGNATURE-----

[-- Attachment #2: avc_has_perm_permissive.patch --]
[-- Type: text/x-patch, Size: 300 bytes --]

diff --git a/libselinux/src/avc.c b/libselinux/src/avc.c
index e7ad31d..2de39b9 100644
--- a/libselinux/src/avc.c
+++ b/libselinux/src/avc.c
@@ -801,6 +801,7 @@ int avc_has_perm_noaudit(security_id_t ssid,
 
       out:
 	avc_release_lock(avc_lock);
+	if (!avc_enforcing) return 0;
 	return rc;
 }
 

^ permalink raw reply related	[flat|nested] 6+ messages in thread
[parent not found: <CAPzO=Nw+T8_QkzHPboQ-s399hmdMF0jb0_3ipSrSyqpHztfOfg@mail.gmail.com>]

end of thread, other threads:[~2012-02-21 20:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
     [not found] <CAPzO=Nw+T8_QkzHPboQ-s399hmdMF0jb0_3ipSrSyqpHztfOfg@mail.gmail.com>
2012-02-15 15:25 ` Daniel J Walsh

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.