]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2001/06/07 19:57:53
authormouring <mouring>
Sat, 9 Jun 2001 01:40:00 +0000 (01:40 +0000)
committermouring <mouring>
Sat, 9 Jun 2001 01:40:00 +0000 (01:40 +0000)
     [auth2.c]
     style is used for bsdauth.
     disconnect on user/service change (ietf-drafts)

ChangeLog
auth2.c

index 065c7758e14aceb1887214a189ecf30782965ca8..e75f9fb3a9f2ffc3d8c19868ecd6052312d6f667 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
    - markus@cvs.openbsd.org 2001/06/06 23:19:35
      [ssh-add.c]
      remove debug message; Darren.Moffat@eng.sun.com
+   - markus@cvs.openbsd.org 2001/06/07 19:57:53
+     [auth2.c]
+     style is used for bsdauth.
+     disconnect on user/service change (ietf-drafts)
 
 20010606
  - OpenBSD CVS Sync
diff --git a/auth2.c b/auth2.c
index 0b4df9cdaf50be651388c6b1c5329cd8fe60871c..554ca4c10deab5af4a7eddf0fa2c787397813d82 100644 (file)
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.61 2001/05/31 10:30:12 markus Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.62 2001/06/07 19:57:53 markus Exp $");
 
 #include <openssl/evp.h>
 
@@ -219,14 +219,12 @@ input_userauth_request(int type, int plen, void *ctxt)
                setproctitle("%s", pw ? user : "unknown");
                authctxt->user = xstrdup(user);
                authctxt->service = xstrdup(service);
-               authctxt->style = style ? xstrdup(style) : NULL; /* currently unused */
-       } else if (authctxt->valid) {
-               if (strcmp(user, authctxt->user) != 0 ||
-                   strcmp(service, authctxt->service) != 0) {
-                       log("input_userauth_request: mismatch: (%s,%s)!=(%s,%s)",
-                           user, service, authctxt->user, authctxt->service);
-                       authctxt->valid = 0;
-               }
+               authctxt->style = style ? xstrdup(style) : NULL;
+       } else if (strcmp(user, authctxt->user) != 0 ||
+           strcmp(service, authctxt->service) != 0) {
+               packet_disconnect("Change of username or service not allowed: "
+                   "(%s,%s) -> (%s,%s)",
+                   authctxt->user, authctxt->service, user, service);
        }
        /* reset state */
        dispatch_set(SSH2_MSG_USERAUTH_INFO_RESPONSE, &protocol_error);
This page took 0.063099 seconds and 5 git commands to generate.