-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/I998ACgkQrlYvE4MpobND7ACeKZCYfG16WAoTOiHEiiXcR+3t YbkAoNkonXP6kdpYvrJygUWhFNiKPvAG =kZAY -----END PGP SIGNATURE-----
>From 048e574057229a4f84e06298b129de20bc7de71b Mon Sep 17 00:00:00 2001 From: Dan Walsh <dwalsh@xxxxxxxxxx> Date: Thu, 16 Feb 2012 11:48:29 -0500 Subject: [PATCH 24/90] policycoreutils: audit2allow: sepolgen-ifgen: use running policy rather than on disk Check against running policy instead of on disk. I mean, it's running policy we care about. Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- policycoreutils/audit2allow/sepolgen-ifgen | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/policycoreutils/audit2allow/sepolgen-ifgen b/policycoreutils/audit2allow/sepolgen-ifgen index ef4bec3..9b313ec 100644 --- a/policycoreutils/audit2allow/sepolgen-ifgen +++ b/policycoreutils/audit2allow/sepolgen-ifgen @@ -61,20 +61,10 @@ def parse_options(): return options -def get_policy(): - i = selinux.security_policyvers() - p = selinux.selinux_binary_policy_path() + "." + str(i) - while i > 0 and not os.path.exists(p): - i = i - 1 - p = selinux.selinux_binary_policy_path() + "." + str(i) - if i > 0: - return p - return None - def get_attrs(policy_path): try: if not policy_path: - policy_path = get_policy() + policy_path = selinux.selinux_current_policy_path() if not policy_path: sys.stderr.write("No installed policy to check\n") return None -- 1.7.10.2