1 Index: configure |
|
2 --- configure.orig 2006-05-18 21:30:13 +0200 |
|
3 +++ configure 2008-12-25 18:48:51 +0100 |
|
4 @@ -3944,9 +3944,6 @@ |
|
5 |
|
6 fi |
|
7 |
|
8 -if test "$ac_cv_c_compiler_gnu" = yes; then |
|
9 - CFLAGS="-Wall -W ${CFLAGS}" |
|
10 -fi |
|
11 |
|
12 |
|
13 # Check whether --with-purecov or --without-purecov was given. |
|
14 @@ -5125,7 +5122,7 @@ |
|
15 fi |
|
16 |
|
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 |
|
19 + for dbname in db |
|
20 do |
|
21 LIBS="$saved_LIBS -l$dbname" |
|
22 cat >conftest.$ac_ext <<_ACEOF |
|
23 @@ -5205,6 +5202,54 @@ |
|
24 fi |
|
25 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
|
26 fi |
|
27 + if test "$dblib" = "no"; then |
|
28 + cat >conftest.$ac_ext <<_ACEOF |
|
29 +/* confdefs.h. */ |
|
30 +_ACEOF |
|
31 +cat confdefs.h >>conftest.$ac_ext |
|
32 +cat >>conftest.$ac_ext <<_ACEOF |
|
33 +/* end confdefs.h. */ |
|
34 +#include <db.h> |
|
35 +int |
|
36 +main () |
|
37 +{ |
|
38 +dbm_open(NULL, 0, 0, 0, NULL, NULL, NULL); |
|
39 + ; |
|
40 + return 0; |
|
41 +} |
|
42 +_ACEOF |
|
43 +rm -f conftest.$ac_objext conftest$ac_exeext |
|
44 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|
45 + (eval $ac_link) 2>conftest.er1 |
|
46 + ac_status=$? |
|
47 + grep -v '^ *+' conftest.er1 >conftest.err |
|
48 + rm -f conftest.er1 |
|
49 + cat conftest.err >&5 |
|
50 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
51 + (exit $ac_status); } && |
|
52 + { ac_try='test -z "$ac_c_werror_flag" |
|
53 + || test ! -s conftest.err' |
|
54 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
55 + (eval $ac_try) 2>&5 |
|
56 + ac_status=$? |
|
57 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
58 + (exit $ac_status); }; } && |
|
59 + { ac_try='test -s conftest$ac_exeext' |
|
60 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
61 + (eval $ac_try) 2>&5 |
|
62 + ac_status=$? |
|
63 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
64 + (exit $ac_status); }; }; then |
|
65 + BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db |
|
66 +else |
|
67 + echo "$as_me: failed program was:" >&5 |
|
68 +sed 's/^/| /' conftest.$ac_ext >&5 |
|
69 + |
|
70 +dblib="no" |
|
71 +fi |
|
72 +rm -f conftest.err conftest.$ac_objext \ |
|
73 + conftest$ac_exeext conftest.$ac_ext |
|
74 + fi |
|
75 LIBS=$saved_LIBS |
|
76 |
|
77 LDFLAGS=$BDB_SAVE_LDFLAGS |
|
78 @@ -5882,7 +5927,7 @@ |
|
79 fi |
|
80 |
|
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 |
|
83 + for dbname in db |
|
84 do |
|
85 LIBS="$saved_LIBS -l$dbname" |
|
86 cat >conftest.$ac_ext <<_ACEOF |
|
87 @@ -5962,6 +6007,54 @@ |
|
88 fi |
|
89 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext |
|
90 fi |
|
91 + if test "$dblib" = "no"; then |
|
92 + cat >conftest.$ac_ext <<_ACEOF |
|
93 +/* confdefs.h. */ |
|
94 +_ACEOF |
|
95 +cat confdefs.h >>conftest.$ac_ext |
|
96 +cat >>conftest.$ac_ext <<_ACEOF |
|
97 +/* end confdefs.h. */ |
|
98 +#include <db.h> |
|
99 +int |
|
100 +main () |
|
101 +{ |
|
102 +dbm_open(NULL, 0, 0, 0, NULL, NULL, NULL); |
|
103 + ; |
|
104 + return 0; |
|
105 +} |
|
106 +_ACEOF |
|
107 +rm -f conftest.$ac_objext conftest$ac_exeext |
|
108 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 |
|
109 + (eval $ac_link) 2>conftest.er1 |
|
110 + ac_status=$? |
|
111 + grep -v '^ *+' conftest.er1 >conftest.err |
|
112 + rm -f conftest.er1 |
|
113 + cat conftest.err >&5 |
|
114 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
115 + (exit $ac_status); } && |
|
116 + { ac_try='test -z "$ac_c_werror_flag" |
|
117 + || test ! -s conftest.err' |
|
118 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
119 + (eval $ac_try) 2>&5 |
|
120 + ac_status=$? |
|
121 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
122 + (exit $ac_status); }; } && |
|
123 + { ac_try='test -s conftest$ac_exeext' |
|
124 + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
|
125 + (eval $ac_try) 2>&5 |
|
126 + ac_status=$? |
|
127 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
|
128 + (exit $ac_status); }; }; then |
|
129 + BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db |
|
130 +else |
|
131 + echo "$as_me: failed program was:" >&5 |
|
132 +sed 's/^/| /' conftest.$ac_ext >&5 |
|
133 + |
|
134 +dblib="no" |
|
135 +fi |
|
136 +rm -f conftest.err conftest.$ac_objext \ |
|
137 + conftest$ac_exeext conftest.$ac_ext |
|
138 + fi |
|
139 LIBS=$saved_LIBS |
|
140 |
|
141 LDFLAGS=$BDB_SAVE_LDFLAGS |
|
142 @@ -12005,20 +12098,20 @@ |
|
143 fi |
|
144 |
|
145 LIB_SQLITE_DIR=$LIB_SQLITE |
|
146 - LIB_SQLITE="$LIB_SQLITE -lsqlite" |
|
147 + LIB_SQLITE="$LIB_SQLITE -lsqlite3" |
|
148 |
|
149 if test -d ${with_sqlite}/include; then |
|
150 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}/include" |
|
151 else |
|
152 CPPFLAGS="${CPPFLAGS} -I${with_sqlite}" |
|
153 fi |
|
154 - echo "$as_me:$LINENO: checking for sqlite_open in -lsqlite" >&5 |
|
155 -echo $ECHO_N "checking for sqlite_open in -lsqlite... $ECHO_C" >&6 |
|
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 |
|
158 if test "${ac_cv_lib_sqlite_sqlite_open+set}" = set; then |
|
159 echo $ECHO_N "(cached) $ECHO_C" >&6 |
|
160 else |
|
161 ac_check_lib_save_LIBS=$LIBS |
|
162 -LIBS="-lsqlite $LIB_SQLITE_DIR $LIBS" |
|
163 +LIBS="-lsqlite3 $LIB_SQLITE_DIR $LIBS" |
|
164 cat >conftest.$ac_ext <<_ACEOF |
|
165 #line $LINENO "configure" |
|
166 /* confdefs.h. */ |
|
167 @@ -12033,11 +12126,11 @@ |
|
168 #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 (); |
|
172 +char sqlite3_open (); |
|
173 int |
|
174 main () |
|
175 { |
|
176 -sqlite_open (); |
|
177 +sqlite3_open (); |
|
178 ; |
|
179 return 0; |
|
180 } |
|
181 Index: lib/saslint.h |
|
182 --- lib/saslint.h.orig 2006-04-18 22:25:45 +0200 |
|
183 +++ lib/saslint.h 2008-12-25 18:48:51 +0100 |
|
184 @@ -109,8 +109,6 @@ |
|
185 const char *appname; |
|
186 } sasl_global_callbacks_t; |
|
187 |
|
188 -extern sasl_global_callbacks_t global_callbacks; |
|
189 - |
|
190 typedef struct _sasl_external_properties |
|
191 { |
|
192 sasl_ssf_t ssf; |
|
193 Index: lib/server.c |
|
194 --- lib/server.c.orig 2006-05-17 18:46:13 +0200 |
|
195 +++ lib/server.c 2008-12-25 18:48:51 +0100 |
|
196 @@ -95,7 +95,7 @@ |
|
197 |
|
198 static mech_list_t *mechlist = NULL; /* global var which holds the list */ |
|
199 |
|
200 -sasl_global_callbacks_t global_callbacks; |
|
201 +static sasl_global_callbacks_t global_callbacks; |
|
202 |
|
203 /* set the password for a user |
|
204 * conn -- SASL connection |
|
205 @@ -477,16 +477,8 @@ |
|
206 return SASL_CONTINUE; |
|
207 } |
|
208 |
|
209 - /* get the path to the config file */ |
|
210 - getconfpath_cb = _sasl_find_getconfpath_callback( global_callbacks.callbacks ); |
|
211 - if (getconfpath_cb == NULL) return SASL_BADPARAM; |
|
212 - |
|
213 - /* getconfpath_cb->proc MUST be a sasl_getconfpath_t; if only C had a type |
|
214 - system */ |
|
215 - result = ((sasl_getconfpath_t *)(getconfpath_cb->proc))(getconfpath_cb->context, |
|
216 - &path_to_config); |
|
217 - if (result != SASL_OK) goto done; |
|
218 - if (path_to_config == NULL) path_to_config = ""; |
|
219 + result = SASL_OK; |
|
220 + path_to_config = "@l_sysconfdir@"; |
|
221 |
|
222 next = path_to_config; |
|
223 |
|
224 Index: plugins/sql.c |
|
225 --- plugins/sql.c.orig 2006-04-07 15:42:16 +0200 |
|
226 +++ plugins/sql.c 2008-12-25 21:57:47 +0100 |
|
227 @@ -150,9 +150,15 @@ |
|
228 return -1; |
|
229 } |
|
230 if (value) { |
|
231 - strncpy(value, row[0], size-2); |
|
232 - value[size-1] = '\0'; |
|
233 - if (value_len) *value_len = strlen(value); |
|
234 + unsigned long *col_lens; |
|
235 + size_t col_len; |
|
236 + col_lens = mysql_fetch_lengths(result); |
|
237 + col_len = (size_t)col_lens[0]; |
|
238 + if (col_len > size - 1); |
|
239 + col_len = size - 1; |
|
240 + memcpy(value, row[0], col_len); |
|
241 + value[col_len] = '\0'; |
|
242 + if (value_len) *value_len = col_len; |
|
243 } |
|
244 |
|
245 /* free result */ |
|
246 @@ -277,7 +283,7 @@ |
|
247 ExecStatusType status; |
|
248 |
|
249 /* run the query */ |
|
250 - result = PQexec(conn, cmd); |
|
251 + result = PQexecParams(conn, cmd, 0, NULL, NULL, NULL, NULL, 1); |
|
252 |
|
253 /* check the status */ |
|
254 status = PQresultStatus(result); |
|
255 @@ -298,6 +304,7 @@ |
|
256 row_count = PQntuples(result); |
|
257 if (!row_count) { |
|
258 /* umm nothing found */ |
|
259 + utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: no result found for query %s", cmd); |
|
260 utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found"); |
|
261 PQclear(result); |
|
262 return -1; |
|
263 @@ -310,9 +317,26 @@ |
|
264 /* now get the result set value and value_len */ |
|
265 /* we only fetch one because we don't care about the rest */ |
|
266 if (value) { |
|
267 - strncpy(value, PQgetvalue(result,0,0), size-2); |
|
268 - value[size-1] = '\0'; |
|
269 - if (value_len) *value_len = strlen(value); |
|
270 + if (PQgetisnull(result, 0, 0)) { |
|
271 + size_t col_len; |
|
272 + col_len = strlen(SQL_NULL_VALUE); |
|
273 + if (col_len > size - 1) |
|
274 + col_len = size - 1; |
|
275 + memcpy(value, SQL_NULL_VALUE, col_len); |
|
276 + value[col_len] = '\0'; |
|
277 + if (value_len) |
|
278 + *value_len = col_len; |
|
279 + } |
|
280 + else { |
|
281 + size_t col_len; |
|
282 + col_len = (size_t)PQgetlength(result, 0, 0); |
|
283 + if (col_len > size - 1); |
|
284 + col_len = size - 1; |
|
285 + memcpy(value, PQgetvalue(result, 0, 0), col_len); |
|
286 + value[col_len] = '\0'; |
|
287 + if (value_len) |
|
288 + *value_len = col_len; |
|
289 + } |
|
290 } |
|
291 |
|
292 /* free result */ |
|
293 @@ -342,7 +366,7 @@ |
|
294 #endif /* HAVE_PGSQL */ |
|
295 |
|
296 #ifdef HAVE_SQLITE |
|
297 -#include <sqlite.h> |
|
298 +#include <sqlite3.h> |
|
299 |
|
300 static void *_sqlite_open(char *host __attribute__((unused)), |
|
301 char *port __attribute__((unused)), |
|
302 @@ -352,21 +376,23 @@ |
|
303 const char *database, const sasl_utils_t *utils) |
|
304 { |
|
305 int rc; |
|
306 - sqlite *db; |
|
307 + sqlite3 *db; |
|
308 char *zErrMsg = NULL; |
|
309 |
|
310 - db = sqlite_open(database, 0, &zErrMsg); |
|
311 - if (db == NULL) { |
|
312 + rc = sqlite3_open(database, &db); |
|
313 + if (rc != SQLITE_OK) { |
|
314 + zErrMsg = (char *)sqlite3_errmsg(db); |
|
315 utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", zErrMsg); |
|
316 - sqlite_freemem (zErrMsg); |
|
317 + sqlite3_free (zErrMsg); |
|
318 + sqlite3_close (db); |
|
319 return NULL; |
|
320 } |
|
321 |
|
322 - rc = sqlite_exec(db, "PRAGMA empty_result_callbacks = ON", NULL, NULL, &zErrMsg); |
|
323 + rc = sqlite3_exec(db, "PRAGMA empty_result_callbacks = ON", NULL, NULL, &zErrMsg); |
|
324 if (rc != SQLITE_OK) { |
|
325 utils->log(NULL, SASL_LOG_ERR, "sql plugin: %s", zErrMsg); |
|
326 - sqlite_freemem (zErrMsg); |
|
327 - sqlite_close(db); |
|
328 + sqlite3_free (zErrMsg); |
|
329 + sqlite3_close(db); |
|
330 return NULL; |
|
331 } |
|
332 |
|
333 @@ -388,62 +414,67 @@ |
|
334 return 0; |
|
335 } |
|
336 |
|
337 -static int sqlite_my_callback(void *pArg, int argc __attribute__((unused)), |
|
338 - char **argv, |
|
339 - char **columnNames __attribute__((unused))) |
|
340 -{ |
|
341 - char **result = (char**)pArg; |
|
342 - |
|
343 - if (argv == NULL) { |
|
344 - *result = NULL; /* no record */ |
|
345 - } else if (argv[0] == NULL) { |
|
346 - *result = strdup(SQL_NULL_VALUE); /* NULL IS SQL_NULL_VALUE */ |
|
347 - } else { |
|
348 - *result = strdup(argv[0]); |
|
349 - } |
|
350 - |
|
351 - return /*ABORT*/1; |
|
352 -} |
|
353 - |
|
354 static int _sqlite_exec(void *db, const char *cmd, char *value, size_t size, |
|
355 size_t *value_len, const sasl_utils_t *utils) |
|
356 { |
|
357 int rc; |
|
358 - char *result = NULL; |
|
359 - char *zErrMsg = NULL; |
|
360 + sqlite3_stmt *stmt; |
|
361 + const char *todo; |
|
362 + size_t len; |
|
363 |
|
364 - rc = sqlite_exec((sqlite*)db, cmd, sqlite_my_callback, (void*)&result, &zErrMsg); |
|
365 - if (rc != SQLITE_OK && rc != SQLITE_ABORT) { |
|
366 - utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: %s ", zErrMsg); |
|
367 - sqlite_freemem (zErrMsg); |
|
368 + rc = sqlite3_prepare((sqlite3*)db, cmd, (int)strlen(cmd), &stmt, &todo); |
|
369 + if (rc != SQLITE_OK) { |
|
370 + utils->log(NULL, SASL_LOG_DEBUG, "sql plugin error: %s", sqlite3_errmsg((sqlite3*)db)); |
|
371 return -1; |
|
372 } |
|
373 - |
|
374 - if (rc == SQLITE_OK) { |
|
375 + rc = sqlite3_step(stmt); |
|
376 + if (rc != SQLITE_ROW && rc != SQLITE_DONE) { |
|
377 + utils->log(NULL, SASL_LOG_DEBUG, "sql plugin error: %s", sqlite3_errmsg((sqlite3*)db)); |
|
378 + sqlite3_finalize(stmt); |
|
379 + return -1; |
|
380 + } |
|
381 + if (sqlite3_column_count(stmt) == 0) { |
|
382 /* no results (BEGIN, COMMIT, DELETE, INSERT, UPDATE) */ |
|
383 + sqlite3_finalize(stmt); |
|
384 return 0; |
|
385 } |
|
386 - |
|
387 - if (result == NULL) { |
|
388 + if (rc == SQLITE_DONE) { |
|
389 /* umm nothing found */ |
|
390 + utils->log(NULL, SASL_LOG_DEBUG, "sql plugin: no result found for query %s", cmd); |
|
391 utils->log(NULL, SASL_LOG_NOTE, "sql plugin: no result found"); |
|
392 + sqlite3_finalize(stmt); |
|
393 return -1; |
|
394 } |
|
395 - |
|
396 - /* XXX: Duplication cannot be found by this method. */ |
|
397 - |
|
398 - /* now get the result set value and value_len */ |
|
399 - /* we only fetch one because we don't care about the rest */ |
|
400 - if (value) { |
|
401 - strncpy(value, result, size - 2); |
|
402 - value[size - 1] = '\0'; |
|
403 - if (value_len) { |
|
404 - *value_len = strlen(value); |
|
405 - } |
|
406 + rc = sqlite3_column_type(stmt, 0); |
|
407 + switch (rc) { |
|
408 + case SQLITE_NULL: { |
|
409 + len = strlen(SQL_NULL_VALUE); |
|
410 + if (len > size - 1) |
|
411 + len = size - 1; |
|
412 + memcpy(value, SQL_NULL_VALUE, len); |
|
413 + value[len] = '\0'; |
|
414 + if (value_len) |
|
415 + *value_len = len; |
|
416 + break; |
|
417 + } |
|
418 + default: { |
|
419 + const void *blob = sqlite3_column_blob(stmt, 0); |
|
420 + len = (size_t)sqlite3_column_bytes(stmt, 0); |
|
421 + if (len > size - 1) |
|
422 + len = size - 1; |
|
423 + memcpy(value, blob, len); |
|
424 + value[len] = '\0'; |
|
425 + if (value_len) |
|
426 + *value_len = len; |
|
427 + break; |
|
428 + } |
|
429 } |
|
430 - |
|
431 - /* free result */ |
|
432 - free(result); |
|
433 + rc = sqlite3_step(stmt); |
|
434 + if (rc != SQLITE_DONE) { |
|
435 + utils->log(NULL, SASL_LOG_WARN, |
|
436 + "sql plugin: found duplicate row for query %s", cmd); |
|
437 + } |
|
438 + sqlite3_finalize(stmt); |
|
439 return 0; |
|
440 } |
|
441 |
|
442 @@ -464,7 +495,7 @@ |
|
443 |
|
444 static void _sqlite_close(void *db) |
|
445 { |
|
446 - sqlite_close((sqlite*)db); |
|
447 + sqlite3_close((sqlite3 *)db); |
|
448 } |
|
449 #endif /* HAVE_SQLITE */ |
|
450 |
|
451 @@ -771,7 +802,7 @@ |
|
452 settings = (sql_settings_t *) glob_context; |
|
453 |
|
454 sparams->utils->log(NULL, SASL_LOG_DEBUG, |
|
455 - "sql plugin Parse the username %s\n", user); |
|
456 + "sql plugin parse the username %s\n", user); |
|
457 |
|
458 user_buf = sparams->utils->malloc(ulen + 1); |
|
459 if (!user_buf) goto done; |
|
460 @@ -849,7 +880,7 @@ |
|
461 } |
|
462 |
|
463 sparams->utils->log(NULL, SASL_LOG_DEBUG, |
|
464 - "sql plugin create statement from %s %s %s\n", |
|
465 + "sql plugin create statement from name=%s user=%s realm=%s\n", |
|
466 realname, escap_userid, escap_realm); |
|
467 |
|
468 /* create a statement that we will use */ |
|
469 @@ -864,9 +895,15 @@ |
|
470 /* run the query */ |
|
471 if (!settings->sql_engine->sql_exec(conn, query, value, sizeof(value), |
|
472 &value_len, sparams->utils)) { |
|
473 + sparams->utils->log(NULL, SASL_LOG_DEBUG, |
|
474 + "sql plugin query successful\n"); |
|
475 sparams->utils->prop_set(sparams->propctx, cur->name, |
|
476 value, value_len); |
|
477 } |
|
478 + else { |
|
479 + sparams->utils->log(NULL, SASL_LOG_DEBUG, |
|
480 + "sql plugin query failed\n"); |
|
481 + } |
|
482 |
|
483 sparams->utils->free(query); |
|
484 } |
|
485 Index: sample/client.c |
|
486 --- sample/client.c.orig 2004-03-09 18:35:32 +0100 |
|
487 +++ sample/client.c 2008-12-25 18:48:51 +0100 |
|
488 @@ -133,13 +133,11 @@ |
|
489 return SASL_OK; |
|
490 } |
|
491 |
|
492 -#ifndef HAVE_GETPASSPHRASE |
|
493 static char * |
|
494 -getpassphrase(const char *prompt) |
|
495 +my_getpassphrase(const char *prompt) |
|
496 { |
|
497 return getpass(prompt); |
|
498 } |
|
499 -#endif /* ! HAVE_GETPASSPHRASE */ |
|
500 |
|
501 static int |
|
502 getsecret(sasl_conn_t *conn, |
|
503 @@ -155,7 +153,7 @@ |
|
504 if (! conn || ! psecret || id != SASL_CB_PASS) |
|
505 return SASL_BADPARAM; |
|
506 |
|
507 - password = getpassphrase("Password: "); |
|
508 + password = my_getpassphrase("Password: "); |
|
509 if (! password) |
|
510 return SASL_FAIL; |
|
511 |
|
512 Index: sample/sample-client.c |
|
513 --- sample/sample-client.c.orig 2004-10-26 13:14:33 +0200 |
|
514 +++ sample/sample-client.c 2008-12-25 18:48:51 +0100 |
|
515 @@ -244,13 +244,11 @@ |
|
516 return SASL_OK; |
|
517 } |
|
518 |
|
519 -#ifndef HAVE_GETPASSPHRASE |
|
520 static char * |
|
521 -getpassphrase(const char *prompt) |
|
522 +my_getpassphrase(const char *prompt) |
|
523 { |
|
524 return getpass(prompt); |
|
525 } |
|
526 -#endif /* ! HAVE_GETPASSPHRASE */ |
|
527 |
|
528 static int |
|
529 getsecret(sasl_conn_t *conn, |
|
530 @@ -264,7 +262,7 @@ |
|
531 if (! conn || ! psecret || id != SASL_CB_PASS) |
|
532 return SASL_BADPARAM; |
|
533 |
|
534 - password = getpassphrase("Password: "); |
|
535 + password = my_getpassphrase("Password: "); |
|
536 if (! password) |
|
537 return SASL_FAIL; |
|
538 |
|
539 @@ -307,7 +305,7 @@ |
|
540 fflush(stdout); |
|
541 |
|
542 if (id == SASL_CB_ECHOPROMPT) { |
|
543 - char *original = getpassphrase(""); |
|
544 + char *original = my_getpassphrase(""); |
|
545 if (! original) |
|
546 return SASL_FAIL; |
|
547 if (*original) |
|
548 Index: saslauthd/Makefile.am |
|
549 --- saslauthd/Makefile.am.orig 2006-05-17 18:46:17 +0200 |
|
550 +++ saslauthd/Makefile.am 2008-12-25 18:48:51 +0100 |
|
551 @@ -36,4 +36,4 @@ |
|
552 |
|
553 install-data-local: saslauthd.8 |
|
554 $(mkinstalldirs) $(DESTDIR)$(mandir)/man8 |
|
555 - $(INSTALL_DATA) $(srcdir)/saslauthd.8 $(DESTDIR)$(mandir)/man8/saslauthd.8 |
|
556 + $(INSTALL_DATA) $(srcdir)/saslauthd.mdoc $(DESTDIR)$(mandir)/man8/saslauthd.8 |
|
557 Index: saslauthd/Makefile.in |
|
558 --- saslauthd/Makefile.in.orig 2008-12-25 18:48:51 +0100 |
|
559 +++ saslauthd/Makefile.in 2008-12-25 18:48:51 +0100 |
|
560 @@ -621,7 +621,7 @@ |
|
561 |
|
562 install-data-local: saslauthd.8 |
|
563 $(mkinstalldirs) $(DESTDIR)$(mandir)/man8 |
|
564 - $(INSTALL_DATA) $(srcdir)/saslauthd.8 $(DESTDIR)$(mandir)/man8/saslauthd.8 |
|
565 + $(INSTALL_DATA) $(srcdir)/saslauthd.mdoc $(DESTDIR)$(mandir)/man8/saslauthd.8 |
|
566 # 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. |
|
568 .NOEXPORT: |
|
569 Index: saslauthd/lak.c |
|
570 --- saslauthd/lak.c.orig 2005-05-15 07:49:51 +0200 |
|
571 +++ saslauthd/lak.c 2008-12-25 18:48:51 +0100 |
|
572 @@ -47,6 +47,7 @@ |
|
573 #include <crypt.h> |
|
574 #endif |
|
575 |
|
576 +#include "saslauthd.h" /* get strlcpy macro for non-BSD; get HAVE_OPENSSL from config.h */ |
|
577 #ifdef HAVE_OPENSSL |
|
578 #ifndef OPENSSL_DISABLE_OLD_DES_SUPPORT |
|
579 #define OPENSSL_DISABLE_OLD_DES_SUPPORT |
|
580 @@ -57,7 +58,7 @@ |
|
581 |
|
582 #include <ldap.h> |
|
583 #include <lber.h> |
|
584 -#include <sasl.h> |
|
585 +#include "sasl.h" |
|
586 #include "lak.h" |
|
587 |
|
588 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" |
|