Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > b90e021243d264b464870746f6f89ffb > files > 9

lcgdm-1.8.0.1-3.fc13.src.rpm

diff -ur LCG-DM-1.7.3.1.orig/security/Csec_api_loader.c LCG-DM-1.7.3.1/security/Csec_api_loader.c
--- LCG-DM-1.7.3.1.orig/security/Csec_api_loader.c	2008-10-01 16:02:10.000000000 +0200
+++ LCG-DM-1.7.3.1/security/Csec_api_loader.c	2009-12-07 14:54:56.007186981 +0100
@@ -221,6 +221,7 @@
 void *Csec_get_shlib(Csec_context_t *ctx) {
   char filename[CA_MAXNAMELEN];
   char filename_thread[CA_MAXNAMELEN];
+  char fullpath[CA_MAXNAMELEN];
   char suffix[CA_MAXNAMELEN];
   char symname[256];
   void *handle;
@@ -301,6 +302,11 @@
                         filename_thread,
                         ctx->protocols[ctx->current_protocol].id);
       handle = dlopen(filename_thread, RTLD_NOW);
+      if (handle == NULL) {
+        strcpy(fullpath, "@@LIBDIR@@/lcgdm/");
+        strcat(fullpath, filename_thread);
+        handle = dlopen(fullpath, RTLD_NOW);
+      }
     }
     
     if (handle == NULL) {
@@ -308,6 +314,11 @@
                         filename,
                         ctx->protocols[ctx->current_protocol].id);
       handle = dlopen(filename, RTLD_NOW);
+      if (handle == NULL) {
+        strcpy(fullpath, "@@LIBDIR@@/lcgdm/");
+        strcat(fullpath, filename);
+        handle = dlopen(fullpath, RTLD_NOW);
+      }
     }
   
     if (handle == NULL) {