diff options
author | pjd <pjd@FreeBSD.org> | 2013-02-10 15:56:20 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2013-02-10 15:56:20 +0000 |
commit | 861349429a353a28747de5d6b9ea77b67d3eab57 (patch) | |
tree | c609a6fecbea2a711adde36bf89f5b7919133bb1 | |
parent | 007755626aecbbb77acb634bc17a8f7c675187ca (diff) | |
download | FreeBSD-src-861349429a353a28747de5d6b9ea77b67d3eab57.zip FreeBSD-src-861349429a353a28747de5d6b9ea77b67d3eab57.tar.gz |
Assert that if we are not dealing with keyfile we are dealing with passfile.
-rw-r--r-- | sbin/geom/class/eli/geom_eli.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/geom/class/eli/geom_eli.c b/sbin/geom/class/eli/geom_eli.c index ed65fff..14f564e 100644 --- a/sbin/geom/class/eli/geom_eli.c +++ b/sbin/geom/class/eli/geom_eli.c @@ -380,6 +380,8 @@ eli_genkey_files(struct gctl_req *req, bool new, const char *type, 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'); |