summaryrefslogtreecommitdiffstats
path: root/sbin/gbde
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-10-30 22:14:34 +0000
committerphk <phk@FreeBSD.org>2002-10-30 22:14:34 +0000
commit11b00e1ce04112fa160ceff50d6d273624744ee5 (patch)
tree7c844135cd1d0a2b21217af98d0311ffabe4ed7b /sbin/gbde
parentc82a18684b801b3530c2aa66663d3c3890cb39e1 (diff)
downloadFreeBSD-src-11b00e1ce04112fa160ceff50d6d273624744ee5.zip
FreeBSD-src-11b00e1ce04112fa160ceff50d6d273624744ee5.tar.gz
Initialize the new salt field in the lock sector.
Sponsored by: DARPA & NAI Labs
Diffstat (limited to 'sbin/gbde')
-rw-r--r--sbin/gbde/gbde.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/gbde/gbde.c b/sbin/gbde/gbde.c
index 1b8a12a..4c427a6 100644
--- a/sbin/gbde/gbde.c
+++ b/sbin/gbde/gbde.c
@@ -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;
}
OpenPOWER on IntegriCloud