=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/auth2-gss.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- src/usr.bin/ssh/auth2-gss.c 2018/07/10 09:13:30 1.28 +++ src/usr.bin/ssh/auth2-gss.c 2018/07/31 03:10:27 1.29 @@ -1,4 +1,4 @@ -/* $OpenBSD: auth2-gss.c,v 1.28 2018/07/10 09:13:30 djm Exp $ */ +/* $OpenBSD: auth2-gss.c,v 1.29 2018/07/31 03:10:27 djm Exp $ */ /* * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. @@ -65,9 +65,6 @@ size_t len; u_char *doid = NULL; - if (!authctxt->valid || authctxt->user == NULL) - return (0); - if ((r = sshpkt_get_u32(ssh, &mechs)) != 0) fatal("%s: %s", __func__, ssh_err(r)); @@ -98,6 +95,12 @@ if (!present) { free(doid); authctxt->server_caused_failure = 1; + return (0); + } + + if (!authctxt->valid || authctxt->user == NULL) { + debug2("%s: disabled because of invalid user", __func__); + free(doid); return (0); }