File: 03-dlopen-soname.patch

package info (click to toggle)
opencryptoki 3.6.1%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 5,628 kB
  • ctags: 5,333
  • sloc: ansic: 75,819; perl: 1,513; makefile: 614; yacc: 370; sh: 148; lex: 124
file content (43 lines) | stat: -rw-r--r-- 1,725 bytes parent folder | 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
Author: Daniel Baumann <daniel@debian.org>
Description:
 Opening libopencryptoki correctly with soname major (Closes: #463593).

Index: opencryptoki/usr/sbin/pkcscca/pkcscca.c
===================================================================
--- opencryptoki.orig/usr/sbin/pkcscca/pkcscca.c
+++ opencryptoki/usr/sbin/pkcscca/pkcscca.c
@@ -479,7 +479,7 @@ CK_FUNCTION_LIST *p11_init(void)
 	CK_RV            rv;
 	CK_RV		 (*pfoo)();
 	char		 *loc1_lib = "/usr/lib/pkcs11/PKCS11_API.so64";
-	char		 *loc2_lib = "libopencryptoki.so";
+	char		 *loc2_lib = "libopencryptoki.so.0";
 	CK_FUNCTION_LIST *funcs = NULL;
 
 
Index: opencryptoki/usr/sbin/pkcsconf/pkcsconf.c
===================================================================
--- opencryptoki.orig/usr/sbin/pkcsconf/pkcsconf.c
+++ opencryptoki/usr/sbin/pkcsconf/pkcsconf.c
@@ -1291,7 +1291,7 @@ init(void){
     * error */
    /* The host machine should have the right library in the
     * LD_LIBRARY_PATH */
-   dllPtr = dlopen("libopencryptoki.so", RTLD_NOW);
+   dllPtr = dlopen("libopencryptoki.so.0", RTLD_NOW);
    if (!dllPtr) {
       printf("Error loading PKCS#11 library\n");
       printf("dlopen error: %s\n", dlerror());
Index: opencryptoki/usr/sbin/pkcsep11_migrate/pkcsep11_migrate.c
===================================================================
--- opencryptoki.orig/usr/sbin/pkcsep11_migrate/pkcsep11_migrate.c
+++ opencryptoki/usr/sbin/pkcsep11_migrate/pkcsep11_migrate.c
@@ -230,7 +230,7 @@ do_GetFunctionList( void )
   CK_RV  (*func_list)() = NULL; 
   void    *d;
   char    *evar;
-  char    *evar_default = "libopencryptoki.so";
+  char    *evar_default = "libopencryptoki.so.0";
   
   evar = getenv("PKCSLIB");
   if ( evar == NULL) {