| 
      
      
      From: <ssm...@us...> - 2007-11-20 18:47:06
      
     | 
| Revision: 2689
          http://selinux.svn.sourceforge.net/selinux/?rev=2689&view=rev
Author:   ssmalley
Date:     2007-11-20 10:46:30 -0800 (Tue, 20 Nov 2007)
Log Message:
-----------
Author: Stephen Smalley
Email: sd...@ty...
Subject: libselinux: dlopen libsepol.so.1 rather than libsepol.so
Date: Tue, 20 Nov 2007 11:22:31 -0500
James Morris noticed that libselinux was not downgrading the policy
image to the kernel's policy version on a F8 system (when building a
kernel with the version max option using the default of policy.19).  I
realized that this is most likely due to the fact that libselinux now
dlopen's libsepol, and at present, it dlopen's libsepol.so rather
libsepol.so.1.  This is similar to the problems encountered with procps
dlopen'ing libselinux.so - the .so file lives in /usr/lib and is only
installed by the -devel package, whereas the .so.1 file lives in /lib
and is installed by the main package, so a user may not have a
libsepol.so at all or it might not be mounted if /usr is a separate
partition at initial policy load.  So change it to dlopen libsepol.so.1
instead.
Modified Paths:
--------------
    trunk/libselinux/src/load_policy.c
Modified: trunk/libselinux/src/load_policy.c
===================================================================
--- trunk/libselinux/src/load_policy.c	2007-11-20 16:22:43 UTC (rev 2688)
+++ trunk/libselinux/src/load_policy.c	2007-11-20 18:46:30 UTC (rev 2689)
@@ -71,7 +71,7 @@
 #ifdef SHARED
 	char *errormsg = NULL;
 	void *libsepolh = NULL;
-	libsepolh = dlopen("libsepol.so", RTLD_NOW);
+	libsepolh = dlopen("libsepol.so.1", RTLD_NOW);
 	if (libsepolh) {
 		usesepol = 1;
 		dlerror();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
 |