From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 8GCmJvEPBWMuEgAAbAwnHQ (envelope-from ) for ; Tue, 23 Aug 2022 19:35:45 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 0CuNJvEPBWPoeQAAauVa8A (envelope-from ) for ; Tue, 23 Aug 2022 19:35:45 +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 5DF6D292C6 for ; Tue, 23 Aug 2022 19:35:45 +0200 (CEST) Received: from localhost ([::1]:60004 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oQXoW-00065b-Ih for larch@yhetil.org; Tue, 23 Aug 2022 13:35:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39048) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oQXmt-00064D-FT for guix-patches@gnu.org; Tue, 23 Aug 2022 13:34:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:55245) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oQXms-0004eM-H9 for guix-patches@gnu.org; Tue, 23 Aug 2022 13:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oQXms-0003Mb-9N for guix-patches@gnu.org; Tue, 23 Aug 2022 13:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57363] [PATCH] shepherd: Set #o640 permissions for log file of service in container. References: <20220823173102.30242-1-arunisaac@systemreboot.net> In-Reply-To: <20220823173102.30242-1-arunisaac@systemreboot.net> Resent-From: Arun Isaac Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 23 Aug 2022 17:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57363 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57363@debbugs.gnu.org Cc: Arun Isaac , Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 57363-submit@debbugs.gnu.org id=B57363.166127601312894 (code B ref 57363); Tue, 23 Aug 2022 17:34:02 +0000 Received: (at 57363) by debbugs.gnu.org; 23 Aug 2022 17:33:33 +0000 Received: from localhost ([127.0.0.1]:44994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQXmP-0003Lt-Ct for submit@debbugs.gnu.org; Tue, 23 Aug 2022 13:33:33 -0400 Received: from mugam.systemreboot.net ([139.59.75.54]:34302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oQXmM-0003Lk-FT for 57363@debbugs.gnu.org; Tue, 23 Aug 2022 13:33:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=systemreboot.net; s=default; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=E5yR3q4rby8/ivwzz4+t/jPv/8wFHiVUUtEIt1fvluA=; b=mqkIwbfc48YCyBGlCboTe0TNcO xY1cqKoUzXRlpOSNabRfga2GnBy2NZby5XJRNk6WRt0Wt2JihHwqzr5ay3ihUdeCaMF/aBhM/rgMp KwVWpbG+RrJmV7MWD3TaNLX4w/VWAFfD+nXf/la0zFh5/3MeBrMHVn18KhWvsIddc81pCtbZbI4Ts MSdfOtQbK3eBrcusXGumWkpfucndRVZhCoeptoHQ0M5VG1+ivfAn+aySXS/3lp/h1cnJ9lepX+eEL lUF+xnDAaaXSO38L0eCv3fLuD8ORTq6cBB3y07KLL+VeYNbZHA850XBY8cT6VSinaYz6RoZXZnCeh tiU12ldg==; Received: from [192.168.2.1] (port=53898 helo=localhost.localdomain) by systemreboot.net with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1oQXmJ-0009FM-11; Tue, 23 Aug 2022 23:03:27 +0530 From: Arun Isaac Date: Tue, 23 Aug 2022 23:03:25 +0530 Message-Id: <20220823173325.30877-1-arunisaac@systemreboot.net> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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=1661276145; 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=E5yR3q4rby8/ivwzz4+t/jPv/8wFHiVUUtEIt1fvluA=; b=trp03xkD70aCtUEU9q8IZrvmK5HQa8eoWd7AFy+orebyvDK6A+V3lsRLWubWjo6ory5z0V AfSYkpcCwoFEteLi5FG/4j82A3meke6NUE29wBwh3y6PXZx7bdcMqrLAtRcM41R+LKypCE CpsLXTN0s+ghJOlpfWCN/CPGBL5cZtul07ElX7Qn13fQ943I7oMIXbI9qGIxMGz/8QnZFG k32es8CqjRb8TtwHfapiapJN0br7olIk9NmP8zAsqMtCVhGvdXcSghw7S5n07fQUXX79C/ ZkoPCcwTJw3GscirjEtUahwy2L+oWgHlisFN1mYSGCo60+1gsJoDHNfoG5cr4Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1661276145; a=rsa-sha256; cv=none; b=PvjcJVIWRojw5H5KIOCqvxxt/K5ytquebWBCWI1orkOJVGaZXu+BlvKpICetrcwd05SHCG AtETCcV2+1Q6rT6O8kOLb02/dnxRfKZHZQ5JiG39ftaAmcv0DHr+TeZF3gTmOocVR2I2Uy axiC4/hBmQH0UYrPDqE6UJaiTXtJCLBBBep61gFH9mCoECtsl5/VW0bBf8sKwusL80w+o6 TTX7MNiYRdNyPWi8ZhHtJkc/16V/k87NBNROmLnHp6diIG9fg626207s2sLY7VcJbV2Fdq EWLnf7p0SvP3g1XvHvp94DREj2WhTKOEcfTYt0xo9SY2iFUtxuTfEHey5XiHTA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=mqkIwbfc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); 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: 6.70 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=systemreboot.net header.s=default header.b=mqkIwbfc; dmarc=fail reason="SPF not aligned (relaxed)" header.from=systemreboot.net (policy=none); 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: 5DF6D292C6 X-Spam-Score: 6.70 X-Migadu-Scanner: scn0.migadu.com X-TUID: 61RwJqPN/opM * gnu/build/shepherd.scm (make-forkexec-constructor/container): Set #o640 permissions for log file. --- gnu/build/shepherd.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm index f4caefce3c..c7ba73967f 100644 --- a/gnu/build/shepherd.scm +++ b/gnu/build/shepherd.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2017, 2018, 2019, 2020, 2022 Ludovic Courtès ;;; Copyright © 2020 Mathieu Othacehe ;;; Copyright © 2022 Leo Nikkilä +;;; Copyright © 2022 Arun Isaac ;;; ;;; This file is part of GNU Guix. ;;; @@ -187,6 +188,7 @@ (define mounts ;; Create LOG-FILE so we can map it in the container. (unless (file-exists? log-file) (call-with-output-file log-file (const #t)) + (chmod log-file #o640) (when user (let ((pw (getpwnam user))) (chown log-file (passwd:uid pw) (passwd:gid pw)))))) -- 2.37.1