svn commit: r246621 - head/sbin/geom/class/eli
Pawel Jakub Dawidek
pjd at FreeBSD.org
Sun Feb 10 15:56:21 UTC 2013
Author: pjd
Date: Sun Feb 10 15:56:20 2013
New Revision: 246621
URL: http://svnweb.freebsd.org/changeset/base/246621
Log:
Assert that if we are not dealing with keyfile we are dealing with passfile.
Modified:
head/sbin/geom/class/eli/geom_eli.c
Modified: head/sbin/geom/class/eli/geom_eli.c
==============================================================================
--- head/sbin/geom/class/eli/geom_eli.c Sun Feb 10 15:55:42 2013 (r246620)
+++ head/sbin/geom/class/eli/geom_eli.c Sun Feb 10 15:56:20 2013 (r246621)
@@ -380,6 +380,8 @@ eli_genkey_files(struct gctl_req *req, b
while ((done = read(fd, buf, sizeof(buf))) > 0)
g_eli_crypto_hmac_update(ctxp, buf, done);
} else /* if (strcmp(type, "passfile") == 0) */ {
+ assert(strcmp(type, "passfile") == 0);
+
while ((done = read(fd, buf, sizeof(buf) - 1)) > 0) {
buf[done] = '\0';
p = strchr(buf, '\n');
More information about the svn-src-all
mailing list