summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--auth2-passwd.c20
2 files changed, 19 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index ad79ceb36..4c2e2f25c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,10 @@
13 - millert@cvs.openbsd.org 2003/12/29 16:39:50 13 - millert@cvs.openbsd.org 2003/12/29 16:39:50
14 [sshd_config] 14 [sshd_config]
15 KeepAlive has been obsoleted, use TCPKeepAlive instead; markus@ OK 15 KeepAlive has been obsoleted, use TCPKeepAlive instead; markus@ OK
16 - dtucker@cvs.openbsd.org 2003/12/31 00:24:50
17 [auth2-passwd.c]
18 Ignore password change request during password auth (which we currently
19 don't support) and discard proposed new password. corrections/ok markus@
16 20
1720031219 2120031219
18 - (dtucker) [defines.h] Bug #458: Define SIZE_T_MAX as UINT_MAX if we 22 - (dtucker) [defines.h] Bug #458: Define SIZE_T_MAX as UINT_MAX if we
@@ -1632,4 +1636,4 @@
1632 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 1636 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
1633 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 1637 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
1634 1638
1635$Id: ChangeLog,v 1.3156 2003/12/31 00:38:32 dtucker Exp $ 1639$Id: ChangeLog,v 1.3157 2003/12/31 00:43:24 dtucker Exp $
diff --git a/auth2-passwd.c b/auth2-passwd.c
index 67fb4c921..a4f482d2e 100644
--- a/auth2-passwd.c
+++ b/auth2-passwd.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: auth2-passwd.c,v 1.4 2003/08/26 09:58:43 markus Exp $"); 26RCSID("$OpenBSD: auth2-passwd.c,v 1.5 2003/12/31 00:24:50 dtucker Exp $");
27 27
28#include "xmalloc.h" 28#include "xmalloc.h"
29#include "packet.h" 29#include "packet.h"
@@ -38,16 +38,24 @@ extern ServerOptions options;
38static int 38static int
39userauth_passwd(Authctxt *authctxt) 39userauth_passwd(Authctxt *authctxt)
40{ 40{
41 char *password; 41 char *password, *newpass;
42 int authenticated = 0; 42 int authenticated = 0;
43 int change; 43 int change;
44 u_int len; 44 u_int len, newlen;
45
45 change = packet_get_char(); 46 change = packet_get_char();
46 if (change)
47 logit("password change not supported");
48 password = packet_get_string(&len); 47 password = packet_get_string(&len);
48 if (change) {
49 /* discard new password from packet */
50 newpass = packet_get_string(&newlen);
51 memset(newpass, 0, newlen);
52 xfree(newpass);
53 }
49 packet_check_eom(); 54 packet_check_eom();
50 if (PRIVSEP(auth_password(authctxt, password)) == 1 55
56 if (change)
57 logit("password change not supported");
58 else if (PRIVSEP(auth_password(authctxt, password)) == 1
51#ifdef HAVE_CYGWIN 59#ifdef HAVE_CYGWIN
52 && check_nt_auth(1, authctxt->pw) 60 && check_nt_auth(1, authctxt->pw)
53#endif 61#endif