Initialize the new salt field in the lock sector.

Sponsored by:	DARPA & NAI Labs
This commit is contained in:
Poul-Henning Kamp 2002-10-30 22:14:34 +00:00
parent 6c4a970782
commit ab4be8c231

View File

@ -398,7 +398,7 @@ cmd_destroy(struct g_bde_key *gl, int nkey)
bzero(&gl->sectorN, sizeof gl->sectorN);
bzero(&gl->keyoffset, sizeof gl->keyoffset);
bzero(&gl->flags, sizeof gl->flags);
bzero(gl->key, sizeof gl->key);
bzero(gl->mkey, sizeof gl->mkey);
for (i = 0; i < G_BDE_MAXKEYS; i++)
if (i != nkey)
gl->lsector[i] = ~0;
@ -594,7 +594,8 @@ cmd_init(struct g_bde_key *gl, int dfd, const char *f_opt, int i_opt, const char
}
}
random_bits(gl->key, sizeof gl->key);
random_bits(gl->mkey, sizeof gl->mkey);
random_bits(gl->salt, sizeof gl->salt);
return;
}