diff options
author | Darren Tucker <dtucker@zip.com.au> | 2004-06-30 20:34:31 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2004-06-30 20:34:31 +1000 |
commit | 59e06026d721661c477ff5eccc36918665a9ef01 (patch) | |
tree | 889a51548493ac97ff42e2313353b69f7f3257f7 | |
parent | 5288cb242aeea747dba400997c376035578a8445 (diff) |
- (dtucker) [auth-pam.c] Check for buggy PAM modules that return a NULL
appdata_ptr to the conversation function. ok djm@
By rights we should free the messages too, but if this happens then one
of the modules has already proven itself to be buggy so can we trust
the messages?
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | auth-pam.c | 6 |
2 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,7 @@ +20040630 + - (dtucker) [auth-pam.c] Check for buggy PAM modules that return a NULL + appdata_ptr to the conversation function. ok djm@ + 20040627 - (tim) update README files. - (dtucker) [mdoc2man.awk] Bug #883: correctly recognise .Pa and .Ev macros. @@ -1443,4 +1447,4 @@ - (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu -$Id: ChangeLog,v 1.3457 2004/06/28 08:11:19 dtucker Exp $ +$Id: ChangeLog,v 1.3458 2004/06/30 10:34:31 dtucker Exp $ @@ -47,7 +47,7 @@ /* Based on $FreeBSD: src/crypto/openssh/auth2-pam-freebsd.c,v 1.11 2003/03/31 13:48:18 des Exp $ */ #include "includes.h" -RCSID("$Id: auth-pam.c,v 1.107 2004/06/19 02:54:38 dtucker Exp $"); +RCSID("$Id: auth-pam.c,v 1.108 2004/06/30 10:34:32 dtucker Exp $"); #ifdef USE_PAM #if defined(HAVE_SECURITY_PAM_APPL_H) @@ -275,6 +275,10 @@ sshpam_thread_conv(int n, const struct pam_message **msg, debug3("PAM: %s entering, %d messages", __func__, n); *resp = NULL; + if (data == NULL) { + error("PAM: conversation function passed a null context"); + return (PAM_CONV_ERR); + } ctxt = data; if (n <= 0 || n > PAM_MAX_NUM_MSG) return (PAM_CONV_ERR); |