sasl/sasl.patch

changeset 745
55a8b8e82e56
parent 144
f53f65b7bfb9
equal deleted inserted replaced
0:0af4cff64347 1:ab784760de0c
1 Index: configure 1 Index: configure
2 --- configure.orig 2006-05-18 21:30:13 +0200 2 --- configure.orig 2006-05-18 21:30:13 +0200
3 +++ configure 2008-12-25 18:48:51 +0100 3 +++ configure 2008-12-25 18:48:51 +0100
4 @@ -3944,9 +3944,6 @@ 4 @@ -5015,9 +5015,6 @@
5 5
6 fi 6 fi
7 7
8 -if test "$ac_cv_c_compiler_gnu" = yes; then 8 -if test "$ac_cv_c_compiler_gnu" = yes; then
9 - CFLAGS="-Wall -W ${CFLAGS}" 9 - CFLAGS="-Wall -W ${CFLAGS}"
10 -fi 10 -fi
11 11
12 12
13 # Check whether --with-purecov or --without-purecov was given. 13 # Check whether --with-purecov was given.
14 @@ -5125,7 +5122,7 @@ 14 @@ -6422,7 +6419,7 @@
15 fi 15 fi
16 16
17 saved_LIBS=$LIBS 17 saved_LIBS=$LIBS
18 - for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db 18 - for dbname in ${with_bdb} db-4.7 db4.7 db47 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
19 + for dbname in db 19 + for dbname in db
20 do 20 do
21 LIBS="$saved_LIBS -l$dbname" 21 LIBS="$saved_LIBS -l$dbname"
22 cat >conftest.$ac_ext <<_ACEOF 22 cat >conftest.$ac_ext <<_ACEOF
23 @@ -5205,6 +5202,54 @@ 23 @@ -6526,6 +6523,54 @@
24 fi 24 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 25 conftest$ac_exeext conftest.$ac_ext
26 fi 26 fi
27 + if test "$dblib" = "no"; then 27 + if test "$dblib" = "no"; then
28 + cat >conftest.$ac_ext <<_ACEOF 28 + cat >conftest.$ac_ext <<_ACEOF
29 +/* confdefs.h. */ 29 +/* confdefs.h. */
30 +_ACEOF 30 +_ACEOF
73 + conftest$ac_exeext conftest.$ac_ext 73 + conftest$ac_exeext conftest.$ac_ext
74 + fi 74 + fi
75 LIBS=$saved_LIBS 75 LIBS=$saved_LIBS
76 76
77 LDFLAGS=$BDB_SAVE_LDFLAGS 77 LDFLAGS=$BDB_SAVE_LDFLAGS
78 @@ -5882,7 +5927,7 @@ 78 @@ -7232,7 +7277,7 @@
79 fi 79 fi
80 80
81 saved_LIBS=$LIBS 81 saved_LIBS=$LIBS
82 - for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db 82 - for dbname in ${with_bdb} db-4.7 db4.7 db47 db-4.6 db4.6 db46 db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
83 + for dbname in db 83 + for dbname in db
84 do 84 do
85 LIBS="$saved_LIBS -l$dbname" 85 LIBS="$saved_LIBS -l$dbname"
86 cat >conftest.$ac_ext <<_ACEOF 86 cat >conftest.$ac_ext <<_ACEOF
87 @@ -5962,6 +6007,54 @@ 87 @@ -7336,6 +7381,54 @@
88 fi 88 rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
89 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 89 conftest$ac_exeext conftest.$ac_ext
90 fi 90 fi
91 + if test "$dblib" = "no"; then 91 + if test "$dblib" = "no"; then
92 + cat >conftest.$ac_ext <<_ACEOF 92 + cat >conftest.$ac_ext <<_ACEOF
93 +/* confdefs.h. */ 93 +/* confdefs.h. */
94 +_ACEOF 94 +_ACEOF
137 + conftest$ac_exeext conftest.$ac_ext 137 + conftest$ac_exeext conftest.$ac_ext
138 + fi 138 + fi
139 LIBS=$saved_LIBS 139 LIBS=$saved_LIBS
140 140
141 LDFLAGS=$BDB_SAVE_LDFLAGS 141 LDFLAGS=$BDB_SAVE_LDFLAGS
142 @@ -12005,20 +12098,20 @@ 142 @@ -14476,20 +14569,20 @@
143 fi 143 fi
144 144
145 LIB_SQLITE_DIR=$LIB_SQLITE 145 LIB_SQLITE_DIR=$LIB_SQLITE
146 - LIB_SQLITE="$LIB_SQLITE -lsqlite" 146 - LIB_SQLITE="$LIB_SQLITE -lsqlite"
147 + LIB_SQLITE="$LIB_SQLITE -lsqlite3" 147 + LIB_SQLITE="$LIB_SQLITE -lsqlite3"
149 if test -d ${with_sqlite}/include; then 149 if test -d ${with_sqlite}/include; then
150 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}/include" 150 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}/include"
151 else 151 else
152 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}" 152 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}"
153 fi 153 fi
154 - echo "$as_me:$LINENO: checking for sqlite_open in -lsqlite" >&5 154 - { $as_echo "$as_me:$LINENO: checking for sqlite_open in -lsqlite" >&5
155 -echo $ECHO_N "checking for sqlite_open in -lsqlite... $ECHO_C" >&6 155 -$as_echo_n "checking for sqlite_open in -lsqlite... " >&6; }
156 + echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5 156 + echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5
157 +echo $ECHO_N "checking for sqlite3_open in -lsqlite3... $ECHO_C" >&6 157 +echo $ECHO_N "checking for sqlite3_open in -lsqlite3... $ECHO_C" >&6
158 if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then 158 if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then
159 echo $ECHO_N "(cached) $ECHO_C" >&6 159 $as_echo_n "(cached) " >&6
160 else 160 else
161 ac_check_lib_save_LIBS=$LIBS 161 ac_check_lib_save_LIBS=$LIBS
162 -LIBS="-lsqlite $LIB_SQLITE_DIR $LIBS" 162 -LIBS="-lsqlite $LIB_SQLITE_DIR $LIBS"
163 +LIBS="-lsqlite3 $LIB_SQLITE_DIR $LIBS" 163 +LIBS="-lsqlite3 $LIB_SQLITE_DIR $LIBS"
164 cat >conftest.$ac_ext <<_ACEOF 164 cat >conftest.$ac_ext <<_ACEOF
165 #line $LINENO "configure"
166 /* confdefs.h. */ 165 /* confdefs.h. */
167 @@ -12033,11 +12126,11 @@ 166 _ACEOF
167 @@ -14503,11 +14596,11 @@
168 #ifdef __cplusplus
169 extern "C"
168 #endif 170 #endif
169 /* We use char because int might match the return type of a gcc2
170 builtin and then its argument prototype would still apply. */
171 -char sqlite_open (); 171 -char sqlite_open ();
172 +char sqlite3_open (); 172 +char sqlite3_open ();
173 int 173 int
174 main () 174 main ()
175 { 175 {
176 -sqlite_open (); 176 -return sqlite_open ();
177 +sqlite3_open (); 177 +return sqlite3_open ();
178 ; 178 ;
179 return 0; 179 return 0;
180 } 180 }
181 Index: lib/saslint.h 181 Index: lib/saslint.h
182 --- lib/saslint.h.orig 2006-04-18 22:25:45 +0200 182 --- lib/saslint.h.orig 2006-04-18 22:25:45 +0200
183 +++ lib/saslint.h 2008-12-25 18:48:51 +0100 183 +++ lib/saslint.h 2008-12-25 18:48:51 +0100
184 @@ -109,8 +109,6 @@ 184 @@ -118,8 +118,6 @@
185 const char *appname; 185 const char *appname;
186 } sasl_global_callbacks_t; 186 } sasl_global_callbacks_t;
187 187
188 -extern sasl_global_callbacks_t global_callbacks; 188 -extern sasl_global_callbacks_t global_callbacks;
189 - 189 -
191 { 191 {
192 sasl_ssf_t ssf; 192 sasl_ssf_t ssf;
193 Index: lib/server.c 193 Index: lib/server.c
194 --- lib/server.c.orig 2006-05-17 18:46:13 +0200 194 --- lib/server.c.orig 2006-05-17 18:46:13 +0200
195 +++ lib/server.c 2008-12-25 18:48:51 +0100 195 +++ lib/server.c 2008-12-25 18:48:51 +0100
196 @@ -95,7 +95,7 @@ 196 @@ -90,7 +90,7 @@
197 197
198 static mech_list_t *mechlist = NULL; /* global var which holds the list */ 198 static mech_list_t *mechlist = NULL; /* global var which holds the list */
199 199
200 -sasl_global_callbacks_t global_callbacks; 200 -sasl_global_callbacks_t global_callbacks;
201 +static sasl_global_callbacks_t global_callbacks; 201 +static sasl_global_callbacks_t global_callbacks;
202 202
203 /* set the password for a user 203 /* set the password for a user
204 * conn -- SASL connection 204 * conn -- SASL connection
205 @@ -477,16 +477,8 @@ 205 @@ -606,16 +606,8 @@
206 return SASL_CONTINUE; 206 return SASL_CONTINUE;
207 } 207 }
208 208
209 - /* get the path to the config file */ 209 - /* get the path to the config file */
210 - getconfpath_cb = _sasl_find_getconfpath_callback( global_callbacks.callbacks ); 210 - getconfpath_cb = _sasl_find_getconfpath_callback( global_callbacks.callbacks );
211 - if (getconfpath_cb == NULL) return SASL_BADPARAM; 211 - if (getconfpath_cb == NULL) return SASL_BADPARAM;
212 - 212 -
213 - /* getconfpath_cb->proc MUST be a sasl_getconfpath_t; if only C had a type 213 - /* getconfpath_cb->proc MUST be a sasl_getconfpath_t; if only C had a type
214 - system */ 214 - system */
215 - result = ((sasl_getconfpath_t *)(getconfpath_cb->proc))(getconfpath_cb->context, 215 - result = ((sasl_getconfpath_t *)(getconfpath_cb->proc))(getconfpath_cb->context,
216 - &path_to_config); 216 - (char **) &path_to_config);
217 - if (result != SASL_OK) goto done; 217 - if (result != SASL_OK) goto done;
218 - if (path_to_config == NULL) path_to_config = ""; 218 - if (path_to_config == NULL) path_to_config = "";
219 + result = SASL_OK; 219 + result = SASL_OK;
220 + path_to_config = "@l_sysconfdir@"; 220 + path_to_config = "@l_sysconfdir@";
221 221
446 - sqlite_close((sqlite*)db); 446 - sqlite_close((sqlite*)db);
447 + sqlite3_close((sqlite3 *)db); 447 + sqlite3_close((sqlite3 *)db);
448 } 448 }
449 #endif /* HAVE_SQLITE */ 449 #endif /* HAVE_SQLITE */
450 450
451 @@ -771,7 +802,7 @@ 451 @@ -918,7 +949,7 @@
452 settings = (sql_settings_t *) glob_context; 452 settings = (sql_settings_t *) glob_context;
453 453
454 sparams->utils->log(NULL, SASL_LOG_DEBUG, 454 sparams->utils->log(NULL, SASL_LOG_DEBUG,
455 - "sql plugin Parse the username %s\n", user); 455 - "sql plugin Parse the username %s\n", user);
456 + "sql plugin parse the username %s\n", user); 456 + "sql plugin parse the username %s\n", user);
457 457
458 user_buf = sparams->utils->malloc(ulen + 1); 458 user_buf = sparams->utils->malloc(ulen + 1);
459 if (!user_buf) goto done; 459 if (!user_buf) {
460 @@ -849,7 +880,7 @@ 460 @@ -1022,7 +1053,7 @@
461 } 461 }
462 462
463 sparams->utils->log(NULL, SASL_LOG_DEBUG, 463 sparams->utils->log(NULL, SASL_LOG_DEBUG,
464 - "sql plugin create statement from %s %s %s\n", 464 - "sql plugin create statement from %s %s %s\n",
465 + "sql plugin create statement from name=%s user=%s realm=%s\n", 465 + "sql plugin create statement from name=%s user=%s realm=%s\n",
466 realname, escap_userid, escap_realm); 466 realname, escap_userid, escap_realm);
467 467
468 /* create a statement that we will use */ 468 /* create a statement that we will use */
469 @@ -864,9 +895,15 @@ 469 @@ -1043,12 +1074,18 @@
470 /* run the query */ 470 /* run the query */
471 if (!settings->sql_engine->sql_exec(conn, query, value, sizeof(value), 471 if (!settings->sql_engine->sql_exec(conn, query, value, sizeof(value),
472 &value_len, sparams->utils)) { 472 &value_len, sparams->utils)) {
473 + sparams->utils->log(NULL, SASL_LOG_DEBUG, 473 + sparams->utils->log(NULL, SASL_LOG_DEBUG,
474 + "sql plugin query successful\n"); 474 + "sql plugin query successful\n");
475 sparams->utils->prop_set(sparams->propctx, cur->name, 475 sparams->utils->prop_set(sparams->propctx,
476 value, value_len); 476 cur->name,
477 value,
478 (int)value_len);
479 ret = SASL_OK;
477 } 480 }
478 + else { 481 + else {
479 + sparams->utils->log(NULL, SASL_LOG_DEBUG, 482 + sparams->utils->log(NULL, SASL_LOG_DEBUG,
480 + "sql plugin query failed\n"); 483 + "sql plugin query failed\n");
481 + } 484 + }
483 sparams->utils->free(query); 486 sparams->utils->free(query);
484 } 487 }
485 Index: sample/client.c 488 Index: sample/client.c
486 --- sample/client.c.orig 2004-03-09 18:35:32 +0100 489 --- sample/client.c.orig 2004-03-09 18:35:32 +0100
487 +++ sample/client.c 2008-12-25 18:48:51 +0100 490 +++ sample/client.c 2008-12-25 18:48:51 +0100
488 @@ -133,13 +133,11 @@ 491 @@ -137,13 +137,11 @@
489 return SASL_OK; 492 return SASL_OK;
490 } 493 }
491 494
492 -#ifndef HAVE_GETPASSPHRASE 495 -#ifndef HAVE_GETPASSPHRASE
493 static char * 496 static char *
498 } 501 }
499 -#endif /* ! HAVE_GETPASSPHRASE */ 502 -#endif /* ! HAVE_GETPASSPHRASE */
500 503
501 static int 504 static int
502 getsecret(sasl_conn_t *conn, 505 getsecret(sasl_conn_t *conn,
503 @@ -155,7 +153,7 @@ 506 @@ -159,7 +157,7 @@
504 if (! conn || ! psecret || id != SASL_CB_PASS) 507 if (! conn || ! psecret || id != SASL_CB_PASS)
505 return SASL_BADPARAM; 508 return SASL_BADPARAM;
506 509
507 - password = getpassphrase("Password: "); 510 - password = getpassphrase("Password: ");
508 + password = my_getpassphrase("Password: "); 511 + password = my_getpassphrase("Password: ");
510 return SASL_FAIL; 513 return SASL_FAIL;
511 514
512 Index: sample/sample-client.c 515 Index: sample/sample-client.c
513 --- sample/sample-client.c.orig 2004-10-26 13:14:33 +0200 516 --- sample/sample-client.c.orig 2004-10-26 13:14:33 +0200
514 +++ sample/sample-client.c 2008-12-25 18:48:51 +0100 517 +++ sample/sample-client.c 2008-12-25 18:48:51 +0100
515 @@ -244,13 +244,11 @@ 518 @@ -245,13 +245,11 @@
516 return SASL_OK; 519 return SASL_OK;
517 } 520 }
518 521
519 -#ifndef HAVE_GETPASSPHRASE 522 -#ifndef HAVE_GETPASSPHRASE
520 static char * 523 static char *
525 } 528 }
526 -#endif /* ! HAVE_GETPASSPHRASE */ 529 -#endif /* ! HAVE_GETPASSPHRASE */
527 530
528 static int 531 static int
529 getsecret(sasl_conn_t *conn, 532 getsecret(sasl_conn_t *conn,
530 @@ -264,7 +262,7 @@ 533 @@ -265,7 +263,7 @@
531 if (! conn || ! psecret || id != SASL_CB_PASS) 534 if (! conn || ! psecret || id != SASL_CB_PASS)
532 return SASL_BADPARAM; 535 return SASL_BADPARAM;
533 536
534 - password = getpassphrase("Password: "); 537 - password = getpassphrase("Password: ");
535 + password = my_getpassphrase("Password: "); 538 + password = my_getpassphrase("Password: ");
536 if (! password) 539 if (! password)
537 return SASL_FAIL; 540 return SASL_FAIL;
538 541
539 @@ -307,7 +305,7 @@ 542 @@ -308,7 +306,7 @@
540 fflush(stdout); 543 fflush(stdout);
541 544
542 if (id == SASL_CB_ECHOPROMPT) { 545 if (id == SASL_CB_ECHOPROMPT) {
543 - char *original = getpassphrase(""); 546 - char *original = getpassphrase("");
544 + char *original = my_getpassphrase(""); 547 + char *original = my_getpassphrase("");
555 - $(INSTALL_DATA) $(srcdir)/saslauthd.8 $(DESTDIR)$(mandir)/man8/saslauthd.8 558 - $(INSTALL_DATA) $(srcdir)/saslauthd.8 $(DESTDIR)$(mandir)/man8/saslauthd.8
556 + $(INSTALL_DATA) $(srcdir)/saslauthd.mdoc $(DESTDIR)$(mandir)/man8/saslauthd.8 559 + $(INSTALL_DATA) $(srcdir)/saslauthd.mdoc $(DESTDIR)$(mandir)/man8/saslauthd.8
557 Index: saslauthd/Makefile.in 560 Index: saslauthd/Makefile.in
558 --- saslauthd/Makefile.in.orig 2008-12-25 18:48:51 +0100 561 --- saslauthd/Makefile.in.orig 2008-12-25 18:48:51 +0100
559 +++ saslauthd/Makefile.in 2008-12-25 18:48:51 +0100 562 +++ saslauthd/Makefile.in 2008-12-25 18:48:51 +0100
560 @@ -621,7 +621,7 @@ 563 @@ -722,7 +722,7 @@
561 564
562 install-data-local: saslauthd.8 565 install-data-local: saslauthd.8
563 $(mkinstalldirs) $(DESTDIR)$(mandir)/man8 566 $(mkinstalldirs) $(DESTDIR)$(mandir)/man8
564 - $(INSTALL_DATA) $(srcdir)/saslauthd.8 $(DESTDIR)$(mandir)/man8/saslauthd.8 567 - $(INSTALL_DATA) $(srcdir)/saslauthd.8 $(DESTDIR)$(mandir)/man8/saslauthd.8
565 + $(INSTALL_DATA) $(srcdir)/saslauthd.mdoc $(DESTDIR)$(mandir)/man8/saslauthd.8 568 + $(INSTALL_DATA) $(srcdir)/saslauthd.mdoc $(DESTDIR)$(mandir)/man8/saslauthd.8
569
566 # Tell versions [3.59,3.63) of GNU make to not export all variables. 570 # Tell versions [3.59,3.63) of GNU make to not export all variables.
567 # Otherwise a system limit (for SysV at least) may be exceeded. 571 # Otherwise a system limit (for SysV at least) may be exceeded.
568 .NOEXPORT:
569 Index: saslauthd/lak.c 572 Index: saslauthd/lak.c
570 --- saslauthd/lak.c.orig 2005-05-15 07:49:51 +0200 573 --- saslauthd/lak.c.orig 2005-05-15 07:49:51 +0200
571 +++ saslauthd/lak.c 2008-12-25 18:48:51 +0100 574 +++ saslauthd/lak.c 2008-12-25 18:48:51 +0100
572 @@ -47,6 +47,7 @@ 575 @@ -47,6 +47,7 @@
573 #include <crypt.h> 576 #include <crypt.h>
575 578
576 +#include "saslauthd.h" /* get strlcpy macro for non-BSD; get HAVE_OPENSSL from config.h */ 579 +#include "saslauthd.h" /* get strlcpy macro for non-BSD; get HAVE_OPENSSL from config.h */
577 #ifdef HAVE_OPENSSL 580 #ifdef HAVE_OPENSSL
578 #ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT 581 #ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT
579 #define OPENSSL_DISABLE_OLD_DES_SUPPORT 582 #define OPENSSL_DISABLE_OLD_DES_SUPPORT
580 @@ -57,7 +58,7 @@ 583 @@ -58,7 +59,7 @@
581 584 #define LDAP_DEPRECATED 1
582 #include <ldap.h> 585 #include <ldap.h>
583 #include <lber.h> 586 #include <lber.h>
584 -#include <sasl.h> 587 -#include <sasl.h>
585 +#include "sasl.h" 588 +#include "sasl.h"
586 #include "lak.h" 589 #include "lak.h"
587 590
588 typedef struct lak_auth_method { 591 typedef struct lak_auth_method {
589 Index: utils/pluginviewer.c
590 --- utils/pluginviewer.c.orig 2006-05-17 18:46:17 +0200
591 +++ utils/pluginviewer.c 2008-12-25 18:48:51 +0100
592 @@ -536,7 +536,7 @@
593 fprintf(stderr, "%s: Usage: %s [-a] [-s] [-c] [-b min=N,max=N] [-e ssf=N,id=ID] [-m MECHS] [-x AUXPROP_MECH] [-f FLAGS] [-i local=IP,remote=IP] [-p PATH]\n"
594 "\t-a\tlist auxprop plugins\n"
595 "\t-s\tlist server authentication (SASL) plugins\n"
596 - "\t-s\tlist client authentication (SASL) plugins\n"
597 + "\t-c\tlist client authentication (SASL) plugins\n"
598 "\t-b ...\t#bits to use for encryption\n"
599 "\t\tmin=N\tminumum #bits to use (1 => integrity)\n"
600 "\t\tmax=N\tmaximum #bits to use\n"

mercurial