From owner-svn-src-head@freebsd.org Wed May 9 20:51:17 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79D27FCBD7F; Wed, 9 May 2018 20:51:17 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2EBBF6B634; Wed, 9 May 2018 20:51:17 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBCD0169E2; Wed, 9 May 2018 20:51:16 +0000 (UTC) (envelope-from oshogbo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w49KpGvk079240; Wed, 9 May 2018 20:51:16 GMT (envelope-from oshogbo@FreeBSD.org) Received: (from oshogbo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w49KpGZm079239; Wed, 9 May 2018 20:51:16 GMT (envelope-from oshogbo@FreeBSD.org) Message-Id: <201805092051.w49KpGZm079239@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: oshogbo set sender to oshogbo@FreeBSD.org using -f From: Mariusz Zaborski Date: Wed, 9 May 2018 20:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r333438 - head/sbin/geom/class/eli X-SVN-Group: head X-SVN-Commit-Author: oshogbo X-SVN-Commit-Paths: head/sbin/geom/class/eli X-SVN-Commit-Revision: 333438 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 20:51:17 -0000 Author: oshogbo Date: Wed May 9 20:51:16 2018 New Revision: 333438 URL: https://svnweb.freebsd.org/changeset/base/333438 Log: Change option dry-run from 'n' to 'C' in geli attach command. 'n' is used in other commands to define the key index. We should be consistent with that. 'C' option is used by patch(1) to perform dryrun so lets use that. Reviewed by: allanjude Differential Revision: https://reviews.freebsd.org/D15308 Modified: head/sbin/geom/class/eli/geli.8 head/sbin/geom/class/eli/geom_eli.c Modified: head/sbin/geom/class/eli/geli.8 ============================================================================== --- head/sbin/geom/class/eli/geli.8 Wed May 9 20:49:50 2018 (r333437) +++ head/sbin/geom/class/eli/geli.8 Wed May 9 20:51:16 2018 (r333438) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 10, 2018 +.Dd May 9, 2018 .Dt GELI 8 .Os .Sh NAME @@ -67,7 +67,7 @@ utility: .Cm init .Nm .Cm attach -.Op Fl dnprv +.Op Fl Cdprv .Op Fl j Ar passfile .Op Fl k Ar keyfile .Ar prov @@ -393,6 +393,9 @@ suffix. .Pp Additional options include: .Bl -tag -width ".Fl j Ar passfile" +.It Fl C +Do a dry-run decryption. +This is useful to verify passphrase and keyfile without decrypting the device. .It Fl d If specified, a decrypted provider will be detached automatically on last close. This can help with scarce memory so the user does not have to remember to detach the @@ -420,9 +423,6 @@ For more information see the description of the option for the .Cm init subcommand. -.It Fl n -Do a dry-run decryption. -This is useful to verify passphrase and keyfile without decrypting the device. .It Fl p Do not use a passphrase as a component of the User Key. Cannot be combined with the Modified: head/sbin/geom/class/eli/geom_eli.c ============================================================================== --- head/sbin/geom/class/eli/geom_eli.c Wed May 9 20:49:50 2018 (r333437) +++ head/sbin/geom/class/eli/geom_eli.c Wed May 9 20:51:16 2018 (r333438) @@ -86,7 +86,7 @@ static int eli_backup_create(struct gctl_req *req, con * * init [-bdgPTv] [-a aalgo] [-B backupfile] [-e ealgo] [-i iterations] [-l keylen] [-J newpassfile] [-K newkeyfile] [-s sectorsize] [-V version] prov * label - alias for 'init' - * attach [-dprv] [-j passfile] [-k keyfile] prov + * attach [-Cdprv] [-j passfile] [-k keyfile] prov * detach [-fl] prov ... * stop - alias for 'detach' * onetime [-d] [-a aalgo] [-e ealgo] [-l keylen] prov @@ -145,15 +145,15 @@ struct g_command class_commands[] = { }, { "attach", G_FLAG_VERBOSE | G_FLAG_LOADKLD, eli_main, { + { 'C', "dryrun", NULL, G_TYPE_BOOL }, { 'd', "detach", NULL, G_TYPE_BOOL }, { 'j', "passfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI }, { 'k', "keyfile", G_VAL_OPTIONAL, G_TYPE_STRING | G_TYPE_MULTI }, - { 'n', "dryrun", NULL, G_TYPE_BOOL }, { 'p', "nopassphrase", NULL, G_TYPE_BOOL }, { 'r', "readonly", NULL, G_TYPE_BOOL }, G_OPT_SENTINEL }, - "[-dnprv] [-j passfile] [-k keyfile] prov" + "[-Cdprv] [-j passfile] [-k keyfile] prov" }, { "detach", 0, NULL, {