From 1cb52172946c7ede943be1b948265011283042a6 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 4 Oct 1996 03:27:29 +0000 Subject: [PATCH] moved fclose() in skey stuff. --- check.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/check.c b/check.c index 260b67096..12f88f7bd 100644 --- a/check.c +++ b/check.c @@ -665,6 +665,10 @@ static char *sudo_skeyprompt(user_skey, p) static char *orig_prompt, *new_prompt = NULL; static int op_len, np_size; + /* close old stream */ + if (user_skey->keyfile) + (void) fclose(user_skey->keyfile); + /* get the skey part of the prompt */ if ((rval = skeychallenge(user_skey, user_name, challenge)) != 0) { #ifdef SKEY_ONLY @@ -677,7 +681,6 @@ static char *sudo_skeyprompt(user_skey, p) return(orig_prompt); #endif /* SKEY_ONLY */ } - (void) fclose(user_skey->keyfile); /* get space for new prompt with embedded s/key challenge */ if (new_prompt == NULL) { -- 2.40.0