X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils%2Fgssd%2Fcontext_lucid.c;h=4a682ae351273021f37197e6255a74fd10352587;hb=70c59e231e7257ac93b68ba4b844f8d10a6af4a8;hp=94403af20265e68ef8cca261502dfce5ec7118a2;hpb=a4f1386224310b6797f083826fc4b6751e91f9b6;p=nfs-utils.git diff --git a/utils/gssd/context_lucid.c b/utils/gssd/context_lucid.c index 94403af..4a682ae 100644 --- a/utils/gssd/context_lucid.c +++ b/utils/gssd/context_lucid.c @@ -28,7 +28,9 @@ * SUCH DAMAGES. */ -#include "config.h" +#ifdef HAVE_CONFIG_H +#include +#endif /* HAVE_CONFIG_H */ #ifdef HAVE_LUCID_CONTEXT_SUPPORT @@ -40,17 +42,17 @@ #include #include #include + +#include + #include "gss_util.h" #include "gss_oids.h" #include "err_util.h" #include "context.h" -#include -#include #ifndef OM_uint64 typedef uint64_t OM_uint64; #endif -#include static int write_lucid_keyblock(char **p, char *end, gss_krb5_lucid_key_t *key) @@ -68,9 +70,10 @@ static int prepare_krb5_rfc1964_buffer(gss_krb5_lucid_context_v1_t *lctx, gss_buffer_desc *buf, int32_t *endtime) { +#define FAKESEED_SIZE 16 char *p, *end; static int constant_zero = 0; - unsigned char fakeseed[16]; + unsigned char fakeseed[FAKESEED_SIZE]; uint32_t word_send_seq; gss_krb5_lucid_key_t enc_key; int i; @@ -86,6 +89,7 @@ prepare_krb5_rfc1964_buffer(gss_krb5_lucid_context_v1_t *lctx, */ memset(&enc_key, 0, sizeof(enc_key)); memset(&fakeoid, 0, sizeof(fakeoid)); + memset(fakeseed, 0, FAKESEED_SIZE); if (!(buf->value = calloc(1, MAX_CTX_LEN))) goto out_err; @@ -96,7 +100,7 @@ prepare_krb5_rfc1964_buffer(gss_krb5_lucid_context_v1_t *lctx, /* seed_init and seed not used by kernel anyway */ if (WRITE_BYTES(&p, end, constant_zero)) goto out_err; - if (write_bytes(&p, end, &fakeseed, 16)) goto out_err; + if (write_bytes(&p, end, &fakeseed, FAKESEED_SIZE)) goto out_err; if (WRITE_BYTES(&p, end, lctx->rfc1964_kd.sign_alg)) goto out_err; if (WRITE_BYTES(&p, end, lctx->rfc1964_kd.seal_alg)) goto out_err;