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 ms0.migadu.com with LMTPS id OO5hDpoVKWKmPwAAgWs5BA (envelope-from ) for ; Wed, 09 Mar 2022 22:01:14 +0100 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 2FsRC5oVKWJIVAEAauVa8A (envelope-from ) for ; Wed, 09 Mar 2022 22:01:14 +0100 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 AD157EECB for ; Wed, 9 Mar 2022 22:01:13 +0100 (CET) Received: from localhost ([::1]:51232 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nS3Qm-0003M0-S0 for larch@yhetil.org; Wed, 09 Mar 2022 16:01:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:40554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nS3Qd-0003L6-1Y for guix-patches@gnu.org; Wed, 09 Mar 2022 16:01:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:38770) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nS3Qc-0004rn-LZ for guix-patches@gnu.org; Wed, 09 Mar 2022 16:01:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nS3Qc-0001hp-KH for guix-patches@gnu.org; Wed, 09 Mar 2022 16:01:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54309] [PATCH] services: auditd: use exclusive log directory for auditd References: In-Reply-To: Resent-From: fesoj000 Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 09 Mar 2022 21:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54309 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 54309@debbugs.gnu.org Received: via spool by 54309-submit@debbugs.gnu.org id=B54309.16468596294276 (code B ref 54309); Wed, 09 Mar 2022 21:01:02 +0000 Received: (at 54309) by debbugs.gnu.org; 9 Mar 2022 21:00:29 +0000 Received: from localhost ([127.0.0.1]:60895 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nS3Q5-00016e-7B for submit@debbugs.gnu.org; Wed, 09 Mar 2022 16:00:29 -0500 Received: from mail-ej1-f52.google.com ([209.85.218.52]:44577) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nS3Q3-0000zI-Cq for 54309@debbugs.gnu.org; Wed, 09 Mar 2022 16:00:27 -0500 Received: by mail-ej1-f52.google.com with SMTP id qt6so7748790ejb.11 for <54309@debbugs.gnu.org>; Wed, 09 Mar 2022 13:00:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:from:subject :content-language:to:content-transfer-encoding; bh=0ambC4f9Ik2fWvZgzZLWC8Ln/L3Ydgc070oSo5/Z/Pg=; b=VyXw1pDb265IvGL3/ny7+uKlSd0S3XB2wJ/P+knuQG+R8Osh2l8f+mauDdvJp1qkMO oIRfLVQESyoCHhcN3RNOHEB057mpbHrx//7pk/8GqXTCw1sXfPt75gngRBd/ThphG0Ko w+X+NzUKRhDD70OSErbPgQlQ2fTHaV0/z2uiT02iZ+U2urkUE1sBGYuZJFjTvwB2cNBX nlc8S2bhOyvhYxAviVF3EpGSM/mguAVKJKdZ8MTwJmz2YaJcDkisEez664upksrxGMXD Ezy/7I3MWkemai8Ges5+GTBOS6DFstmKB2/EFwNZ85uEErcjxQ4Zgs5gJbbcjmcB3sP5 CqNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:from :subject:content-language:to:content-transfer-encoding; bh=0ambC4f9Ik2fWvZgzZLWC8Ln/L3Ydgc070oSo5/Z/Pg=; b=MPBpk1l69Ps/ONW2oABNqlwCYmB0eVPSZYwwEKKn48eigxR1SFTqskfYLx+2H6AhsY QukXEL23k9scbXc+nSbhmyVPV+2KgJqoWqJP3CI704gdzpAutPADFA/bnxloE3keTwqn PzCeMvktIz8ZLXZK8N6eeghtfpBESTQC4OYKBcL4xjH8CcOVTlRoaQ1J3yYjbI5hASQx qt9HEzy9t5XPG1uN4KV2SIpaHVS5vTeElXNL+xEghGNRUJebsIUPYmvEjpj1BtA+Geni dxcxeHeurgSxzbfmiNrfsOZcfTXgSlXoLG6YgZFYYyuD5NE42c6iihLxxiPDfxP7TL5Y 4JQg== X-Gm-Message-State: AOAM5318TmvtdUGaf2K07PIYZ28xJABSj69tAXJCkPSNadGEXfli6si7 hdQhaiz1ZaT6J5ylF662DVpb8kGxXTk= X-Google-Smtp-Source: ABdhPJy/3OH/N/9/0wrrqHTqS4cwtSxg4wz1FuuTwwzfb+6lz8lJG8BQg7NnS8N8fe6vO3h1HHjOcw== X-Received: by 2002:a17:906:2a85:b0:6ce:36bd:bcd9 with SMTP id l5-20020a1709062a8500b006ce36bdbcd9mr1467307eje.318.1646859621301; Wed, 09 Mar 2022 13:00:21 -0800 (PST) Received: from ?IPV6:2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5? (p200300eeaf2f0e00c2f9c2bbbf951fc5.dip0.t-ipconnect.de. [2003:ee:af2f:e00:c2f9:c2bb:bf95:1fc5]) by smtp.gmail.com with ESMTPSA id yy18-20020a170906dc1200b006d6e5c75029sm1091377ejb.187.2022.03.09.13.00.20 for <54309@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Mar 2022 13:00:20 -0800 (PST) Message-ID: Date: Wed, 9 Mar 2022 22:00:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 From: fesoj000 Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646859673; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=0ambC4f9Ik2fWvZgzZLWC8Ln/L3Ydgc070oSo5/Z/Pg=; b=LwsQ7geBrEmR4DbHZfEzP02Vad2bOZDHTgt8ElstTY1KQB/gv/mSg0I4PrLT2TLOdXimFF 50GCiSa9K2bh4sJE7wJecv+4mgBg/AMaulBRLQo7GB1TCm4EAAAlRoEUk4b5zE8grXcVvj wW9xgqicPPxe0L8BrtY2vWJSgoBusguPebNf3dCgsE6T5YlB3NYeW7N9Jxa75SvIuXqdMe UlfPtbk0d2PsxPQPazhab2IzFuR30VWbYvDyWbfVBGTHddd9cGhb9EhfoKGpMc7dnRL/R3 jvlGONaCB0u506n2x/9khTu40XVFHLdGCzIT6ycTTrmX9FKeJJ8USphG6WPbFg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646859673; a=rsa-sha256; cv=none; b=KmgBXbExmTfNXNEg8Q5/3RlhRM7WqzuD4r4kJkgRdvI7tJebr0yYh1o8Nb+SnrD4Kfp1bv p9vY4OfQjH6V0QnAiTrCexWPcDS5qpKpBZ2kHF6GLuXSeKhb9WC3ymBl5unRujncCJzQoU IHIL9ddwWMkkZ+xNqHI9UyqvdFe2ET/1yPg8AOg7UL7Fe4hEnDc3nb/FxS78mDXIDgkn1o xsuXhgRjjYNH7GyKn/7FeywbIYAcoQg6Dkt8RsGCESwI7tSeJwAuq1JEcamkIfB7kBmFvh K/iECtm/x9riHE4TFyN0UOkgJMUn1C8QDWla/FnzH1lShx3cfgfm4ea8/Mqj1w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=VyXw1pDb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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: 5.09 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=VyXw1pDb; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (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: AD157EECB X-Spam-Score: 5.09 X-Migadu-Scanner: scn0.migadu.com X-TUID: bGfo5dpdQTDQ Use the upstream default log file for auditd. * gnu/services/auditd.scm: add auditd-activation function and extend activation-service-type. --- gnu/services/auditd.scm | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gnu/services/auditd.scm b/gnu/services/auditd.scm index abde811f51..c88e974adb 100644 --- a/gnu/services/auditd.scm +++ b/gnu/services/auditd.scm @@ -31,10 +31,9 @@ (define-module (gnu services auditd) %default-auditd-configuration-directory)) (define auditd.conf - (plain-file "auditd.conf" "log_file = /var/log/audit.log\nlog_format = \ -ENRICHED\nfreq = 1\nspace_left = 5%\nspace_left_action = \ -syslog\nadmin_space_left_action = ignore\ndisk_full_action = \ -ignore\ndisk_error_action = syslog\n")) + (plain-file "auditd.conf" "log_format = ENRICHED\nfreq = 1\nspace_left = 5% \ +\nspace_left_action = syslog\nadmin_space_left_action = ignore\ +\ndisk_full_action = ignore\ndisk_error_action = syslog\n")) (define %default-auditd-configuration-directory (computed-file "auditd" @@ -50,6 +49,12 @@ (define-record-type* (default audit)) (configuration-directory auditd-configuration-configuration-directory)) ; file-like +(define (auditd-activation config) + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (mkdir-p "/var/log/audit")))) + (define (auditd-shepherd-service config) (let* ((audit (auditd-configuration-audit config)) (configuration-directory (auditd-configuration-configuration-directory config))) @@ -67,7 +72,9 @@ (define auditd-service-type (extensions (list (service-extension shepherd-root-service-type - auditd-shepherd-service))) + auditd-shepherd-service) + (service-extension activation-service-type + auditd-activation))) (default-value (auditd-configuration (configuration-directory %default-auditd-configuration-directory))))) -- 2.34.0