File: lcgdm-dlopen.patch

package info (click to toggle)
dpm-postgres 1.7.4.7-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 13,788 kB
  • ctags: 10,782
  • sloc: ansic: 146,136; sh: 13,362; perl: 11,142; python: 5,529; cpp: 5,113; sql: 1,790; makefile: 955; fortran: 113
file content (35 lines) | stat: -rw-r--r-- 1,281 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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) {