upstream: when compiled with GSSAPI support, cache supported method

OIDs by calling ssh_gssapi_prepare_supported_oids() regardless of whether
GSSAPI authentication is enabled in the main config.

This avoids sandbox violations for configurations that enable GSSAPI
auth later, e.g.

Match user djm
	GSSAPIAuthentication yes

bz#2107; ok dtucker@

OpenBSD-Commit-ID: a5dd42d87c74e27cfb712b15b0f97ab20e0afd1d
This commit is contained in:
djm@openbsd.org 2018-09-21 12:23:17 +00:00 committed by Damien Miller
parent bbc8af72ba
commit cb24d9fcc9
1 changed files with 2 additions and 3 deletions

3
sshd.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: sshd.c,v 1.514 2018/08/13 02:41:05 djm Exp $ */ /* $OpenBSD: sshd.c,v 1.516 2018/09/21 12:23:17 djm Exp $ */
/* /*
* Author: Tatu Ylonen <ylo@cs.hut.fi> * Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@ -536,7 +536,6 @@ privsep_preauth_child(void)
#ifdef GSSAPI #ifdef GSSAPI
/* Cache supported mechanism OIDs for later use */ /* Cache supported mechanism OIDs for later use */
if (options.gss_authentication)
ssh_gssapi_prepare_supported_oids(); ssh_gssapi_prepare_supported_oids();
#endif #endif