From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +MXPMJTkJ2TY0wAASxT56A (envelope-from ) for ; Sat, 01 Apr 2023 10:00:20 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id O3vDMJTkJ2Q5LAEAauVa8A (envelope-from ) for ; Sat, 01 Apr 2023 10:00:20 +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 A1CC9217A8 for ; Sat, 1 Apr 2023 10:00:20 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1piW9d-0007V9-No; Sat, 01 Apr 2023 04:00:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piW9b-0007Uf-AK for guix-patches@gnu.org; Sat, 01 Apr 2023 04:00:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1piW9b-00020v-19 for guix-patches@gnu.org; Sat, 01 Apr 2023 04:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1piW9a-0003Ka-Ie for guix-patches@gnu.org; Sat, 01 Apr 2023 04:00:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62461] Additional ssh configuration options. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 01 Apr 2023 08:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62461 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Nicolas Graves Cc: 62461@debbugs.gnu.org Received: via spool by 62461-submit@debbugs.gnu.org id=B62461.168033597612735 (code B ref 62461); Sat, 01 Apr 2023 08:00:02 +0000 Received: (at 62461) by debbugs.gnu.org; 1 Apr 2023 07:59:36 +0000 Received: from localhost ([127.0.0.1]:35389 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piW9A-0003JL-11 for submit@debbugs.gnu.org; Sat, 01 Apr 2023 03:59:36 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1piW97-0003J7-Nj for 62461@debbugs.gnu.org; Sat, 01 Apr 2023 03:59:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piW90-0001u2-UK; Sat, 01 Apr 2023 03:59:26 -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=9alqJW7MmTjG2BU0HgiWs54+Ye+r4ZUfa0bJVB1DbFY=; b=WAQRdNkxGv7t8ISNc+z9 rPkKz/F2nGF43p5pmHw2gNoZpxYTFap0ve28T2fmbyc6oZSqjeP4Jx3FCrVppYJHzKkiLcLsmDv9a 7D/OIWfJO6KKwCjWbY4E3je2ZSoEiRoV3a20nULlm1zcl2iG9prS50cbMWgU/k6wwGBsG6/wkDj/Z XLrdn7A7GPjfZYW/hfhdZyHz4LBGMeF0KDMTFzVnrAzV+I38rGfkjgDiaR7CxrNLT/G5o4fXIE0NG edLC2OKQb8BfnavIvQjuReCeeXy6JBUUtplgz3v6GJDSmnNuO9zNeuJdg3iGmOtfC15uZtvlFJ1s+ A+EwUaO4WdpmRw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1piW90-00049R-IM; Sat, 01 Apr 2023 03:59:26 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20230326140706.32412-1-ngraves@ngraves.fr> <20230326140706.32412-2-ngraves@ngraves.fr> Date: Sat, 01 Apr 2023 09:59:25 +0200 In-Reply-To: <20230326140706.32412-2-ngraves@ngraves.fr> (Nicolas Graves's message of "Sun, 26 Mar 2023 16:07:05 +0200") Message-ID: <87fs9kghia.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680336020; a=rsa-sha256; cv=none; b=AuQK6KYd52hTwJkkmgPzahkOjdBANYz6vqsN0SJULGUkahb1eiSVrvLd25zXAqLaiVgdW9 GLr+DTUioUeeR12PYVagPmPw5sMDWlCd5eSSusYkr4j2hDKwFdbRYv2bjJRtt1fx9wnvDF 37ErEBSg+Ixkfh/Qk5O11jK9U3tXo9EQ2VzlHooOrJPtY+kWtvzmHBfxWzChNSI+TovHCM 1y3lJDsiEfhBQAJsdOKaCVssMU7CnFAQFhmLIbaPqFSxU3tY/OBqOI8AGlHz8SldLg3WFf IGiX/dR/Aea6hLy3setil87LRz3joRtLBMf0SeXz8U1ScEZiZhMk7hH9QYzsZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=WAQRdNkx; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680336020; 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:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=9alqJW7MmTjG2BU0HgiWs54+Ye+r4ZUfa0bJVB1DbFY=; b=GMcSJ2Uv2F+LraGTWDEN06ngCc6LgGIzano0V3tX995nkiGLIiV/SkbWYJOJx4m4aq0vGK OtsgRBpslTAMi49wFdChb3GDtGPE8S+6EiLrY4jinoAa1sN5gaz1j/1aPBhuIFBRrOauot W9k/zoedPbW99qtisi3BvC1R58lT/7oODfP6+tQke8ytJv5BtU5ILRinNgmnCDl7E9jNsz fDCdGrPfdxlm7kDDA2t6m6V5A5XOsXMmlA609ZKvZLbY216DKpruQ5y/wUFaab3Ct2Ens6 5E5ubCSuHMnTxQuVYFht2XgcrF7cPYEpCVqWcDiPvqgUCVY/z0JoPgWeEbkBIg== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=WAQRdNkx; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.13 X-Spam-Score: -4.13 X-Migadu-Queue-Id: A1CC9217A8 X-TUID: qyMWHY9wFWR+ Nicolas Graves skribis: > --- > gnu/home/services/ssh.scm | 49 ++++++++++++++++++++++++++++++++++----- > 1 file changed, 43 insertions(+), 6 deletions(-) [...] > +(define ssh-match-keywords > + '("canonical" "final" "exec" "host" "originalhost" "user" "localuser")) Should it be symbols? > (define-configuration openssh-host > (name > - (string) > - "Name of this host declaration.") > + maybe-string > + "Name of this host declaration. A @code{openssh-host} must define on= ly > +@code{name} or @code{match-criteria}. Use host-name \"*\" for top-level > +options.") =E2=80=9CUse host name @code{\"*\"} for =E2=80=A6=E2=80=9D > + (match-criteria ;TODO implement stricter match-criteria rules > + maybe-match-criteria > + "A string where the first element is all or one of > +@code{ssh-match-keywords}. The rest of the elements are arguments for t= he How about: =E2=80=9CWhen specified, this string denotes the set of hosts to which the entry applies, superseding the @code{host-name} field. Its first element must be all or one of=E2=80=A6=E2=80=9D > (string-append > - "Host " (openssh-host-name config) "\n" > + (if (maybe-value-set? (openssh-host-name config)) > + (if (maybe-value-set? (openssh-host-match-criteria config)) > + (error > + "You must either define name or match-criteria, not both.") > + (string-append "Host " (openssh-host-name config) "\n")) > + (if (maybe-value-set? (openssh-host-match-criteria config)) > + (string-append > + "Match " (string-join (openssh-host-match-criteria config) "= ") "\n") > + (error > + "You must either define name or match-criteria once."))) Please report errors as lowercase messages with: (raise (formatted-message (G_ "=E2=80=A6") =E2=80=A6)) You can also use =E2=80=98&fix-hint=E2=80=99 to provide an additional hint,= if needed. Ludo=E2=80=99.