From e6fee2636d15a46c9d50f8e25d7224c0fbd50ca4 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 2 Dec 2008 18:18:32 +0000 Subject: [PATCH] At some point recently, Unix PuTTY started suffering build errors using -DNO_GSSAPI. Move some ifdefs around so it stops. [originally from svn r8370] --- ssh.c | 8 ++++++++ unix/uxgss.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ssh.c b/ssh.c index 3eff2cfd..2deaa7ba 100644 --- a/ssh.c +++ b/ssh.c @@ -12,7 +12,9 @@ #include "putty.h" #include "tree234.h" #include "ssh.h" +#ifndef NO_GSSAPI #include "sshgss.h" +#endif #ifndef FALSE #define FALSE 0 @@ -7154,8 +7156,10 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen, int done_service_req; int gotit, need_pw, can_pubkey, can_passwd, can_keyb_inter; int tried_pubkey_config, done_agent; +#ifndef NO_GSSAPI int can_gssapi; int tried_gssapi; +#endif int kbd_inter_refused; int we_are_in; prompts_t *cur_prompt; @@ -7179,11 +7183,13 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen, int try_send; int num_env, env_left, env_ok; struct Packet *pktout; +#ifndef NO_GSSAPI Ssh_gss_ctx gss_ctx; Ssh_gss_buf gss_buf; Ssh_gss_buf gss_rcvtok, gss_sndtok; Ssh_gss_name gss_srv_name; Ssh_gss_stat gss_stat; +#endif }; crState(do_ssh2_authconn_state); @@ -7191,7 +7197,9 @@ static void do_ssh2_authconn(Ssh ssh, unsigned char *in, int inlen, s->done_service_req = FALSE; s->we_are_in = FALSE; +#ifndef NO_GSSAPI s->tried_gssapi = FALSE; +#endif if (!ssh->cfg.ssh_no_userauth) { /* diff --git a/unix/uxgss.c b/unix/uxgss.c index f0992863..f6ebf476 100644 --- a/unix/uxgss.c +++ b/unix/uxgss.c @@ -1,11 +1,11 @@ +#ifndef NO_GSSAPI + #include #include #include "putty.h" #include "sshgss.h" #include "misc.h" -#ifndef NO_GSSAPI - static gss_OID_desc putty_gss_mech_krb5_desc = { 9, (void *)"\x2a\x86\x48\x86\xf7\x12\x01\x02\x02" }; static gss_OID const putty_gss_mech_krb5 = &putty_gss_mech_krb5_desc;