From debbugs-submit-bounces@debbugs.gnu.org Tue Apr 28 09:23:25 2020 Received: (at submit) by debbugs.gnu.org; 28 Apr 2020 13:23:26 +0000 Received: from localhost ([127.0.0.1]:39340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTQCr-0000YQ-Kz for submit@debbugs.gnu.org; Tue, 28 Apr 2020 09:23:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:35006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTQCb-0000Y0-Ed for submit@debbugs.gnu.org; Tue, 28 Apr 2020 09:23:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34622) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTQCa-0001mf-Su for guix-patches@gnu.org; Tue, 28 Apr 2020 09:23:09 -0400 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTQCZ-0007zt-SG for guix-patches@gnu.org; Tue, 28 Apr 2020 09:23:08 -0400 Received: from mout02.posteo.de ([185.67.36.66]:56969) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jTQCZ-0007zF-0h for guix-patches@gnu.org; Tue, 28 Apr 2020 09:23:07 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id A40742400FE for ; Tue, 28 Apr 2020 15:23:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1588080184; bh=jLLX6kwU589sunDItM0jA7Wv58ZhAfHAYxsIfI9XnGM=; h=From:To:Subject:Date:From; b=YWfEJKtsiJbaFWM9RTl2ny+dWIQlj53q/Y7fRsoWfoWHDj5oMeWRciKNHotQkaU4b 1uersbimoGikklIrs7G/NdkPW6yqZaDA0kAQH+l7RZ1Ki5I/UAX1rrJ5wVZCg+7Dz/ RrhHHB8+q9RK60IyE13NWzhb/rmPNHMJXDRAkkk/8bZBP1IhZ2EvK9un/7UV018zz+ VY65gehBSlzm4aNn7Xp3fveRQJV6WrF0vesiIYwC/qsoEyDyVdOUzrh4MkT6AgFgRn DM/J0T2Wl+k7TRdP94gv5hzmK2L+0cEsFAXdvuoNXNDtfX++bms71Q5qzzFlUfB16D 8VMK08dltoy5A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 49BMlQ41Shz9rxP for ; Tue, 28 Apr 2020 15:22:58 +0200 (CEST) From: Diego Nicola Barbato To: guix-patches@gnu.org Subject: [PATCH] services: syslog: Simplify 'start' method. Date: Tue, 28 Apr 2020 15:22:58 +0200 Message-ID: <87tv13hhhp.fsf@GlaDOS.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=dnbarbato@posteo.de; helo=mout02.posteo.de X-detected-operating-system: by eggs.gnu.org: First seen = 2020/04/28 09:11:48 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Received-From: 185.67.36.66 X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Hey Guix, This patch simplifies the 'start' method of 'syslog-service-type' by setting the umask using the new #:file-creation-mask parameter of 'make-forkexec-constructor', which was introduced in version 0.8.0 of the Shepherd, instead of wrapping the constructor in a lambda. Regards, Diego --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-services-syslog-Simplify-start-method.patch >From 5ac4af21427afb8ef498b0de7151f116a6f7d9eb Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Tue, 28 Apr 2020 13:31:54 +0200 Subject: [PATCH] services: syslog: Simplify 'start' method. This is a followup to d7113bb655ff80a868a9e624c913f9d23e6c63ad and e3358a831e7d5d9e8dc614340e49ea5aeb11a7ff. * gnu/services/base.scm (syslog-service-type): Change 'start' method to set umask using the #:file-creation-mask parameter of 'make-forkexec-constructor' introduced in version 0.8.0 of the Shepherd. --- gnu/services/base.scm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 2913478e4a..0f119cc2f9 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1316,17 +1316,13 @@ Service Switch}, for an example." (documentation "Run the syslog daemon (syslogd).") (provision '(syslogd)) (requirement '(user-processes)) - (start #~(let ((spawn (make-forkexec-constructor - (list #$(syslog-configuration-syslogd config) - "--rcfile" - #$(syslog-configuration-config-file config)) - #:pid-file "/var/run/syslog.pid"))) - (lambda () - ;; Set the umask such that file permissions are #o640. - (let ((mask (umask #o137)) - (pid (spawn))) - (umask mask) - pid)))) + (start #~(make-forkexec-constructor + (list #$(syslog-configuration-syslogd config) + "--rcfile" + #$(syslog-configuration-config-file config)) + ;; Set the umask such that file permissions are #o640. + #:file-creation-mask #o137 + #:pid-file "/var/run/syslog.pid")) (stop #~(make-kill-destructor)))))) ;; Snippet adapted from the GNU inetutils manual. -- 2.26.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri May 01 17:59:18 2020 Received: (at 40937-done) by debbugs.gnu.org; 1 May 2020 21:59:18 +0000 Received: from localhost ([127.0.0.1]:50826 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUdgk-0008Ut-GW for submit@debbugs.gnu.org; Fri, 01 May 2020 17:59:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:54340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jUdgh-0008Uc-Sn for 40937-done@debbugs.gnu.org; Fri, 01 May 2020 17:59:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38528) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUdgc-0005i0-Hk; Fri, 01 May 2020 17:59:10 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=43130 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jUdgb-0007Ew-5z; Fri, 01 May 2020 17:59:10 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Diego Nicola Barbato Subject: Re: [bug#40937] [PATCH] services: syslog: Simplify 'start' method. References: <87tv13hhhp.fsf@GlaDOS.home> Date: Fri, 01 May 2020 23:59:07 +0200 In-Reply-To: <87tv13hhhp.fsf@GlaDOS.home> (Diego Nicola Barbato's message of "Tue, 28 Apr 2020 15:22:58 +0200") Message-ID: <87lfmbb9lg.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 40937-done Cc: 40937-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Hi, Diego Nicola Barbato skribis: >>>From 5ac4af21427afb8ef498b0de7151f116a6f7d9eb Mon Sep 17 00:00:00 2001 > From: Diego Nicola Barbato > Date: Tue, 28 Apr 2020 13:31:54 +0200 > Subject: [PATCH] services: syslog: Simplify 'start' method. > > This is a followup to d7113bb655ff80a868a9e624c913f9d23e6c63ad and > e3358a831e7d5d9e8dc614340e49ea5aeb11a7ff. > > * gnu/services/base.scm (syslog-service-type): Change 'start' method to s= et > umask using the #:file-creation-mask parameter of > 'make-forkexec-constructor' introduced in version 0.8.0 of the Shepherd. Perfect! Applied, thanks. Ludo=E2=80=99. From unknown Sat Sep 20 13:00:43 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 30 May 2020 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator