From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 2IpYK7CSj2JFUgAAbAwnHQ (envelope-from ) for ; Thu, 26 May 2022 16:46:08 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id GF5BKrCSj2JJxgAAG6o9tA (envelope-from ) for ; Thu, 26 May 2022 16:46:08 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 692AE38815 for ; Thu, 26 May 2022 16:46:07 +0200 (CEST) Received: from localhost ([::1]:44654 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nuEkY-0000sR-Hj for larch@yhetil.org; Thu, 26 May 2022 10:46:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42138) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuEjJ-0000qt-3U for help-guix@gnu.org; Thu, 26 May 2022 10:44:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36186) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuEjI-00065Y-G4; Thu, 26 May 2022 10:44:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=e4mqZHqJS69oMEgIXfLwmBEESYsal6H33XNAfGxI02I=; b=NWpc8pqzKqKvyresASlH nmhpjM5MhxoO8C24kEvnCo9c6TaiS46muvrRJdXlqtFvyy3cGDB1XLM3L0IpghXyhGJYDa79Ssgq7 /wVzqiEMz9tl98+Nniv21LVh6+YOpoccGRU7E3oYlx9CHPwVm+JjasuTODoOZ74tRhqnzkN5C/TOE zFwPBh2FhvggcDoFgP0FDKbgf0HFohtSnOJwkOrfFD0aE0UFerwcF6fXz9c2n7Qf/p6u+ItrObAS/ VsZXARzSRbrplWot3HlJuaaXJNCx+4ilx1h46//FdNZUgXnFhBAuUtoBR2ymQtP63JHZoOhKKFlX2 nnBlJp59Gxg3og==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:64216 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nuEjH-0001y8-Ef; Thu, 26 May 2022 10:44:48 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Oleg Pykhalov Cc: Edouard Klein , 55359@debbugs.gnu.org, help-guix@gnu.org Subject: Re: bug#55359: How do I extend openssh-service-type ? References: <87tu9xum2c.fsf@rdklein.fr> <87r150o6zj.fsf@gmail.com> Date: Thu, 26 May 2022 16:44:44 +0200 In-Reply-To: <87r150o6zj.fsf@gmail.com> (Oleg Pykhalov's message of "Wed, 11 May 2022 10:37:04 +0300") Message-ID: <87ee0gfj4z.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653576367; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=e4mqZHqJS69oMEgIXfLwmBEESYsal6H33XNAfGxI02I=; b=ozvOCtljXYo2AyhVMV5z6Nr3Us0N5Xr0sHgDhXIy41S9i7kd7Vz9I35hZhXiVLfFvQQ1FU OzE2p8x/PCd4M1IgP80BOm7WpyPkgBNeufoH7CMiTj2cPHbDTX0JM35HHj2ChmdmSRVnwl luKIKPEKQQQPL78FhQq/XKSX13qRlDGBS/5ZFVlKK/KnFCtLLumj9ScH3t+7IuzBHIg/ed 1E3oLP3aBgfd/6i+AmcPPDUbS4YpCPJoE5vppgaPzWj8DrTVyyBAqmGS60QTiyokECYbek KSXj38zDIbYlde5p9fZ1/gn/cft4yHwid+SmsSupK9DqoFjrr8lLS7fTH/+8QA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653576367; a=rsa-sha256; cv=none; b=dKVc4Zg7dJhlbpc/tCXnY/4Bx4y33PLL6ltwh8w0VtL6IXsOb3/0rCIvIY/sSSum94CHty F6fowmWtgs07shHrst3BmlAPCWfUg6QIUTMFuSKQoovmaYGeMXvazFRj3k723q836cZ8Tx Shzd+iSFOKlCFgtWAZDZbv6XcJ+X1Cj8a5JBo8fQK3dbbAHG5wUUgl/Rj3xAAH04UDD+JQ HMuh60BiXTDFV376kFJB31fI4FehVJTiNFAaM/H42osnbH362fZ24NOUO+KfYwbaAa2KDC 3A5My6DAc574tOi6UJYKgAnesz2X652Pq40kJC8ICHoCFjyN8xz5/sLIxmylFw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=NWpc8pqz; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -1.24 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b=NWpc8pqz; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 692AE38815 X-Spam-Score: -1.24 X-Migadu-Scanner: scn1.migadu.com X-TUID: x7pPBDoh5Mvw Hi, Oleg Pykhalov skribis: >> (service-extension openssh-service-type >> (const `(("charlie" >> ,(local-file "charlie.pub"))))) >> #+end_quote > > [=E2=80=A6] > > Seems like extend-openssh-authorized-keys procedure does not use keys > argument. We could fix it like: For the record, this bug (dismissing the =E2=80=98keys=E2=80=99 argument) w= as introduced in b4b2bbf4fb74c9f3e93d64863ab9b38957494b49 (Oct. 2021). How come nobody noticed then? The reason is that starting from b4b2bbf4fb74c9f3e93d64863ab9b38957494b49, =E2=80=98authorized-key-directory= =E2=80=99 would create an empty directory. That directory would then be copied by =E2=80=98openssh-activation=E2=80=99 to /etc/ssh/authorized_keys.d; since /etc/ssh/authorized_keys.d would typically already contain the relevant keys, nothing bad would happen. Oleg=E2=80=99s commit 1f29ed4a812f86c45e2d9c37fd9f80f6d0418293 introduced another bug though: we=E2=80=99d create an authorized-key directory that included keys brought by extensions, but each of these files would be empty (because =E2=80=98extend-openssh-authorized-keys=E2=80=99 would dismi= ss key files associated with user names), which could lock yourself out. Fixed in 0dc63ce519c5f98b2186d1871176e2fac3a6926b. Reconfiguration recommended before you=E2=80=99re locked out! Thanks, Ludo=E2=80=99.