sasl.patch 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. Index: lib/server.c
  2. --- lib/server.c.orig 2004-07-06 15:42:23 +0200
  3. +++ lib/server.c 2004-07-14 19:38:16 +0200
  4. @@ -470,16 +470,8 @@
  5. return SASL_CONTINUE;
  6. }
  7. - /* get the path to the plugins; for now the config file will reside there */
  8. - getpath_cb=_sasl_find_getpath_callback( global_callbacks.callbacks );
  9. - if (getpath_cb==NULL) return SASL_BADPARAM;
  10. -
  11. - /* getpath_cb->proc MUST be a sasl_getpath_t; if only c had a type
  12. - system */
  13. - result = ((sasl_getpath_t *)(getpath_cb->proc))(getpath_cb->context,
  14. - &path_to_config);
  15. - if (result!=SASL_OK) goto done;
  16. - if (path_to_config == NULL) path_to_config = "";
  17. + result = SASL_OK;
  18. + path_to_config = "@l_sysconfdir@";
  19. c = strchr(path_to_config, PATHS_DELIMITER);
  20. Index: saslauthd/lak.c
  21. --- saslauthd/lak.c.orig 2003-10-30 18:21:47.000000000 +0100
  22. +++ saslauthd/lak.c 2004-02-08 11:56:59.000000000 +0100
  23. @@ -47,6 +47,7 @@
  24. #include <crypt.h>
  25. #endif
  26. +#include "saslauthd.h" /* get strlcpy macro for non-BSD; get HAVE_OPENSSL from config.h */
  27. #ifdef HAVE_OPENSSL
  28. #ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT
  29. #define OPENSSL_DISABLE_OLD_DES_SUPPORT
  30. @@ -57,7 +58,7 @@
  31. #include <ldap.h>
  32. #include <lber.h>
  33. -#include <sasl.h>
  34. +#include "sasl.h"
  35. #include "lak.h"
  36. typedef struct lak_auth_method {
  37. Index: configure
  38. --- configure.orig 2005-03-21 15:33:01 +0100
  39. +++ configure 2005-03-21 15:36:05 +0100
  40. @@ -5129,7 +5129,7 @@
  41. fi
  42. saved_LIBS=$LIBS
  43. - for dbname in 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
  44. + for dbname in db
  45. do
  46. LIBS="$saved_LIBS -l$dbname"
  47. cat >conftest.$ac_ext <<_ACEOF
  48. @@ -5208,6 +5208,54 @@
  49. fi
  50. rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  51. fi
  52. + if test "$dblib" = "no"; then
  53. + cat >conftest.$ac_ext <<_ACEOF
  54. +/* confdefs.h. */
  55. +_ACEOF
  56. +cat confdefs.h >>conftest.$ac_ext
  57. +cat >>conftest.$ac_ext <<_ACEOF
  58. +/* end confdefs.h. */
  59. +#include <db.h>
  60. +int
  61. +main ()
  62. +{
  63. +dbm_open(NULL, 0, 0, 0, NULL, NULL, NULL);
  64. + ;
  65. + return 0;
  66. +}
  67. +_ACEOF
  68. +rm -f conftest.$ac_objext conftest$ac_exeext
  69. +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  70. + (eval $ac_link) 2>conftest.er1
  71. + ac_status=$?
  72. + grep -v '^ *+' conftest.er1 >conftest.err
  73. + rm -f conftest.er1
  74. + cat conftest.err >&5
  75. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  76. + (exit $ac_status); } &&
  77. + { ac_try='test -z "$ac_c_werror_flag"
  78. + || test ! -s conftest.err'
  79. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  80. + (eval $ac_try) 2>&5
  81. + ac_status=$?
  82. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  83. + (exit $ac_status); }; } &&
  84. + { ac_try='test -s conftest$ac_exeext'
  85. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  86. + (eval $ac_try) 2>&5
  87. + ac_status=$?
  88. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  89. + (exit $ac_status); }; }; then
  90. + BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
  91. +else
  92. + echo "$as_me: failed program was:" >&5
  93. +sed 's/^/| /' conftest.$ac_ext >&5
  94. +
  95. +dblib="no"
  96. +fi
  97. +rm -f conftest.err conftest.$ac_objext \
  98. + conftest$ac_exeext conftest.$ac_ext
  99. + fi
  100. LIBS=$saved_LIBS
  101. LDFLAGS=$BDB_SAVE_LDFLAGS
  102. @@ -5885,7 +5933,7 @@
  103. fi
  104. saved_LIBS=$LIBS
  105. - for dbname in 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
  106. + for dbname in db
  107. do
  108. LIBS="$saved_LIBS -l$dbname"
  109. cat >conftest.$ac_ext <<_ACEOF
  110. @@ -5964,6 +6012,54 @@
  111. fi
  112. rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
  113. fi
  114. + if test "$dblib" = "no"; then
  115. + cat >conftest.$ac_ext <<_ACEOF
  116. +/* confdefs.h. */
  117. +_ACEOF
  118. +cat confdefs.h >>conftest.$ac_ext
  119. +cat >>conftest.$ac_ext <<_ACEOF
  120. +/* end confdefs.h. */
  121. +#include <db.h>
  122. +int
  123. +main ()
  124. +{
  125. +dbm_open(NULL, 0, 0, 0, NULL, NULL, NULL);
  126. + ;
  127. + return 0;
  128. +}
  129. +_ACEOF
  130. +rm -f conftest.$ac_objext conftest$ac_exeext
  131. +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
  132. + (eval $ac_link) 2>conftest.er1
  133. + ac_status=$?
  134. + grep -v '^ *+' conftest.er1 >conftest.err
  135. + rm -f conftest.er1
  136. + cat conftest.err >&5
  137. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  138. + (exit $ac_status); } &&
  139. + { ac_try='test -z "$ac_c_werror_flag"
  140. + || test ! -s conftest.err'
  141. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  142. + (eval $ac_try) 2>&5
  143. + ac_status=$?
  144. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  145. + (exit $ac_status); }; } &&
  146. + { ac_try='test -s conftest$ac_exeext'
  147. + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
  148. + (eval $ac_try) 2>&5
  149. + ac_status=$?
  150. + echo "$as_me:$LINENO: \$? = $ac_status" >&5
  151. + (exit $ac_status); }; }; then
  152. + BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db
  153. +else
  154. + echo "$as_me: failed program was:" >&5
  155. +sed 's/^/| /' conftest.$ac_ext >&5
  156. +
  157. +dblib="no"
  158. +fi
  159. +rm -f conftest.err conftest.$ac_objext \
  160. + conftest$ac_exeext conftest.$ac_ext
  161. + fi
  162. LIBS=$saved_LIBS
  163. LDFLAGS=$BDB_SAVE_LDFLAGS