From 59d6552e7d7db6c6b745b56a14230b9dec68524a Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Thu, 1 Sep 2005 15:23:17 +0000 Subject: [PATCH] - Update from NSA Added public functions to export context translation to users of libselinux (selinux_trans_to_raw_context, selinux_raw_to_trans_context). --- .cvsignore | 1 + libselinux-rhat.patch | 36 +++++++++++++++++------------------- libselinux.spec | 10 +++++++++- sources | 2 +- 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/.cvsignore b/.cvsignore index d4dc196..f55bd9b 100644 --- a/.cvsignore +++ b/.cvsignore @@ -43,3 +43,4 @@ libselinux-1.25.2.tgz libselinux-1.25.3.tgz libselinux-1.25.4.tgz libselinux-1.25.5.tgz +libselinux-1.25.6.tgz diff --git a/libselinux-rhat.patch b/libselinux-rhat.patch index b886b64..7e66693 100644 --- a/libselinux-rhat.patch +++ b/libselinux-rhat.patch @@ -1,21 +1,19 @@ -diff --exclude-from=exclude -N -u -r nsalibselinux/src/context.c libselinux-1.25.3/src/context.c ---- nsalibselinux/src/context.c 2005-08-25 16:18:01.000000000 -0400 -+++ libselinux-1.25.3/src/context.c 2005-08-24 16:48:20.000000000 -0400 -@@ -181,16 +180,8 @@ - def_set(type,COMP_TYPE) - def_set(role,COMP_ROLE) - def_set(user,COMP_USER) -+def_set(range,COMP_RANGE) +diff --exclude-from=exclude -N -u -r nsalibselinux/src/init.c libselinux-1.25.6/src/init.c +--- nsalibselinux/src/init.c 2005-08-25 16:18:01.000000000 -0400 ++++ libselinux-1.25.6/src/init.c 2005-09-01 11:23:11.000000000 -0400 +@@ -86,6 +86,7 @@ + { + int (*lib_trans_init)(void) = NULL; --int context_range_set(context_t context,const char* str) --{ -- context_private_t *n = context->ptr; -- if ( ! n->component[COMP_RANGE] ) { -- return 0; -- } else { -- return set_comp(n,COMP_RANGE,str); -- } --} - hidden_def(context_range_set) ++#ifdef __PIC__ + translation_lib_handle = dlopen("libsetrans.so.0", RTLD_NOW); + if (!translation_lib_handle) + return; +@@ -108,6 +109,7 @@ + return; - #ifdef L1TEST + context_translations = 1; ++#endif + } + + static void fini_translations(void) diff --git a/libselinux.spec b/libselinux.spec index 10ae9a9..c90a75c 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -1,10 +1,11 @@ Summary: SELinux library and simple utilities Name: libselinux -Version: 1.25.5 +Version: 1.25.6 Release: 1 License: Public domain (uncopyrighted) Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz +Patch: libselinux-rhat.patch BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot @@ -34,6 +35,7 @@ needed for developing SELinux applications. %prep %setup -q +%patch -p1 -b .rhat %build make CFLAGS="-g %{optflags}" @@ -83,6 +85,12 @@ rm -rf ${RPM_BUILD_ROOT} %{_mandir}/man8/* %changelog +* Thu Sep 1 2005 Dan Walsh 1.25.6-1 +- Update from NSA + * Added public functions to export context translation to + users of libselinux (selinux_trans_to_raw_context, + selinux_raw_to_trans_context). + * Mon Aug 29 2005 Dan Walsh 1.25.5-1 - Update from NSA * Remove special definition for context_range_set; use diff --git a/sources b/sources index 5893bd9..b9faafb 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -93382e8d891c90d40e973ed61c10a76c libselinux-1.25.5.tgz +8bf97b33ed29d9a7a8b5d6c285310013 libselinux-1.25.6.tgz