michael@144: Index: configure michael@144: --- configure.orig 2006-05-18 21:30:13 +0200 michael@144: +++ configure 2008-12-25 18:48:51 +0100 michael@727: @@ -5015,9 +5015,6 @@ michael@144: michael@144: fi michael@144: michael@144: -if test "$ac_cv_c_compiler_gnu" = yes; then michael@144: - CFLAGS="-Wall -W ${CFLAGS}" michael@144: -fi michael@144: michael@144: michael@727: # Check whether --with-purecov was given. michael@727: @@ -6422,7 +6419,7 @@ michael@144: fi michael@144: michael@144: saved_LIBS=$LIBS michael@727: - 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 michael@144: + for dbname in db michael@144: do michael@144: LIBS="$saved_LIBS -l$dbname" michael@144: cat >conftest.$ac_ext <<_ACEOF michael@727: @@ -6526,6 +6523,54 @@ michael@727: rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ michael@727: conftest$ac_exeext conftest.$ac_ext michael@144: fi michael@144: + if test "$dblib" = "no"; then michael@144: + cat >conftest.$ac_ext <<_ACEOF michael@144: +/* confdefs.h. */ michael@144: +_ACEOF michael@144: +cat confdefs.h >>conftest.$ac_ext michael@144: +cat >>conftest.$ac_ext <<_ACEOF michael@144: +/* end confdefs.h. */ michael@144: +#include michael@144: +int michael@144: +main () michael@144: +{ michael@144: +dbm_open(NULL, 0, 0, 0, NULL, NULL, NULL); michael@144: + ; michael@144: + return 0; michael@144: +} michael@144: +_ACEOF michael@144: +rm -f conftest.$ac_objext conftest$ac_exeext michael@144: +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 michael@144: + (eval $ac_link) 2>conftest.er1 michael@144: + ac_status=$? michael@144: + grep -v '^ *+' conftest.er1 >conftest.err michael@144: + rm -f conftest.er1 michael@144: + cat conftest.err >&5 michael@144: + echo "$as_me:$LINENO: \$? = $ac_status" >&5 michael@144: + (exit $ac_status); } && michael@144: + { ac_try='test -z "$ac_c_werror_flag" michael@144: + || test ! -s conftest.err' michael@144: + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 michael@144: + (eval $ac_try) 2>&5 michael@144: + ac_status=$? michael@144: + echo "$as_me:$LINENO: \$? = $ac_status" >&5 michael@144: + (exit $ac_status); }; } && michael@144: + { ac_try='test -s conftest$ac_exeext' michael@144: + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 michael@144: + (eval $ac_try) 2>&5 michael@144: + ac_status=$? michael@144: + echo "$as_me:$LINENO: \$? = $ac_status" >&5 michael@144: + (exit $ac_status); }; }; then michael@144: + BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db michael@144: +else michael@144: + echo "$as_me: failed program was:" >&5 michael@144: +sed 's/^/| /' conftest.$ac_ext >&5 michael@144: + michael@144: +dblib="no" michael@144: +fi michael@144: +rm -f conftest.err conftest.$ac_objext \ michael@144: + conftest$ac_exeext conftest.$ac_ext michael@144: + fi michael@144: LIBS=$saved_LIBS michael@144: michael@144: LDFLAGS=$BDB_SAVE_LDFLAGS michael@727: @@ -7232,7 +7277,7 @@ michael@144: fi michael@144: michael@144: saved_LIBS=$LIBS michael@727: - 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 michael@144: + for dbname in db michael@144: do michael@144: LIBS="$saved_LIBS -l$dbname" michael@144: cat >conftest.$ac_ext <<_ACEOF michael@727: @@ -7336,6 +7381,54 @@ michael@727: rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ michael@727: conftest$ac_exeext conftest.$ac_ext michael@144: fi michael@144: + if test "$dblib" = "no"; then michael@144: + cat >conftest.$ac_ext <<_ACEOF michael@144: +/* confdefs.h. */ michael@144: +_ACEOF michael@144: +cat confdefs.h >>conftest.$ac_ext michael@144: +cat >>conftest.$ac_ext <<_ACEOF michael@144: +/* end confdefs.h. */ michael@144: +#include michael@144: +int michael@144: +main () michael@144: +{ michael@144: +dbm_open(NULL, 0, 0, 0, NULL, NULL, NULL); michael@144: + ; michael@144: + return 0; michael@144: +} michael@144: +_ACEOF michael@144: +rm -f conftest.$ac_objext conftest$ac_exeext michael@144: +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 michael@144: + (eval $ac_link) 2>conftest.er1 michael@144: + ac_status=$? michael@144: + grep -v '^ *+' conftest.er1 >conftest.err michael@144: + rm -f conftest.er1 michael@144: + cat conftest.err >&5 michael@144: + echo "$as_me:$LINENO: \$? = $ac_status" >&5 michael@144: + (exit $ac_status); } && michael@144: + { ac_try='test -z "$ac_c_werror_flag" michael@144: + || test ! -s conftest.err' michael@144: + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 michael@144: + (eval $ac_try) 2>&5 michael@144: + ac_status=$? michael@144: + echo "$as_me:$LINENO: \$? = $ac_status" >&5 michael@144: + (exit $ac_status); }; } && michael@144: + { ac_try='test -s conftest$ac_exeext' michael@144: + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 michael@144: + (eval $ac_try) 2>&5 michael@144: + ac_status=$? michael@144: + echo "$as_me:$LINENO: \$? = $ac_status" >&5 michael@144: + (exit $ac_status); }; }; then michael@144: + BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db michael@144: +else michael@144: + echo "$as_me: failed program was:" >&5 michael@144: +sed 's/^/| /' conftest.$ac_ext >&5 michael@144: + michael@144: +dblib="no" michael@144: +fi michael@144: +rm -f conftest.err conftest.$ac_objext \ michael@144: + conftest$ac_exeext conftest.$ac_ext michael@144: + fi michael@144: LIBS=$saved_LIBS michael@144: michael@144: LDFLAGS=$BDB_SAVE_LDFLAGS michael@727: @@ -14476,20 +14569,20 @@ michael@144: fi michael@144: michael@144: LIB_SQLITE_DIR=$LIB_SQLITE michael@144: - LIB_SQLITE="$LIB_SQLITE -lsqlite" michael@144: + LIB_SQLITE="$LIB_SQLITE -lsqlite3" michael@144: michael@144: if test -d ${with_sqlite}/include; then michael@144: CPPFLAGS="${CPPFLAGS} -I${with_sqlite}/include" michael@144: else michael@144: CPPFLAGS="${CPPFLAGS} -I${with_sqlite}" michael@144: fi michael@727: - { $as_echo "$as_me:$LINENO: checking for sqlite_open in -lsqlite" >&5 michael@727: -$as_echo_n "checking for sqlite_open in -lsqlite... " >&6; } michael@144: + echo "$as_me:$LINENO: checking for sqlite3_open in -lsqlite3" >&5 michael@144: +echo $ECHO_N "checking for sqlite3_open in -lsqlite3... $ECHO_C" >&6 michael@144: if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then michael@727: $as_echo_n "(cached) " >&6 michael@144: else michael@144: ac_check_lib_save_LIBS=$LIBS michael@144: -LIBS="-lsqlite $LIB_SQLITE_DIR $LIBS" michael@144: +LIBS="-lsqlite3 $LIB_SQLITE_DIR $LIBS" michael@144: cat >conftest.$ac_ext <<_ACEOF michael@144: /* confdefs.h. */ michael@727: _ACEOF michael@727: @@ -14503,11 +14596,11 @@ michael@727: #ifdef __cplusplus michael@727: extern "C" michael@144: #endif michael@144: -char sqlite_open (); michael@144: +char sqlite3_open (); michael@144: int michael@144: main () michael@144: { michael@727: -return sqlite_open (); michael@727: +return sqlite3_open (); michael@144: ; michael@144: return 0; michael@144: } michael@144: Index: lib/saslint.h michael@144: --- lib/saslint.h.orig 2006-04-18 22:25:45 +0200 michael@144: +++ lib/saslint.h 2008-12-25 18:48:51 +0100 michael@727: @@ -118,8 +118,6 @@ michael@144: const char *appname; michael@144: } sasl_global_callbacks_t; michael@144: michael@144: -extern sasl_global_callbacks_t global_callbacks; michael@144: - michael@144: typedef struct _sasl_external_properties michael@144: { michael@144: sasl_ssf_t ssf; michael@144: Index: lib/server.c michael@144: --- lib/server.c.orig 2006-05-17 18:46:13 +0200 michael@144: +++ lib/server.c 2008-12-25 18:48:51 +0100 michael@727: @@ -90,7 +90,7 @@ michael@144: michael@144: static mech_list_t *mechlist = NULL; /* global var which holds the list */ michael@144: michael@144: -sasl_global_callbacks_t global_callbacks; michael@144: +static sasl_global_callbacks_t global_callbacks; michael@144: michael@144: /* set the password for a user michael@144: * conn -- SASL connection michael@727: @@ -606,16 +606,8 @@ michael@144: return SASL_CONTINUE; michael@144: } michael@144: michael@144: - /* get the path to the config file */ michael@144: - getconfpath_cb = _sasl_find_getconfpath_callback( global_callbacks.callbacks ); michael@144: - if (getconfpath_cb == NULL) return SASL_BADPARAM; michael@144: - michael@144: - /* getconfpath_cb->proc MUST be a sasl_getconfpath_t; if only C had a type michael@144: - system */ michael@144: - result = ((sasl_getconfpath_t *)(getconfpath_cb->proc))(getconfpath_cb->context, michael@727: - (char **) &path_to_config); michael@144: - if (result != SASL_OK) goto done; michael@144: - if (path_to_config == NULL) path_to_config = ""; michael@144: + result = SASL_OK; michael@144: + path_to_config = "@l_sysconfdir@"; michael@144: michael@144: next = path_to_config; michael@144: michael@144: Index: plugins/sql.c michael@144: --- plugins/sql.c.orig 2006-04-07 15:42:16 +0200 michael@144: +++ plugins/sql.c 2008-12-25 21:57:47 +0100 michael@144: @@ -150,9 +150,15 @@ michael@144: return -1; michael@144: } michael@144: if (value) { michael@144: - strncpy(value, row[0], size-2); michael@144: - value[size-1] = '\0'; michael@144: - if (value_len) *value_len = strlen(value); michael@144: + unsigned long *col_lens; michael@144: + size_t col_len; michael@144: + col_lens = mysql_fetch_lengths(result); michael@144: + col_len = (size_t)col_lens[0]; michael@144: + if (col_len > size - 1); michael@144: + col_len = size - 1; michael@144: + memcpy(value, row[0], col_len); michael@144: + value[col_len] = '\0'; michael@144: + if (value_len) *value_len = col_len; michael@144: } michael@144: michael@144: /* free result */ michael@144: @@ -277,7 +283,7 @@ michael@144: ExecStatusType status; michael@144: michael@144: /* run the query */ michael@144: - result = PQexec(conn, cmd); michael@144: + result = PQexecParams(conn, cmd, 0, NULL, NULL, NULL, NULL, 1); michael@144: michael@144: /* check the status */ michael@144: status = PQresultStatus(result); michael@144: @@ -298,6 +304,7 @@ michael@144: row_count = PQntuples(result); michael@144: if (!row_count) { michael@144: /* umm nothing found */ michael@144: + utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: no result found for query %s", cmd); michael@144: utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found"); michael@144: PQclear(result); michael@144: return -1; michael@144: @@ -310,9 +317,26 @@ michael@144: /* now get the result set value and value_len */ michael@144: /* we only fetch one because we don't care about the rest */ michael@144: if (value) { michael@144: - strncpy(value, PQgetvalue(result,0,0), size-2); michael@144: - value[size-1] = '\0'; michael@144: - if (value_len) *value_len = strlen(value); michael@144: + if (PQgetisnull(result, 0, 0)) { michael@144: + size_t col_len; michael@144: + col_len = strlen(SQL_NULL_VALUE); michael@144: + if (col_len > size - 1) michael@144: + col_len = size - 1; michael@144: + memcpy(value, SQL_NULL_VALUE, col_len); michael@144: + value[col_len] = '\0'; michael@144: + if (value_len) michael@144: + *value_len = col_len; michael@144: + } michael@144: + else { michael@144: + size_t col_len; michael@144: + col_len = (size_t)PQgetlength(result, 0, 0); michael@144: + if (col_len > size - 1); michael@144: + col_len = size - 1; michael@144: + memcpy(value, PQgetvalue(result, 0, 0), col_len); michael@144: + value[col_len] = '\0'; michael@144: + if (value_len) michael@144: + *value_len = col_len; michael@144: + } michael@144: } michael@144: michael@144: /* free result */ michael@144: @@ -342,7 +366,7 @@ michael@144: #endif /* HAVE_PGSQL */ michael@144: michael@144: #ifdef HAVE_SQLITE michael@144: -#include michael@144: +#include michael@144: michael@144: static void *_sqlite_open(char *host __attribute__((unused)), michael@144: char *port __attribute__((unused)), michael@144: @@ -352,21 +376,23 @@ michael@144: const char *database, const sasl_utils_t *utils) michael@144: { michael@144: int rc; michael@144: - sqlite *db; michael@144: + sqlite3 *db; michael@144: char *zErrMsg = NULL; michael@144: michael@144: - db = sqlite_open(database, 0, &zErrMsg); michael@144: - if (db == NULL) { michael@144: + rc = sqlite3_open(database, &db); michael@144: + if (rc != SQLITE_OK) { michael@144: + zErrMsg = (char *)sqlite3_errmsg(db); michael@144: utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", zErrMsg); michael@144: - sqlite_freemem (zErrMsg); michael@144: + sqlite3_free (zErrMsg); michael@144: + sqlite3_close (db); michael@144: return NULL; michael@144: } michael@144: michael@144: - rc = sqlite_exec(db, "PRAGMA empty_result_callbacks = ON", NULL, NULL, &zErrMsg); michael@144: + rc = sqlite3_exec(db, "PRAGMA empty_result_callbacks = ON", NULL, NULL, &zErrMsg); michael@144: if (rc != SQLITE_OK) { michael@144: utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", zErrMsg); michael@144: - sqlite_freemem (zErrMsg); michael@144: - sqlite_close(db); michael@144: + sqlite3_free (zErrMsg); michael@144: + sqlite3_close(db); michael@144: return NULL; michael@144: } michael@144: michael@144: @@ -388,62 +414,67 @@ michael@144: return 0; michael@144: } michael@144: michael@144: -static int sqlite_my_callback(void *pArg, int argc __attribute__((unused)), michael@144: - char **argv, michael@144: - char **columnNames __attribute__((unused))) michael@144: -{ michael@144: - char **result = (char**)pArg; michael@144: - michael@144: - if (argv == NULL) { michael@144: - *result = NULL; /* no record */ michael@144: - } else if (argv[0] == NULL) { michael@144: - *result = strdup(SQL_NULL_VALUE); /* NULL IS SQL_NULL_VALUE */ michael@144: - } else { michael@144: - *result = strdup(argv[0]); michael@144: - } michael@144: - michael@144: - return /*ABORT*/1; michael@144: -} michael@144: - michael@144: static int _sqlite_exec(void *db, const char *cmd, char *value, size_t size, michael@144: size_t *value_len, const sasl_utils_t *utils) michael@144: { michael@144: int rc; michael@144: - char *result = NULL; michael@144: - char *zErrMsg = NULL; michael@144: + sqlite3_stmt *stmt; michael@144: + const char *todo; michael@144: + size_t len; michael@144: michael@144: - rc = sqlite_exec((sqlite*)db, cmd, sqlite_my_callback, (void*)&result, &zErrMsg); michael@144: - if (rc != SQLITE_OK && rc != SQLITE_ABORT) { michael@144: - utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %s ", zErrMsg); michael@144: - sqlite_freemem (zErrMsg); michael@144: + rc = sqlite3_prepare((sqlite3*)db, cmd, (int)strlen(cmd), &stmt, &todo); michael@144: + if (rc != SQLITE_OK) { michael@144: + utils->log(NULL, SASL_LOG_DEBUG, "sql plugin error: %s", sqlite3_errmsg((sqlite3*)db)); michael@144: return -1; michael@144: } michael@144: - michael@144: - if (rc == SQLITE_OK) { michael@144: + rc = sqlite3_step(stmt); michael@144: + if (rc != SQLITE_ROW && rc != SQLITE_DONE) { michael@144: + utils->log(NULL, SASL_LOG_DEBUG, "sql plugin error: %s", sqlite3_errmsg((sqlite3*)db)); michael@144: + sqlite3_finalize(stmt); michael@144: + return -1; michael@144: + } michael@144: + if (sqlite3_column_count(stmt) == 0) { michael@144: /* no results (BEGIN, COMMIT, DELETE, INSERT, UPDATE) */ michael@144: + sqlite3_finalize(stmt); michael@144: return 0; michael@144: } michael@144: - michael@144: - if (result == NULL) { michael@144: + if (rc == SQLITE_DONE) { michael@144: /* umm nothing found */ michael@144: + utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: no result found for query %s", cmd); michael@144: utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found"); michael@144: + sqlite3_finalize(stmt); michael@144: return -1; michael@144: } michael@144: - michael@144: - /* XXX: Duplication cannot be found by this method. */ michael@144: - michael@144: - /* now get the result set value and value_len */ michael@144: - /* we only fetch one because we don't care about the rest */ michael@144: - if (value) { michael@144: - strncpy(value, result, size - 2); michael@144: - value[size - 1] = '\0'; michael@144: - if (value_len) { michael@144: - *value_len = strlen(value); michael@144: - } michael@144: + rc = sqlite3_column_type(stmt, 0); michael@144: + switch (rc) { michael@144: + case SQLITE_NULL: { michael@144: + len = strlen(SQL_NULL_VALUE); michael@144: + if (len > size - 1) michael@144: + len = size - 1; michael@144: + memcpy(value, SQL_NULL_VALUE, len); michael@144: + value[len] = '\0'; michael@144: + if (value_len) michael@144: + *value_len = len; michael@144: + break; michael@144: + } michael@144: + default: { michael@144: + const void *blob = sqlite3_column_blob(stmt, 0); michael@144: + len = (size_t)sqlite3_column_bytes(stmt, 0); michael@144: + if (len > size - 1) michael@144: + len = size - 1; michael@144: + memcpy(value, blob, len); michael@144: + value[len] = '\0'; michael@144: + if (value_len) michael@144: + *value_len = len; michael@144: + break; michael@144: + } michael@144: } michael@144: - michael@144: - /* free result */ michael@144: - free(result); michael@144: + rc = sqlite3_step(stmt); michael@144: + if (rc != SQLITE_DONE) { michael@144: + utils->log(NULL, SASL_LOG_WARN, michael@144: + "sql plugin: found duplicate row for query %s", cmd); michael@144: + } michael@144: + sqlite3_finalize(stmt); michael@144: return 0; michael@144: } michael@144: michael@144: @@ -464,7 +495,7 @@ michael@144: michael@144: static void _sqlite_close(void *db) michael@144: { michael@144: - sqlite_close((sqlite*)db); michael@144: + sqlite3_close((sqlite3 *)db); michael@144: } michael@144: #endif /* HAVE_SQLITE */ michael@144: michael@727: @@ -918,7 +949,7 @@ michael@144: settings = (sql_settings_t *) glob_context; michael@144: michael@144: sparams->utils->log(NULL, SASL_LOG_DEBUG, michael@144: - "sql plugin Parse the username %s\n", user); michael@144: + "sql plugin parse the username %s\n", user); michael@144: michael@144: user_buf = sparams->utils->malloc(ulen + 1); michael@727: if (!user_buf) { michael@727: @@ -1022,7 +1053,7 @@ michael@144: } michael@144: michael@144: sparams->utils->log(NULL, SASL_LOG_DEBUG, michael@144: - "sql plugin create statement from %s %s %s\n", michael@144: + "sql plugin create statement from name=%s user=%s realm=%s\n", michael@144: realname, escap_userid, escap_realm); michael@144: michael@144: /* create a statement that we will use */ michael@727: @@ -1043,12 +1074,18 @@ michael@144: /* run the query */ michael@144: if (!settings->sql_engine->sql_exec(conn, query, value, sizeof(value), michael@144: &value_len, sparams->utils)) { michael@144: + sparams->utils->log(NULL, SASL_LOG_DEBUG, michael@144: + "sql plugin query successful\n"); michael@727: sparams->utils->prop_set(sparams->propctx, michael@727: cur->name, michael@727: value, michael@727: (int)value_len); michael@727: ret = SASL_OK; michael@144: } michael@144: + else { michael@144: + sparams->utils->log(NULL, SASL_LOG_DEBUG, michael@144: + "sql plugin query failed\n"); michael@144: + } michael@144: michael@144: sparams->utils->free(query); michael@144: } michael@144: Index: sample/client.c michael@144: --- sample/client.c.orig 2004-03-09 18:35:32 +0100 michael@144: +++ sample/client.c 2008-12-25 18:48:51 +0100 michael@727: @@ -137,13 +137,11 @@ michael@144: return SASL_OK; michael@144: } michael@144: michael@144: -#ifndef HAVE_GETPASSPHRASE michael@144: static char * michael@144: -getpassphrase(const char *prompt) michael@144: +my_getpassphrase(const char *prompt) michael@144: { michael@144: return getpass(prompt); michael@144: } michael@144: -#endif /* ! HAVE_GETPASSPHRASE */ michael@144: michael@144: static int michael@144: getsecret(sasl_conn_t *conn, michael@727: @@ -159,7 +157,7 @@ michael@144: if (! conn || ! psecret || id != SASL_CB_PASS) michael@144: return SASL_BADPARAM; michael@144: michael@144: - password = getpassphrase("Password: "); michael@144: + password = my_getpassphrase("Password: "); michael@144: if (! password) michael@144: return SASL_FAIL; michael@144: michael@144: Index: sample/sample-client.c michael@144: --- sample/sample-client.c.orig 2004-10-26 13:14:33 +0200 michael@144: +++ sample/sample-client.c 2008-12-25 18:48:51 +0100 michael@727: @@ -245,13 +245,11 @@ michael@144: return SASL_OK; michael@144: } michael@144: michael@144: -#ifndef HAVE_GETPASSPHRASE michael@144: static char * michael@144: -getpassphrase(const char *prompt) michael@144: +my_getpassphrase(const char *prompt) michael@144: { michael@144: return getpass(prompt); michael@144: } michael@144: -#endif /* ! HAVE_GETPASSPHRASE */ michael@144: michael@144: static int michael@144: getsecret(sasl_conn_t *conn, michael@727: @@ -265,7 +263,7 @@ michael@144: if (! conn || ! psecret || id != SASL_CB_PASS) michael@144: return SASL_BADPARAM; michael@144: michael@144: - password = getpassphrase("Password: "); michael@144: + password = my_getpassphrase("Password: "); michael@144: if (! password) michael@144: return SASL_FAIL; michael@144: michael@727: @@ -308,7 +306,7 @@ michael@144: fflush(stdout); michael@144: michael@144: if (id == SASL_CB_ECHOPROMPT) { michael@144: - char *original = getpassphrase(""); michael@144: + char *original = my_getpassphrase(""); michael@144: if (! original) michael@144: return SASL_FAIL; michael@144: if (*original) michael@144: Index: saslauthd/Makefile.am michael@144: --- saslauthd/Makefile.am.orig 2006-05-17 18:46:17 +0200 michael@144: +++ saslauthd/Makefile.am 2008-12-25 18:48:51 +0100 michael@144: @@ -36,4 +36,4 @@ michael@144: michael@144: install-data-local: saslauthd.8 michael@144: $(mkinstalldirs) $(DESTDIR)$(mandir)/man8 michael@144: - $(INSTALL_DATA) $(srcdir)/saslauthd.8 $(DESTDIR)$(mandir)/man8/saslauthd.8 michael@144: + $(INSTALL_DATA) $(srcdir)/saslauthd.mdoc $(DESTDIR)$(mandir)/man8/saslauthd.8 michael@144: Index: saslauthd/Makefile.in michael@144: --- saslauthd/Makefile.in.orig 2008-12-25 18:48:51 +0100 michael@144: +++ saslauthd/Makefile.in 2008-12-25 18:48:51 +0100 michael@727: @@ -722,7 +722,7 @@ michael@144: michael@144: install-data-local: saslauthd.8 michael@144: $(mkinstalldirs) $(DESTDIR)$(mandir)/man8 michael@144: - $(INSTALL_DATA) $(srcdir)/saslauthd.8 $(DESTDIR)$(mandir)/man8/saslauthd.8 michael@144: + $(INSTALL_DATA) $(srcdir)/saslauthd.mdoc $(DESTDIR)$(mandir)/man8/saslauthd.8 michael@727: michael@144: # Tell versions [3.59,3.63) of GNU make to not export all variables. michael@144: # Otherwise a system limit (for SysV at least) may be exceeded. michael@144: Index: saslauthd/lak.c michael@144: --- saslauthd/lak.c.orig 2005-05-15 07:49:51 +0200 michael@144: +++ saslauthd/lak.c 2008-12-25 18:48:51 +0100 michael@144: @@ -47,6 +47,7 @@ michael@144: #include michael@144: #endif michael@144: michael@144: +#include "saslauthd.h" /* get strlcpy macro for non-BSD; get HAVE_OPENSSL from config.h */ michael@144: #ifdef HAVE_OPENSSL michael@144: #ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT michael@144: #define OPENSSL_DISABLE_OLD_DES_SUPPORT michael@727: @@ -58,7 +59,7 @@ michael@727: #define LDAP_DEPRECATED 1 michael@144: #include michael@144: #include michael@144: -#include michael@144: +#include "sasl.h" michael@144: #include "lak.h" michael@144: michael@144: typedef struct lak_auth_method {