sasl.patch 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. Index: configure
  2. --- configure.orig 2006-05-18 21:30:13 +0200
  3. +++ configure 2006-12-17 18:35:24 +0100
  4. @@ -3944,9 +3944,6 @@
  5. fi
  6. -if test "$ac_cv_c_compiler_gnu" = yes; then
  7. - CFLAGS="-Wall -W ${CFLAGS}"
  8. -fi
  9. # Check whether --with-purecov or --without-purecov was given.
  10. @@ -5125,7 +5122,7 @@
  11. fi
  12. saved_LIBS=$LIBS
  13. - 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
  14. + for dbname in db
  15. do
  16. LIBS="$saved_LIBS -l$dbname"
  17. cat >conftest.$ac_ext <<_ACEOF
  18. @@ -5205,6 +5202,54 @@
  19. fi
  20. rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  21. fi
  22. + if test "$dblib" = "no"; then
  23. + cat >conftest.$ac_ext <<_ACEOF
  24. +/* confdefs.h. */
  25. +_ACEOF
  26. +cat confdefs.h >>conftest.$ac_ext
  27. +cat >>conftest.$ac_ext <<_ACEOF
  28. +/* end confdefs.h. */
  29. +#include <db.h>
  30. +int
  31. +main ()
  32. +{
  33. +dbm_open(NULL, 0, 0, 0, NULL, NULL, NULL);
  34. + ;
  35. + return 0;
  36. +}
  37. +_ACEOF
  38. +rm -f conftest.$ac_objext conftest$ac_exeext
  39. +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  40. + (eval $ac_link) 2>conftest.er1
  41. + ac_status=$?
  42. + grep -v '^ *+' conftest.er1 >conftest.err
  43. + rm -f conftest.er1
  44. + cat conftest.err >&5
  45. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  46. + (exit $ac_status); } &&
  47. + { ac_try='test -z "$ac_c_werror_flag"
  48. + || test ! -s conftest.err'
  49. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  50. + (eval $ac_try) 2>&5
  51. + ac_status=$?
  52. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  53. + (exit $ac_status); }; } &&
  54. + { ac_try='test -s conftest$ac_exeext'
  55. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  56. + (eval $ac_try) 2>&5
  57. + ac_status=$?
  58. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  59. + (exit $ac_status); }; }; then
  60. + BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
  61. +else
  62. + echo "$as_me: failed program was:" >&5
  63. +sed 's/^/| /' conftest.$ac_ext >&5
  64. +
  65. +dblib="no"
  66. +fi
  67. +rm -f conftest.err conftest.$ac_objext \
  68. + conftest$ac_exeext conftest.$ac_ext
  69. + fi
  70. LIBS=$saved_LIBS
  71. LDFLAGS=$BDB_SAVE_LDFLAGS
  72. @@ -5882,7 +5927,7 @@
  73. fi
  74. saved_LIBS=$LIBS
  75. - 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
  76. + for dbname in db
  77. do
  78. LIBS="$saved_LIBS -l$dbname"
  79. cat >conftest.$ac_ext <<_ACEOF
  80. @@ -5962,6 +6007,54 @@
  81. fi
  82. rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  83. fi
  84. + if test "$dblib" = "no"; then
  85. + cat >conftest.$ac_ext <<_ACEOF
  86. +/* confdefs.h. */
  87. +_ACEOF
  88. +cat confdefs.h >>conftest.$ac_ext
  89. +cat >>conftest.$ac_ext <<_ACEOF
  90. +/* end confdefs.h. */
  91. +#include <db.h>
  92. +int
  93. +main ()
  94. +{
  95. +dbm_open(NULL, 0, 0, 0, NULL, NULL, NULL);
  96. + ;
  97. + return 0;
  98. +}
  99. +_ACEOF
  100. +rm -f conftest.$ac_objext conftest$ac_exeext
  101. +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  102. + (eval $ac_link) 2>conftest.er1
  103. + ac_status=$?
  104. + grep -v '^ *+' conftest.er1 >conftest.err
  105. + rm -f conftest.er1
  106. + cat conftest.err >&5
  107. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  108. + (exit $ac_status); } &&
  109. + { ac_try='test -z "$ac_c_werror_flag"
  110. + || test ! -s conftest.err'
  111. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  112. + (eval $ac_try) 2>&5
  113. + ac_status=$?
  114. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  115. + (exit $ac_status); }; } &&
  116. + { ac_try='test -s conftest$ac_exeext'
  117. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  118. + (eval $ac_try) 2>&5
  119. + ac_status=$?
  120. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  121. + (exit $ac_status); }; }; then
  122. + BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
  123. +else
  124. + echo "$as_me: failed program was:" >&5
  125. +sed 's/^/| /' conftest.$ac_ext >&5
  126. +
  127. +dblib="no"
  128. +fi
  129. +rm -f conftest.err conftest.$ac_objext \
  130. + conftest$ac_exeext conftest.$ac_ext
  131. + fi
  132. LIBS=$saved_LIBS
  133. LDFLAGS=$BDB_SAVE_LDFLAGS
  134. Index: lib/saslint.h
  135. --- lib/saslint.h.orig 2006-04-18 22:25:45 +0200
  136. +++ lib/saslint.h 2006-12-17 18:35:12 +0100
  137. @@ -109,8 +109,6 @@
  138. const char *appname;
  139. } sasl_global_callbacks_t;
  140. -extern sasl_global_callbacks_t global_callbacks;
  141. -
  142. typedef struct _sasl_external_properties
  143. {
  144. sasl_ssf_t ssf;
  145. Index: lib/server.c
  146. --- lib/server.c.orig 2006-05-17 18:46:13 +0200
  147. +++ lib/server.c 2006-12-17 18:35:12 +0100
  148. @@ -95,7 +95,7 @@
  149. static mech_list_t *mechlist = NULL; /* global var which holds the list */
  150. -sasl_global_callbacks_t global_callbacks;
  151. +static sasl_global_callbacks_t global_callbacks;
  152. /* set the password for a user
  153. * conn -- SASL connection
  154. @@ -477,16 +477,8 @@
  155. return SASL_CONTINUE;
  156. }
  157. - /* get the path to the config file */
  158. - getconfpath_cb = _sasl_find_getconfpath_callback( global_callbacks.callbacks );
  159. - if (getconfpath_cb == NULL) return SASL_BADPARAM;
  160. -
  161. - /* getconfpath_cb->proc MUST be a sasl_getconfpath_t; if only C had a type
  162. - system */
  163. - result = ((sasl_getconfpath_t *)(getconfpath_cb->proc))(getconfpath_cb->context,
  164. - &path_to_config);
  165. - if (result != SASL_OK) goto done;
  166. - if (path_to_config == NULL) path_to_config = "";
  167. + result = SASL_OK;
  168. + path_to_config = "@l_sysconfdir@";
  169. next = path_to_config;
  170. Index: sample/client.c
  171. --- sample/client.c.orig 2004-03-09 18:35:32 +0100
  172. +++ sample/client.c 2006-12-17 18:35:12 +0100
  173. @@ -133,13 +133,11 @@
  174. return SASL_OK;
  175. }
  176. -#ifndef HAVE_GETPASSPHRASE
  177. static char *
  178. -getpassphrase(const char *prompt)
  179. +my_getpassphrase(const char *prompt)
  180. {
  181. return getpass(prompt);
  182. }
  183. -#endif /* ! HAVE_GETPASSPHRASE */
  184. static int
  185. getsecret(sasl_conn_t *conn,
  186. @@ -155,7 +153,7 @@
  187. if (! conn || ! psecret || id != SASL_CB_PASS)
  188. return SASL_BADPARAM;
  189. - password = getpassphrase("Password: ");
  190. + password = my_getpassphrase("Password: ");
  191. if (! password)
  192. return SASL_FAIL;
  193. Index: sample/sample-client.c
  194. --- sample/sample-client.c.orig 2004-10-26 13:14:33 +0200
  195. +++ sample/sample-client.c 2006-12-17 18:35:12 +0100
  196. @@ -244,13 +244,11 @@
  197. return SASL_OK;
  198. }
  199. -#ifndef HAVE_GETPASSPHRASE
  200. static char *
  201. -getpassphrase(const char *prompt)
  202. +my_getpassphrase(const char *prompt)
  203. {
  204. return getpass(prompt);
  205. }
  206. -#endif /* ! HAVE_GETPASSPHRASE */
  207. static int
  208. getsecret(sasl_conn_t *conn,
  209. @@ -264,7 +262,7 @@
  210. if (! conn || ! psecret || id != SASL_CB_PASS)
  211. return SASL_BADPARAM;
  212. - password = getpassphrase("Password: ");
  213. + password = my_getpassphrase("Password: ");
  214. if (! password)
  215. return SASL_FAIL;
  216. Index: saslauthd/Makefile.in
  217. --- saslauthd/Makefile.in.orig 2006-05-18 21:30:21 +0200
  218. +++ saslauthd/Makefile.in 2006-12-17 18:35:12 +0100
  219. @@ -150,11 +150,11 @@
  220. saslauthd_DEPENDENCIES = saslauthd-main.o @LTLIBOBJS@
  221. saslauthd_LDADD = @SASL_KRB_LIB@ \
  222. @GSSAPIBASE_LIBS@ @GSSAPI_LIBS@ @LIB_CRYPT@ @LIB_SIA@ \
  223. - @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@
  224. + @LIB_SOCKET@ @SASL_DB_LIB@ @LIB_PAM@ @LDAP_LIBS@ @LTLIBOBJS@ ../lib/libsasl2.a
  225. testsaslauthd_SOURCES = testsaslauthd.c utils.c
  226. -testsaslauthd_LDADD = @LIB_SOCKET@
  227. +testsaslauthd_LDADD = @LIB_SOCKET@ ../lib/libsasl2.a
  228. saslcache_SOURCES = saslcache.c
  229. Index: saslauthd/lak.c
  230. --- saslauthd/lak.c.orig 2005-05-15 07:49:51 +0200
  231. +++ saslauthd/lak.c 2006-12-17 18:35:12 +0100
  232. @@ -47,6 +47,7 @@
  233. #include <crypt.h>
  234. #endif
  235. +#include "saslauthd.h" /* get strlcpy macro for non-BSD; get HAVE_OPENSSL from config.h */
  236. #ifdef HAVE_OPENSSL
  237. #ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT
  238. #define OPENSSL_DISABLE_OLD_DES_SUPPORT
  239. @@ -57,7 +58,7 @@
  240. #include <ldap.h>
  241. #include <lber.h>
  242. -#include <sasl.h>
  243. +#include "sasl.h"
  244. #include "lak.h"
  245. typedef struct lak_auth_method {