summaryrefslogtreecommitdiffstats
path: root/sys-auth/pam_x509/files/pam_x509-ds-obexftp.patch
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
committerSuren A. Chilingaryan <csa@suren.me>2019-09-01 00:00:32 +0200
commitca9627e70852f6b2e835660df870fe3ab405882d (patch)
tree0a008b1d5b16fa0679a195ed7b5662c7891f591c /sys-auth/pam_x509/files/pam_x509-ds-obexftp.patch
downloaddarklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.gz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.bz2
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.tar.xz
darklin4-ca9627e70852f6b2e835660df870fe3ab405882d.zip
Initial import
Diffstat (limited to 'sys-auth/pam_x509/files/pam_x509-ds-obexftp.patch')
-rw-r--r--sys-auth/pam_x509/files/pam_x509-ds-obexftp.patch74
1 files changed, 74 insertions, 0 deletions
diff --git a/sys-auth/pam_x509/files/pam_x509-ds-obexftp.patch b/sys-auth/pam_x509/files/pam_x509-ds-obexftp.patch
new file mode 100644
index 0000000..eca5658
--- /dev/null
+++ b/sys-auth/pam_x509/files/pam_x509-ds-obexftp.patch
@@ -0,0 +1,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++);