From 5788226460c10f76c2a29eed2a08b26390c67c26 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 1 May 2018 18:53:30 +0100 Subject: [PATCH] Centralise definition of GSSAPI check interval. It was defined separately as 2 minutes in ssh.c and settings.c. Now both of those refer to a single definition in sshgss.h. --- settings.c | 2 +- ssh.c | 1 - sshgss.h | 2 ++ 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/settings.c b/settings.c index 901ca015..01700865 100644 --- a/settings.c +++ b/settings.c @@ -960,7 +960,7 @@ void load_open_settings(void *sesskey, Conf *conf) gprefs(sesskey, "HostKey", "ed25519,ecdsa,rsa,dsa,WARN", hknames, HK_MAX, conf, CONF_ssh_hklist); gppi(sesskey, "RekeyTime", 60, conf, CONF_ssh_rekey_time); - gppi(sesskey, "GssapiRekey", 2, conf, CONF_gssapirekey); + gppi(sesskey, "GssapiRekey", GSS_DEF_REKEY_MINS, conf, CONF_gssapirekey); gpps(sesskey, "RekeyBytes", "1G", conf, CONF_ssh_rekey_data); { /* SSH-2 only by default */ diff --git a/ssh.c b/ssh.c index 4458c7a1..3f325bec 100644 --- a/ssh.c +++ b/ssh.c @@ -17,7 +17,6 @@ #ifndef NO_GSSAPI #include "sshgssc.h" #include "sshgss.h" -#define GSS_DEF_REKEY_MINS 2 /* Default minutes between GSS cache checks */ #define MIN_CTXT_LIFETIME 5 /* Avoid rekey with short lifetime (seconds) */ #define GSS_KEX_CAPABLE (1<<0) /* Can do GSS KEX */ #define GSS_CRED_UPDATED (1<<1) /* Cred updated since previous delegation */ diff --git a/sshgss.h b/sshgss.h index 11354948..7b2ed323 100644 --- a/sshgss.h +++ b/sshgss.h @@ -30,6 +30,8 @@ typedef gss_name_t Ssh_gss_name; #define GSS_NO_EXPIRATION ((time_t)-1) +#define GSS_DEF_REKEY_MINS 2 /* Default minutes between GSS cache checks */ + /* Functions, provided by either wingss.c or sshgssc.c */ struct ssh_gss_library;