From: Todd C. Miller Date: Fri, 4 Oct 1996 03:27:29 +0000 (+0000) Subject: moved fclose() in skey stuff. X-Git-Tag: SUDO_1_5_2~22 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1cb52172946c7ede943be1b948265011283042a6;p=sudo moved fclose() in skey stuff. --- 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) {