- Go back to original libsetrans code

This commit is contained in:
Daniel J Walsh 2005-09-13 21:21:50 +00:00
parent bc0a935c8c
commit c2b28e3158
2 changed files with 5 additions and 21 deletions

View File

@ -14,7 +14,6 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/include/selinux/selinux.h lib
selinux_policy_root reads the /etc/selinux/config file and returns selinux_policy_root reads the /etc/selinux/config file and returns
the directory path under which the compiled policy file and context the directory path under which the compiled policy file and context
configuration files exist. configuration files exist.
diff --exclude-from=exclude -N -u -r nsalibselinux/src/init.c libselinux-1.26/src/init.c
--- nsalibselinux/src/init.c 2005-09-01 13:21:11.000000000 -0400 --- nsalibselinux/src/init.c 2005-09-01 13:21:11.000000000 -0400
+++ libselinux-1.26/src/init.c 2005-09-12 17:13:20.000000000 -0400 +++ libselinux-1.26/src/init.c 2005-09-12 17:13:20.000000000 -0400
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
@ -25,23 +24,6 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/init.c libselinux-1.26/sr
#include "dso.h" #include "dso.h"
#include "policy.h" #include "policy.h"
@@ -85,9 +86,14 @@
static void init_translations(void)
{
#ifdef SHARED
+ char *path[PATH_MAX];
+ char *type=NULL;
int (*lib_trans_init)(void) = NULL;
-
- translation_lib_handle = dlopen("libsetrans.so.0", RTLD_NOW);
+ selinux_getpolicytype(&type);
+ if (!type) return;
+ snprintf(path, PATH_MAX-1, "/$LIB/selinux/%s/libsetrans.so.0", type);
+ free(type);
+ translation_lib_handle = dlopen(path, RTLD_NOW);
if (!translation_lib_handle)
return;
diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-1.26/src/matchpathcon.c diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux-1.26/src/matchpathcon.c
--- nsalibselinux/src/matchpathcon.c 2005-08-24 09:07:11.000000000 -0400 --- nsalibselinux/src/matchpathcon.c 2005-08-24 09:07:11.000000000 -0400
+++ libselinux-1.26/src/matchpathcon.c 2005-09-12 17:05:37.000000000 -0400 +++ libselinux-1.26/src/matchpathcon.c 2005-09-12 17:05:37.000000000 -0400
@ -124,7 +106,6 @@ diff --exclude-from=exclude -N -u -r nsalibselinux/src/matchpathcon.c libselinux
goto finish; goto finish;
} }
diff --exclude-from=exclude -N -u -r nsalibselinux/src/selinux_config.c libselinux-1.26/src/selinux_config.c
--- nsalibselinux/src/selinux_config.c 2005-03-17 14:56:21.000000000 -0500 --- nsalibselinux/src/selinux_config.c 2005-03-17 14:56:21.000000000 -0500
+++ libselinux-1.26/src/selinux_config.c 2005-09-13 12:46:22.682193000 -0400 +++ libselinux-1.26/src/selinux_config.c 2005-09-13 12:46:22.682193000 -0400
@@ -85,6 +85,29 @@ @@ -85,6 +85,29 @@

View File

@ -1,11 +1,11 @@
Summary: SELinux library and simple utilities Summary: SELinux library and simple utilities
Name: libselinux Name: libselinux
Version: 1.26 Version: 1.26
Release: 2 Release: 4
License: Public domain (uncopyrighted) License: Public domain (uncopyrighted)
Group: System Environment/Libraries Group: System Environment/Libraries
Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz Source: http://www.nsa.gov/selinux/archives/%{name}-%{version}.tgz
Prereq: libsetrans >= 0.1.4-3 Prereq: libsetrans
Patch: libselinux-rhat.patch Patch: libselinux-rhat.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
@ -86,6 +86,9 @@ rm -rf ${RPM_BUILD_ROOT}
%{_mandir}/man8/* %{_mandir}/man8/*
%changelog %changelog
* Tue Sep 12 2005 Dan Walsh <dwalsh@redhat.com> 1.26-3
- Go back to original libsetrans code
* Mon Sep 12 2005 Dan Walsh <dwalsh@redhat.com> 1.26-2 * Mon Sep 12 2005 Dan Walsh <dwalsh@redhat.com> 1.26-2
- Eliminate forth param from mls context when mls is not enabled. - Eliminate forth param from mls context when mls is not enabled.