From 0984abe5d8137b58a8338ea2878c7baee0979b94 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Feb 28 2008 21:06:47 +0000 Subject: - Update to Upstream Merged reset_selinux_config() for load policy from Dan Walsh. --- diff --git a/.cvsignore b/.cvsignore index 099f6c8..7a4658e 100644 --- a/.cvsignore +++ b/.cvsignore @@ -146,3 +146,4 @@ libselinux-2.0.53.tgz libselinux-2.0.55.tgz libselinux-2.0.56.tgz libselinux-2.0.57.tgz +libselinux-2.0.58.tgz diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index caaa86b..89f5c44 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -1,23 +1,6 @@ -diff --exclude-from=exclude -N -u -r nsalibselinux/src/load_policy.c libselinux-2.0.57/src/load_policy.c ---- nsalibselinux/src/load_policy.c 2008-02-13 11:16:14.000000000 -0500 -+++ libselinux-2.0.57/src/load_policy.c 2008-02-28 11:11:20.000000000 -0500 -@@ -308,6 +308,13 @@ - FILE *cfg; - char *buf; - -+ -+ /* -+ Reinitialize the library, so chroot will work correctly. -+ */ -+ fini_selinux_policyroot(); -+ init_selinux_config(); -+ - /* - * Get desired mode (disabled, permissive, enforcing) from - * /etc/selinux/config. diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-2.0.57/src/matchpathcon.c --- nsalibselinux/src/matchpathcon.c 2007-09-28 09:48:58.000000000 -0400 -+++ libselinux-2.0.57/src/matchpathcon.c 2008-02-28 10:50:12.000000000 -0500 ++++ libselinux-2.0.57/src/matchpathcon.c 2008-02-28 14:33:51.000000000 -0500 @@ -2,6 +2,7 @@ #include #include @@ -35,57 +18,3 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux va_end(ap); } -diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux_config.c libselinux-2.0.57/src/selinux_config.c ---- nsalibselinux/src/selinux_config.c 2007-08-03 16:02:56.000000000 -0400 -+++ libselinux-2.0.57/src/selinux_config.c 2008-02-28 11:10:01.000000000 -0500 -@@ -127,9 +127,9 @@ - static char *selinux_policyroot = NULL; - static char *selinux_rootpath = NULL; - --static void init_selinux_config(void) __attribute__ ((constructor)); -+void init_selinux_config(void) __attribute__ ((constructor)); - --static void init_selinux_config(void) -+void init_selinux_config(void) - { - int i, *intptr; - size_t line_len; -@@ -207,10 +207,11 @@ - == -1) - return; - } -+hidden_def(init_selinux_config) - --static void fini_selinux_policyroot(void) __attribute__ ((destructor)); -+void fini_selinux_policyroot(void) __attribute__ ((destructor)); - --static void fini_selinux_policyroot(void) -+void fini_selinux_policyroot(void) - { - int i; - free(selinux_policyroot); -@@ -222,6 +223,7 @@ - free(selinux_policytype); - selinux_policytype = NULL; - } -+hidden_def(fini_selinux_policyroot) - - static const char *get_path(int idx) - { -diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux_internal.h libselinux-2.0.57/src/selinux_internal.h ---- nsalibselinux/src/selinux_internal.h 2007-08-03 16:02:56.000000000 -0400 -+++ libselinux-2.0.57/src/selinux_internal.h 2008-02-28 11:11:04.000000000 -0500 -@@ -80,6 +80,13 @@ - hidden_proto(security_get_initial_context); - hidden_proto(security_get_initial_context_raw); - -+extern void init_selinux_config(void) hidden; -+extern void fini_selinux_policyroot(void) hidden; -+ -+hidden_proto(init_selinux_config); -+hidden_proto(fini_selinux_policyroot); -+ - extern int load_setlocaldefs hidden; - extern int require_seusers hidden; - extern int selinux_page_size hidden; -+ diff --git a/libselinux.spec b/libselinux.spec index 2e5a930..dca0c97 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -3,8 +3,8 @@ Summary: SELinux library and simple utilities Name: libselinux -Version: 2.0.57 -Release: 2%{?dist} +Version: 2.0.58 +Release: 1%{?dist} License: Public Domain Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz @@ -137,6 +137,10 @@ exit 0 %{python_sitearch}/selinux/* %changelog +* Thu Feb 28 2008 Dan Walsh - 2.0.58-1 +- Update to Upstream + * Merged reset_selinux_config() for load policy from Dan Walsh. + * Thu Feb 28 2008 Dan Walsh - 2.0.57-2 - Reload library on loading of policy to handle chroot diff --git a/sources b/sources index bd18e2b..5215e28 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9f04e07ff14b157ecd136d906c602a21 libselinux-2.0.57.tgz +7934f9ab3be76439ddd859184414aed0 libselinux-2.0.58.tgz