summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2010-09-23 11:19:48 +0000
committerpjd <pjd@FreeBSD.org>2010-09-23 11:19:48 +0000
commit72f42997786a1469dba5815edb3b45f26a59a850 (patch)
treec15c432923b31d6e233d01b8bfdcfb118b75bc6e /sys/geom
parent35e304566dade8727c350263dfdd3ef951649f97 (diff)
downloadFreeBSD-src-72f42997786a1469dba5815edb3b45f26a59a850.zip
FreeBSD-src-72f42997786a1469dba5815edb3b45f26a59a850.tar.gz
Define default overwrite count, so that userland can use it.
MFC after: 1 week
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/eli/g_eli.c2
-rw-r--r--sys/geom/eli/g_eli.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/sys/geom/eli/g_eli.c b/sys/geom/eli/g_eli.c
index eb10b17..4bcce3d 100644
--- a/sys/geom/eli/g_eli.c
+++ b/sys/geom/eli/g_eli.c
@@ -69,7 +69,7 @@ TUNABLE_INT("kern.geom.eli.visible_passphrase", &g_eli_visible_passphrase);
SYSCTL_UINT(_kern_geom_eli, OID_AUTO, visible_passphrase, CTLFLAG_RW,
&g_eli_visible_passphrase, 0,
"Turn on echo when entering the passphrase (for debug purposes only!!)");
-u_int g_eli_overwrites = 5;
+u_int g_eli_overwrites = G_ELI_OVERWRITES;
TUNABLE_INT("kern.geom.eli.overwrites", &g_eli_overwrites);
SYSCTL_UINT(_kern_geom_eli, OID_AUTO, overwrites, CTLFLAG_RW, &g_eli_overwrites,
0, "Number of times on-disk keys should be overwritten when destroying them");
diff --git a/sys/geom/eli/g_eli.h b/sys/geom/eli/g_eli.h
index 35c21bb..7c492e0 100644
--- a/sys/geom/eli/g_eli.h
+++ b/sys/geom/eli/g_eli.h
@@ -97,6 +97,7 @@
#define G_ELI_DATAIVKEYLEN (G_ELI_DATAKEYLEN + G_ELI_IVKEYLEN)
/* Data-Key, IV-Key, HMAC_SHA512(Derived-Key, Data-Key+IV-Key) */
#define G_ELI_MKEYLEN (G_ELI_DATAIVKEYLEN + SHA512_MDLEN)
+#define G_ELI_OVERWRITES 5
#ifdef _KERNEL
extern u_int g_eli_debug;
OpenPOWER on IntegriCloud