Date: Sun, 10 Feb 2013 15:56:21 +0000 (UTC) From: Pawel Jakub Dawidek <pjd@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r246621 - head/sbin/geom/class/eli Message-ID: <201302101556.r1AFuLKc017970@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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');
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302101556.r1AFuLKc017970>