From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id AB8sHgHyT2CFdQAA0tVLHw (envelope-from ) for ; Mon, 15 Mar 2021 23:47:13 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id EKEgGgHyT2CaKgAA1q6Kng (envelope-from ) for ; Mon, 15 Mar 2021 23:47:13 +0000 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 E85A5F60D for ; Tue, 16 Mar 2021 00:47:12 +0100 (CET) Received: from localhost ([::1]:51472 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLwvX-0006Eg-Vo for larch@yhetil.org; Mon, 15 Mar 2021 19:47:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37622) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLwrW-0001w8-PQ for guix-patches@gnu.org; Mon, 15 Mar 2021 19:43:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:54230) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLwrW-0000eU-GN for guix-patches@gnu.org; Mon, 15 Mar 2021 19:43:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lLwrW-000585-CU for guix-patches@gnu.org; Mon, 15 Mar 2021 19:43:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#47155] [PATCH] gnu: Respect DataDirectoryGroupReadable option of tor. Resent-From: raid5atemyhomework Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Mar 2021 23:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 47155 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxime Devos Cc: "47155@debbugs.gnu.org" <47155@debbugs.gnu.org> Received: via spool by 47155-submit@debbugs.gnu.org id=B47155.161585177919709 (code B ref 47155); Mon, 15 Mar 2021 23:43:02 +0000 Received: (at 47155) by debbugs.gnu.org; 15 Mar 2021 23:42:59 +0000 Received: from localhost ([127.0.0.1]:37543 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLwrS-00057n-TF for submit@debbugs.gnu.org; Mon, 15 Mar 2021 19:42:59 -0400 Received: from mail4.protonmail.ch ([185.70.40.27]:39894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLwrQ-00057a-F8 for 47155@debbugs.gnu.org; Mon, 15 Mar 2021 19:42:57 -0400 Date: Mon, 15 Mar 2021 23:42:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1615851769; bh=QQTuc+sWycI3X+QPwHC20+MTCTqyjZ11Nk6bFvf5qVQ=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=b+ue8yYjTMa285KilqX20ILeRSVcEzdDJ0JvAw10/HH0DO85ha6/Ltpct7AVq2olW svNQ+zjwI4ND7zk6ydYyEGd6r4OiYubBU1PWASg+Jkl0KHrqm9JGNxh0nMtH2z29Ri VhIY1d/ix+glxsYHKdbSoE+zGyXoSfy3i1xlZOEQ= Message-ID: In-Reply-To: References: 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" Reply-to: raid5atemyhomework X-ACL-Warn: , raid5atemyhomework via Guix-patches From: raid5atemyhomework via Guix-patches via X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615852033; h=from:from:sender:sender:reply-to: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=QQTuc+sWycI3X+QPwHC20+MTCTqyjZ11Nk6bFvf5qVQ=; b=PE2IYP9r87SArzltSJP+f7ry3/QjSk/xVPOcGIwB25ZZZnqdxnp5oxtdjYxFZ/Tm2sYj2u n+uB2UvZA4pULmCLRRThMSdF8uYm6U/nuhKjshqrPwgRBxioc4ihmSGO5NPrTx3GP1V1Ze jNP5vqpcN9r2gCbwrtFPTtcKqAWRjASfZ7bq1zUgZi9wHOCyNs7KPY6R7jpuLpKJzl/LwR G6lXyXLTQkPqhAixxypgEkqu3Cp4cgLptpyM+u7p7CGjxa6pQb0degv9m5ML8Xh7OOdyrb F4ROYpTbh1OGGRwv7CyfXY1FostjGIANQkspEFRVkpeJRALvMZC7rjLJFekK1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615852033; a=rsa-sha256; cv=none; b=XXNKVyCYFZf105vAA1uJhWpBuz3z7+ROAjkokE0n443ti8IHwpS73fzTNQ9Cq/nSb1px+j u+9+lU0pX1araFzMHwJxAenx2u63pR4d3zpaC6xB6VqmgRGINl2YZ0eCb1/AkB982JXeC0 uWgj1Y7JPBxvQgenCWP63io1MvRueSm+n8HN80dFP5iu9FqHVXF/4fEDj51lstoRkp5XU0 0RR6PUNNNMGYuN28oegn8+qZS+tlm/1gx2NAYXD28l3SqYPyfABL4jvy59il3DJXK3XO/0 wL4aV+tVdKRJodRjzJ1fM4a9b27bC8EjuvBWylYKbd4st4Hty12Gqy/qab0ixQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=b+ue8yYj; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -2.90 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=protonmail.com header.s=protonmail header.b=b+ue8yYj; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: E85A5F60D X-Spam-Score: -2.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: B6q+OC5r3TSz > On Mon, 2021-03-15 at 11:15 +0000, raid5atemyhomework via Guix-patches vi= a wrote: > > > Currently, if you set DataDirectoryGroupReadable 1 in your torrc, > > What are the reasons for setting DataDirectoryGroupReadable 1? > When using cookie-based authentication, the cookie file is traditionally pl= aced in the data directory. If the directory is not accessible from group,= then only the `tor` user can access the cookie and control `tor`. With th= is option, the cookie can be accessed by members of the `tor` group. > > it will be respected only if tor is started up. > > IIUC, tor will adjust the permissions of the directory to make it > group readable (while Guix' activation code creates the directory > group-unreadable). Correct. However, when doing a `guix system reconfigure`, the activation c= ode will be called again, which changes the directory back to group unreada= ble, without restarting tor. `tor` itself will only set the permissions wh= en it starts up, and will ignore the permissions while running. > > > If you reconfigure your OS without restarting the tor service, > > the directory permissions are reset due to the activation code being > > re-run and resetting the directory permissions. > > This change simply does not chmod if the directory already exists. > > I believe it would be more transparent to introduce a > (data-directory-group-readable? #t/#f), with #f as default, > to tor-configuration (adjusting tor-configuration->torrc) > and change the permission bits passed to chmod appropriately. > > (Documentation & reproducible system configuration & one integrated > system (in the software sense) and all that) Possibly. Thanks raid5atemyhomework