From owner-freebsd-geom@FreeBSD.ORG Tue Dec 14 22:18:34 2004 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 418E516A4CE for ; Tue, 14 Dec 2004 22:18:34 +0000 (GMT) Received: from afields.ca (afields.ca [216.194.67.132]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0295143D31 for ; Tue, 14 Dec 2004 22:18:34 +0000 (GMT) (envelope-from afields@afields.ca) Received: from afields.ca (localhost.afields.ca [127.0.0.1]) by afields.ca (8.12.11/8.12.11) with ESMTP id iBEMIB1r072488; Tue, 14 Dec 2004 17:18:11 -0500 (EST) (envelope-from afields@afields.ca) Received: (from afields@localhost) by afields.ca (8.12.11/8.12.11/Submit) id iBEMHtpv072487; Tue, 14 Dec 2004 17:17:55 -0500 (EST) (envelope-from afields) Date: Tue, 14 Dec 2004 17:17:54 -0500 From: Allan Fields To: "Frank J. Beckmann" Message-ID: <20041214221754.GA62438@afields.ca> References: <200412100315.11436.frank@barda.agala.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200412100315.11436.frank@barda.agala.net> User-Agent: Mutt/1.4i cc: freebsd-geom@freebsd.org Subject: Re: How do I change the password of a gbde lock? X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Dec 2004 22:18:34 -0000 On Fri, Dec 10, 2004 at 03:14:59AM +0100, Frank J. Beckmann wrote: > # gbde init /dev/ad4s4h -i -L /etc/gbde/ad4s4h.lock > # gbde attach ad4s4h -l /etc/gbde/ad4s4h.lock > # newfs -U /dev/ad4s4h.bde > # mount /dev/ad4s4h.bde /secure > ... > # umount /secure > # gbde detach ad4s4h > > That was easy. Then I tried: > > # gbde setkey ad4s4h -l /etc/gbde/ad4s4h.lock -L /etc/gbde/ad4s4h.lock > gbde: Error 22 decrypting lock > > Ofcourse I typed the password, when ist asked me. Did you type it incorrectly? What release? You seem to show {non-exist,corrupt} lock sectors, which can result from bad passphrase. src/sys/geom/bde/g_bde_lock.c: 370: /* If it points ito thin blue air, forget it */ 371: if (off + G_BDE_LOCKSIZE > (uint64_t)mediasize) { 372: off = 0; 373: return (EINVAL); 374: } ... 435: /* If we have an unsorted lock-sequence, refuse */ 436: for (i = 0; i < G_BDE_MAXKEYS - 1; i++) 437: if (gl->lsector[i] >= gl->lsector[i + 1]) 438: return (EINVAL); /usr/include/sys/errno.h: 77:#define EINVAL 22 /* Invalid argument */ > -- > Tsch?ss > Frank -- Allan Fields, AFRSL - http://afields.ca 2D4F 6806 D307 0889 6125 C31D F745 0D72 39B4 5541