Package: lcgdm / 1.10.0-2

lcgdm-dlopen.patch Patch series | download
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
diff -ur lcgdm-1.8.6.orig/config/Imake.rules lcgdm-1.8.6/config/Imake.rules
--- lcgdm-1.8.6.orig/config/Imake.rules	2012-12-14 14:38:58.000000000 +0100
+++ lcgdm-1.8.6/config/Imake.rules	2013-04-20 10:58:07.277601196 +0200
@@ -192,9 +192,9 @@
 
 #ifndef InstallPlugin
 #define InstallPlugin(libname,dest)			@@\
-dest/SharedLibraryTargetName(libname): SharedLibraryTargetName(libname)	@@\
-	-mv $@ dest/OLD$?				@@\
-	cp $? $@
+dest/SharedLibraryTargetName(libname): dest SharedLibraryTargetName(libname)	@@\
+	-mv $@ dest/OLD-SharedLibraryTargetName(libname)	@@\
+	cp SharedLibraryTargetName(libname) $@
 #endif
 
 #ifndef MakeDir
diff -ur lcgdm-1.8.6.orig/security/Csec_api_loader.c lcgdm-1.8.6/security/Csec_api_loader.c
--- lcgdm-1.8.6.orig/security/Csec_api_loader.c	2012-12-14 14:38:58.000000000 +0100
+++ lcgdm-1.8.6/security/Csec_api_loader.c	2013-04-20 10:58:07.277601196 +0200
@@ -224,6 +224,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;
@@ -304,6 +305,12 @@
                         filename_thread,
                         ctx->protocols[ctx->current_protocol].id);
       handle = dlopen(filename_thread, RTLD_NOW);
+      if (handle == NULL) {
+        strcpy(fullpath, LIBDIR);
+        strcat(fullpath, "/");
+        strcat(fullpath, filename_thread);
+        handle = dlopen(fullpath, RTLD_NOW);
+      }
     }
     
     if (handle == NULL) {
@@ -312,6 +319,12 @@
                         filename,
                         ctx->protocols[ctx->current_protocol].id);
       handle = dlopen(filename, RTLD_NOW);
+      if (handle == NULL) {
+        strcpy(fullpath, LIBDIR);
+        strcat(fullpath, "/");
+        strcat(fullpath, filename);
+        handle = dlopen(fullpath, RTLD_NOW);
+      }
     }
   
     if (handle == NULL) {
diff -ur lcgdm-1.8.6.orig/security/Imakefile lcgdm-1.8.6/security/Imakefile
--- lcgdm-1.8.6.orig/security/Imakefile	2012-12-14 14:38:58.000000000 +0100
+++ lcgdm-1.8.6/security/Imakefile	2013-04-20 10:58:55.621594293 +0200
@@ -14,7 +14,7 @@
 
 INCLUDES = FileName(..,h)
 LIBBASE = InstallLibDir
-LIB = $(LIBBASE)
+LIB = $(LIBBASE)/lcgdm
 
 #if UseKRB5
 #define KRB5Mech KRB5