From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id UKOZGL67aWKIigAAbAwnHQ (envelope-from ) for ; Wed, 27 Apr 2022 23:55:10 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id gGWoF767aWLjEAEAG6o9tA (envelope-from ) for ; Wed, 27 Apr 2022 23:55:10 +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 C315C12A54 for ; Wed, 27 Apr 2022 23:55:09 +0200 (CEST) Received: from localhost ([::1]:36398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1njpcq-00016w-W1 for larch@yhetil.org; Wed, 27 Apr 2022 17:55:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njpcj-00016V-Tk for guix-patches@gnu.org; Wed, 27 Apr 2022 17:55:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50782) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1njpcj-0006gX-L4 for guix-patches@gnu.org; Wed, 27 Apr 2022 17:55:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1njpcj-0006Qj-KD for guix-patches@gnu.org; Wed, 27 Apr 2022 17:55:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55034] [PATCH 0/1] Let openssh trust /gnu/store Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 27 Apr 2022 21:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55034 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Alexey Abramov Cc: 55034@debbugs.gnu.org Received: via spool by 55034-submit@debbugs.gnu.org id=B55034.165109645824654 (code B ref 55034); Wed, 27 Apr 2022 21:55:01 +0000 Received: (at 55034) by debbugs.gnu.org; 27 Apr 2022 21:54:18 +0000 Received: from localhost ([127.0.0.1]:44679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njpc2-0006Pa-0Z for submit@debbugs.gnu.org; Wed, 27 Apr 2022 17:54:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38392) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1njpc0-0006PK-Ew for 55034@debbugs.gnu.org; Wed, 27 Apr 2022 17:54:17 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37922) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njpbv-0006dl-3Z; Wed, 27 Apr 2022 17:54:11 -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=+vAgxq2lcG6aI0X83AkEFrOIl1BAGY5sPbElHIgbn2Y=; b=U1eO1+YiGA9cldT63Uwk tCYB03Iigrbn2JM5T1OirggsVG00gp6+50mjVdk5M2YbP+Jr0nprVoB9kU0uGc2/Fp+pDpuPwipUJ kTDSlJAUrBhiTa2OMBKvGLiI5NIYZeMS7DObuU9yTRwcGV1P+uPxZ7hMqic/MiY0sMRteZ2LX6v3a g1SfibKGbSGHat0/MdQtJwK3CK8L0I8XJwlioAdTbpxGeITQS6t4qrB1iC0G0r7QAWhPdrqSO1RyG n/vEV7Ns7sFRWGXT1FYi7t1fzvYo9sAHfu6kdinsl2RGc1Id4QsdrsP2wyAYPdRCSAfFGlsvGeX/P CKddtmXG/EzPVQ==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:49312 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1njpbu-0006tz-OE; Wed, 27 Apr 2022 17:54:10 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220420084724.3514-1-levenson@mmer.org> <87bkwwoz6m.fsf@gnu.org> <87y1zxiplj.fsf@delta.lan> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 =?UTF-8?Q?Flor=C3=A9al?= an 230 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Wed, 27 Apr 2022 23:54:09 +0200 In-Reply-To: <87y1zxiplj.fsf@delta.lan> (Alexey Abramov's message of "Fri, 22 Apr 2022 08:44:56 +0200") Message-ID: <87fslygpku.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: 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" 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=1651096510; 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=+vAgxq2lcG6aI0X83AkEFrOIl1BAGY5sPbElHIgbn2Y=; b=OZ3DpbepxEnP1iFSlBR0aNizRq52vtu7jgxHEEp4vb8g6idk4bFVrBfAIdFTF6Lq5wsYuj KEzQKQxxlfQIiGVJdDvVbJAjZ8Gz4kkJwmDEgY22i8itTwwejv/S+BwDu7zMqu1DDEDMqc XE08sw3r+4l5fgPaiQezXHPehaVZXagBj0Z9GgCYi73X9UPhSrrYKxvTZglkWlJc4wgcfz drv2TsEaNvsGsmNB24dWdkP2AdqTscswWg7Xyqzg9tvuJpGqKmi4W+i81PxTLRDuv7MvtY nW01U7p11YW1KS+FHlOAj8c2L+9MFwAvObeYJg+wMvBBeVdHrmqh8BVsXNo37g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651096510; a=rsa-sha256; cv=none; b=kzblEGv53kLgsYyWts63d/bepuWSK45L02p4A6hdFWwXFCGP8bvRFcZGkM1FycxX0xMPe2 0BdN2S1yteUleMGLDdnsYx0/noVxwSLHmo/lu6bwBiATMBz+VGsNcvxg1X/Mw8w9Y5dB9C j1kOBwuG+o5ed4AGP6ndN8tWtrgCuH+ehVMl3TbgkLm9khdSg1xyA0zC7lG0VgVJCH2o7N XEXA2YmpPnOMmE+Kkjq1rCZ0VC2oGO3B0ZIlNwb3hdQxLWnq+wjm1QviNzxDuV3Xt+mAWQ McQs5i3Bi0iiTr1j02rv8eCcl/6N4prwKk9+uxRkZ5n7+WhK1gkQuI56xEwsjA== 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=U1eO1+Yi; 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-Spam-Score: -3.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=U1eO1+Yi; 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-Queue-Id: C315C12A54 X-Spam-Score: -3.90 X-Migadu-Scanner: scn1.migadu.com X-TUID: cuDVd270m41K Hi, Alexey Abramov skribis: > Ludovic Court=C3=A8s writes: > >> Hi, >> >> Alexey Abramov skribis: >> >>> This patch allows users to use /gnu/store objects for AuthorizedKeysCom= mand >>> and similar options. According to the sshd_config(5): >>> >>>> The program must be owned by root, not writable by group or others, and >>>> specified by an absolute path. >> >> That=E2=80=99s the case with programs in /gnu/store. Why isn=E2=80=99t = it working? > > The reason is that safe_path in openssh takes a full path of the file > and checks every directory one by one. The constrain fails on /gnu/store > directory due to write permissions for group. Oh I see, makes sense. [...] >> Also note that the strcmp above is incorrect: it would accept >> /gnu/storesomethinglese. You probably need to add a trailing slash to >> be sure. > > Let me correct myself. In the previous email I wrote that the safe_path > goes from top to bottom, but actually it walking upwards. This is an > actual loop [...] > As you can see, buffer is holding the result of dirname already, hence > I used "/gnu/store". Sounds good then! Thanks for explaining, Ludo=E2=80=99.