summaryrefslogtreecommitdiffstats
path: root/sys-auth/pam_x509/files/pam_x509-ds-compile.patch
blob: 59f6e8962d697fa12fcdca39a3ccab2d7f65fbb3 (plain)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
diff -dPNur pam_x509-1.0.2/Makefile pam_x509-1.0.2-new/Makefile
--- pam_x509-1.0.2/Makefile	2007-04-22 12:31:55.000000000 +0200
+++ pam_x509-1.0.2-new/Makefile	2007-04-22 12:51:15.000000000 +0200
@@ -6,8 +6,10 @@
 
 ifeq ($(BT),yes) 
     OBJECTS += rfcomm.o
-    LIBS += -lbluetooth -lobexftp -lcobexbfb -lbfb `openobex-config --libs`
-    CFLAGS += -D_BLUETOOTH `openobex-config --cflags`
+#    LIBS += -lbluetooth -lobexftp -lcobexbfb -lbfb `openobex-config --libs`
+#    CFLAGS += -D_BLUETOOTH `openobex-config --cflags`
+    CFLAGS += -D_BLUETOOTH
+    LIBS += -lbluetooth -lobexftp -lmulticobex -lbfb -lopenobex
 endif
 
 pam_x509: $(OBJECTS)
diff -dPNur pam_x509-1.0.2/pam_x509.c pam_x509-1.0.2-new/pam_x509.c
--- pam_x509-1.0.2/pam_x509.c	2006-06-12 13:55:19.000000000 +0200
+++ pam_x509-1.0.2-new/pam_x509.c	2007-04-22 12:52:42.000000000 +0200
@@ -1,7 +1,9 @@
 #define PAM_SM_AUTH
 #include <stdio.h>
 #include <unistd.h>
+#include <string.h>
 #include <stdarg.h>
+#include <alloca.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 
diff -dPNur pam_x509-1.0.2/pass.c pam_x509-1.0.2-new/pass.c
--- pam_x509-1.0.2/pass.c	2003-10-17 00:51:55.000000000 +0200
+++ pam_x509-1.0.2-new/pass.c	2007-04-22 12:51:51.000000000 +0200
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <string.h>
 
 #include "sslauth.h"
 
diff -dPNur pam_x509-1.0.2/rfcomm.c pam_x509-1.0.2-new/rfcomm.c
--- pam_x509-1.0.2/rfcomm.c	2006-06-12 14:24:23.000000000 +0200
+++ pam_x509-1.0.2-new/rfcomm.c	2007-04-22 13:14:20.000000000 +0200
@@ -17,16 +17,28 @@
 #include <bluetooth/rfcomm.h>
 
 #include <obexftp/client.h>
-#include <cobexbfb/cobex_bfb.h>
 
-#ifdef obexftp_cli_connect
+#if defined(obexftp_cli_connect)
+# include <cobexbfb/cobex_bfb.h>
 # define obexftp_cli_connect_wrapper(cli) obexftp_cli_connect(cli, NULL, 0)
 # define obexftp_cli_open_wrapper(cb, ctrans, param) obexftp_cli_open(OBEX_TRANS_BLUETOOTH, ctrans, cb, param)
 # define obexftp_setpath_wrapper(cli, path) obexftp_setpath(cli, path, 1)
+# define obexftp_cli_close_wrapper obexftp_cli_close
+# define obexftp_cli_disconnect_wrapper obexftp_cli_disconnect
+#elif defined(obexftp_connect)
+# include <multicobex/multi_cobex.h>
+# define obexftp_cli_connect_wrapper(cli) obexftp_connect(cli, NULL, 0)
+# define obexftp_cli_open_wrapper(cb, ctrans, param) obexftp_open(OBEX_TRANS_BLUETOOTH, ctrans, cb, param)
+# define obexftp_setpath_wrapper(cli, path) obexftp_setpath(cli, path, 1)
+# define obexftp_cli_close_wrapper obexftp_close
+# define obexftp_cli_disconnect_wrapper obexftp_disconnect
 #else
+# include <cobexbfb/cobex_bfb.h>
 # define obexftp_cli_connect_wrapper(cli) obexftp_cli_connect(cli)
 # define obexftp_cli_open_wrapper(cb, ctrans, param) obexftp_cli_open(cb, ctrans, param)
 # define obexftp_setpath_wrapper(cli, path) obexftp_setpath(cli, path)
+# define obexftp_cli_close_wrapper obexftp_cli_close
+# define obexftp_cli_disconnect_wrapper obexftp_cli_disconnect
 #endif
 
 /*
@@ -75,7 +87,7 @@
 #ifdef _DEBUG
 	_pam_log(LOG_NOTICE,"Error connecting client over %s!",tty);
 #endif
-	obexftp_cli_close(cli);
+	obexftp_cli_close_wrapper(cli);
 	if (ctrans) cobex_free(ctrans);	
 	return 0;
     }
@@ -87,8 +99,8 @@
 #ifdef _DEBUG
 	_pam_log(LOG_NOTICE,"Can't get list file over %s!",tty);
 #endif
-	obexftp_cli_disconnect (cli);
-	obexftp_cli_close(cli);
+	obexftp_cli_disconnect_wrapper (cli);
+	obexftp_cli_close_wrapper(cli);
         if (ctrans) cobex_free(ctrans);	
 	return 0;
     }
@@ -121,8 +133,8 @@
     }
     fclose(f);
 
-    obexftp_cli_disconnect (cli);
-    obexftp_cli_close(cli);
+    obexftp_cli_disconnect_wrapper (cli);
+    obexftp_cli_close_wrapper(cli);
     if (ctrans) cobex_free(ctrans);	
     return res;
 }