From: John Kohl Date: Wed, 27 Feb 1991 12:00:29 +0000 (+0000) Subject: fix up to use global visible to krb_rd_req() X-Git-Tag: krb5-1.0-alpha4~168 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=32e00f165b6579259357c14718730be9f868145a;p=krb5.git fix up to use global visible to krb_rd_req() git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1804 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb425/set_key.c b/src/lib/krb425/set_key.c index 4e8964cc4..a6345ac25 100644 --- a/src/lib/krb425/set_key.c +++ b/src/lib/krb425/set_key.c @@ -23,20 +23,18 @@ krb_set_key(key, cvt) char *key; int cvt; { - static krb5_keyblock keyblock; - if (cvt) { - if (keyblock.contents) - xfree(keyblock.contents); - mit_des_string_to_key(KEYTYPE_DES, &keyblock, 0, 0); + if (_krb425_servkey.contents) + xfree(_krb425_servkey.contents); + mit_des_string_to_key(KEYTYPE_DES, &_krb425_servkey, 0, 0); } else { - if (!keyblock.contents && - !(keyblock.contents = (krb5_octet *)malloc(8))) { + if (!_krb425_servkey.contents && + !(_krb425_servkey.contents = (krb5_octet *)malloc(8))) { return(KFAILURE); } - keyblock.length = 8; - keyblock.keytype = KEYTYPE_DES; - memcpy((char *)keyblock.contents, (char *)key, 8); + _krb425_servkey.length = 8; + _krb425_servkey.keytype = KEYTYPE_DES; + memcpy((char *)_krb425_servkey.contents, (char *)key, 8); } return(KSUCCESS); }