All of lore.kernel.org
 help / color / mirror / Atom feed
* Another change we would like to make to libselinux
@ 2012-02-16 14:47 Daniel J Walsh
  2012-02-21 20:43 ` Stephen Smalley
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel J Walsh @ 2012-02-16 14:47 UTC (permalink / raw)
  To: SELinux

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

Currently we have lots of apps trying to figure out which policy is
installed on the system,  We have a function
selinux_binary_policy_path which returns a path like
'/etc/selinux/targeted/policy'

Then these apps do stuff like:

VER=`cat /sys/fs/selinux/policyver`
while [ -e '/etc/selinux/targetd/policy. + $VER' ]; do
      VER=$VER-1
done

While we have had /sys/fs/selinux/policy for a while now.

I wanted to add an interface to return this path, but I was trying to
figure out a name selinux_loaded_policy_path for example, but as Eric
pointed out to me, selinux_binary_policy_path is what most users would
expect to return this.  If you look at the man page it even suggest this.

man selinux_binary_policy_path
...
       selinux_binary_policy_path() - binary policy file loaded into
kernel


Currently the users of this function are the libselinux package,
setools and policycorutils (sepolgen-ifgen).


I am torn between adding stealing this function to return the
/sys/fs/selinux/policy and then adding selinux_installed_policy_path
for the original function, then updating the effected packages.

The problem with this is we would have different behaviour between
older versions of the library. The other options would be to come up
with a better name for the new function and fix the man pages.

Suggestions welcomed.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk89Fu8ACgkQrlYvE4MpobNimgCeIIpi+6Yee+GfyUlRV+n7jvaE
39MAn064N3sRCAdpyseBKFrGR3+ojrEI
=+Byb
-----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.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-02-22 15:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-16 14:47 Another change we would like to make to libselinux Daniel J Walsh
2012-02-21 20:43 ` Stephen Smalley
2012-02-21 21:49   ` Daniel J Walsh
2012-02-22 13:27     ` Christopher J. PeBenito
2012-02-22 13:34       ` Daniel J Walsh
2012-02-22 14:08         ` Stephen Smalley
2012-02-22 15:29           ` Daniel J Walsh
2012-02-22 13:29     ` Stephen Smalley

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.