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
|
diff -dPNur pam_x509-1.0.1/Makefile pam_x509-1.0.1-new/Makefile
--- pam_x509-1.0.1/Makefile 2006-01-04 12:56:14.000000000 +0000
+++ pam_x509-1.0.1-new/Makefile 2006-01-04 13:35:20.000000000 +0000
@@ -2,13 +2,13 @@
all: pam_x509
-
+CFLAGS += -fPIC
OBJECTS=sslapp.o sslauth.o pam_x509.o pass.o
ifeq ($(BT),yes)
OBJECTS += rfcomm.o
LIBS += -lbluetooth -lobexftp -lcobexbfb -lbfb `openobex-config --libs`
- CFLAGS += -D_BLUETOOTH
+ CFLAGS += -D_BLUETOOTH `openobex-config --cflags`
endif
pam_x509: $(OBJECTS)
@@ -23,7 +23,7 @@
pass.o: pass.c sslauth.h
rfcomm.o: rfcomm.c sslauth.h
- gcc -c `openobex-config --cflags` rfcomm.c
+ gcc -c $(CFLAGS) rfcomm.c
clean:
diff -dPNur pam_x509-1.0.1/rfcomm.c pam_x509-1.0.1-new/rfcomm.c
--- pam_x509-1.0.1/rfcomm.c 2003-10-18 15:28:13.000000000 +0000
+++ pam_x509-1.0.1-new/rfcomm.c 2006-01-04 13:32:17.000000000 +0000
@@ -19,6 +19,15 @@
#include <obexftp/client.h>
#include <cobexbfb/cobex_bfb.h>
+#ifdef obexftp_cli_connect
+# 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)
+#else
+# 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)
+#endif
/*
static void print_dev_info(struct rfcomm_dev_info *di)
@@ -53,7 +62,7 @@
strcpy(lfile,tmp_dir); lpos=lfile+strlen(lfile); *lpos='/'; lpos++; *lpos=0;
ctrans = cobex_ctrans (tty);
- cli = obexftp_cli_open (info_cb, ctrans, NULL);
+ cli = obexftp_cli_open_wrapper (info_cb, ctrans, NULL);
if (!cli) {
#ifdef _DEBUG
_pam_log(LOG_NOTICE,"Error opening obexftp-client connection over %s!",tty);
@@ -62,7 +71,7 @@
return 0;
}
- if (obexftp_cli_connect (cli) < 0) {
+ if (obexftp_cli_connect_wrapper (cli) < 0) {
#ifdef _DEBUG
_pam_log(LOG_NOTICE,"Error connecting client over %s!",tty);
#endif
@@ -84,7 +93,7 @@
return 0;
}
- if (obexftp_setpath(cli, bt_path)>=0) {
+ if (obexftp_setpath_wrapper(cli, bt_path)>=0) {
while(!feof(f)) {
fgets(stmp,MAX_LINE_SIZE-1,f);
for(spos=stmp;((*spos==' ')||(*spos=='\t'));spos++);
|