From unknown Wed Jun 18 22:57:17 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#36086 <36086@debbugs.gnu.org> To: bug#36086 <36086@debbugs.gnu.org> Subject: Status: [PATCH] services: Add auditd. Reply-To: bug#36086 <36086@debbugs.gnu.org> Date: Thu, 19 Jun 2025 05:57:17 +0000 retitle 36086 [PATCH] services: Add auditd. reassign 36086 guix-patches submitter 36086 Danny Milosavljevic severity 36086 normal tag 36086 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jun 04 03:34:29 2019 Received: (at submit) by debbugs.gnu.org; 4 Jun 2019 07:34:30 +0000 Received: from localhost ([127.0.0.1]:43775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hY3xl-0007UH-96 for submit@debbugs.gnu.org; Tue, 04 Jun 2019 03:34:29 -0400 Received: from eggs.gnu.org ([209.51.188.92]:59637) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hY3xh-0007U3-Rl for submit@debbugs.gnu.org; Tue, 04 Jun 2019 03:34:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:60428) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hY3xb-00068B-Og for submit@debbugs.gnu.org; Tue, 04 Jun 2019 03:34:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45775) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hY3xY-00012M-1i for guix-patches@gnu.org; Tue, 04 Jun 2019 03:34:18 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hY3xW-0005zG-Nz for guix-patches@gnu.org; Tue, 04 Jun 2019 03:34:16 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:47562) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hY3xW-0005qC-Fo for guix-patches@gnu.org; Tue, 04 Jun 2019 03:34:14 -0400 Received: from localhost.localdomain (178.113.175.254.wireless.dyn.drei.com [178.113.175.254]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 5A88433603DF; Tue, 4 Jun 2019 09:34:08 +0200 (CEST) From: Danny Milosavljevic To: guix-patches@gnu.org Subject: [PATCH] services: Add auditd. Date: Tue, 4 Jun 2019 09:34:06 +0200 Message-Id: <20190604073406.9297-1-dannym@scratchpost.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Tags: patch Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 85.13.145.193 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: submit Cc: Danny Milosavljevic 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 (---) * gnu/services/auditd.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * doc/guix.texi (Miscellaneous Services): Document it. --- doc/guix.texi | 24 +++++++++++++++++++ gnu/local.mk | 1 + gnu/services/auditd.scm | 53 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+) create mode 100644 gnu/services/auditd.scm diff --git a/doc/guix.texi b/doc/guix.texi index c01eb3a656..5cdd631738 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -24105,6 +24105,30 @@ The Containerd package to use. @end table @end deftp =20 +@cindex Audit +@subsubheading Auditd Service + +The @code{(gnu services auditd)} module provides the following service. + +@defvr {Scheme Variable} auditd-service-type + +This is the type of the service that runs +@url{https://people.redhat.com/sgrubb/audit/,auditd}, +a daemon that track security-relevant information on your system. + +@end defvr + +@deftp {Data Type} auditd-configuration +This is the data type representing the configuration of auditd. + +@table @asis + +@item @code{audit} (default: @code{audit}) +The audit package to use. + +@end table +@end deftp + @node Setuid Programs @section Setuid Programs =20 diff --git a/gnu/local.mk b/gnu/local.mk index 55a8fcd361..9ab74a3e0f 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -501,6 +501,7 @@ GNU_SYSTEM_MODULES =3D \ %D%/services.scm \ %D%/services/admin.scm \ %D%/services/audio.scm \ + %D%/services/auditd.scm \ %D%/services/avahi.scm \ %D%/services/base.scm \ %D%/services/certbot.scm \ diff --git a/gnu/services/auditd.scm b/gnu/services/auditd.scm new file mode 100644 index 0000000000..1c3ee7d421 --- /dev/null +++ b/gnu/services/auditd.scm @@ -0,0 +1,53 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2019 Danny Milosavljevic +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (a= t +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu services auditd) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu services base) + #:use-module (gnu services shepherd) + #:use-module (gnu packages admin) + #:use-module (guix records) + #:use-module (guix gexp) + #:use-module (guix packages) + #:export (auditd-configuration + auditd-service-type)) + +; /etc/audit/audit.rules + +(define-configuration auditd-configuration + (audit + (package audit) + "Audit package.")) + +(define (auditd-shepherd-service config) + (let* ((audit (auditd-configuration-audit config))) + (list (shepherd-service + (documentation "Auditd allows you to audit file system access= es.") + (provision '(auditd)) + (start #~(make-forkexec-constructor + (list (string-append #$audit "/sbin/auditd")))) + (stop #~(make-kill-destructor)))))) + +(define auditd-service-type + (service-type (name 'auditd) + (extensions + (list + (service-extension shepherd-root-service-type + auditd-shepherd-service))) + (default-value (auditd-configuration)))) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 06 06:57:53 2019 Received: (at 36086) by debbugs.gnu.org; 6 Jun 2019 10:57:53 +0000 Received: from localhost ([127.0.0.1]:49072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYq5h-0002vr-Gs for submit@debbugs.gnu.org; Thu, 06 Jun 2019 06:57:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:43897) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYq5e-0002vd-O9 for 36086@debbugs.gnu.org; Thu, 06 Jun 2019 06:57:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43022) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hYq5U-0004MF-JS; Thu, 06 Jun 2019 06:57:42 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=43644 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hYq5J-0004Hm-26; Thu, 06 Jun 2019 06:57:35 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Danny Milosavljevic Subject: Re: [bug#36086] [PATCH] services: Add auditd. References: <20190604073406.9297-1-dannym@scratchpost.org> Date: Thu, 06 Jun 2019 12:57:25 +0200 In-Reply-To: <20190604073406.9297-1-dannym@scratchpost.org> (Danny Milosavljevic's message of "Tue, 4 Jun 2019 09:34:06 +0200") Message-ID: <87v9xjm162.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 36086 Cc: 36086@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 Danny, Danny Milosavljevic skribis: > * gnu/services/auditd.scm: New file. > * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. > * doc/guix.texi (Miscellaneous Services): Document it. [...] > +The @code{(gnu services auditd)} module provides the following service. > + > +@defvr {Scheme Variable} auditd-service-type > + > +This is the type of the service that runs > +@url{https://people.redhat.com/sgrubb/audit/,auditd}, > +a daemon that track security-relevant information on your system. ^^ =E2=80=9Ctracks=E2=80=9D Could you add a few words, like whether/how it logs events, what kind of events it tracks, etc.? > +; /etc/audit/audit.rules > + > +(define-configuration auditd-configuration > + (audit > + (package audit) > + "Audit package.")) I suppose this record could eventually be extended, right? > +(define auditd-service-type > + (service-type (name 'auditd) > + (extensions > + (list > + (service-extension shepherd-root-service-type > + auditd-shepherd-service))) > + (default-value (auditd-configuration)))) Please add a =E2=80=98description=E2=80=99. Otherwise LGTM, thanks! Ludo=E2=80=99. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 06 16:27:05 2019 Received: (at 36086-done) by debbugs.gnu.org; 6 Jun 2019 20:27:05 +0000 Received: from localhost ([127.0.0.1]:50638 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYyyX-0008Qk-BB for submit@debbugs.gnu.org; Thu, 06 Jun 2019 16:27:05 -0400 Received: from dd26836.kasserver.com ([85.13.145.193]:50802) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hYyyV-0008QS-7b for 36086-done@debbugs.gnu.org; Thu, 06 Jun 2019 16:27:04 -0400 Received: from localhost (77.117.172.47.wireless.dyn.drei.com [77.117.172.47]) by dd26836.kasserver.com (Postfix) with ESMTPSA id 85BEB33602AB; Thu, 6 Jun 2019 22:27:01 +0200 (CEST) Date: Thu, 6 Jun 2019 22:26:57 +0200 From: Danny Milosavljevic To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Subject: Re: [bug#36086] [PATCH] services: Add auditd. Message-ID: <20190606222657.0931d761@scratchpost.org> In-Reply-To: <87v9xjm162.fsf@gnu.org> References: <20190604073406.9297-1-dannym@scratchpost.org> <87v9xjm162.fsf@gnu.org> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/REYuMWzbM236QkW8hWaaqgk"; protocol="application/pgp-signature" X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 36086-done Cc: 36086-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: -1.7 (-) --Sig_/REYuMWzbM236QkW8hWaaqgk Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Ludo, On Thu, 06 Jun 2019 12:57:25 +0200 Ludovic Court=C3=A8s wrote: > I suppose this record could eventually be extended, right? Sure, but I don't know enough yet. The intended way to use the configuration in the Guix operating-system form is by default configuration--so it shouldn't limit us in the future. Thanks for the review! Pushed as commit 07023ebc1892a559cad1f80235a4afb0955b29ab. --Sig_/REYuMWzbM236QkW8hWaaqgk Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlz5dxEACgkQ5xo1VCww uqXz9gf+I201O9m1pRJat058DXrnnCjrq0N+NKWymI8pdgEplT2r8PihbGbJ0tjs KvwavgnemfsFzvFS+g0cB/P6ijPMRBvpMbrGcRbflyXNOTmtUFsUUZ10ix3XI/fT BkpEebQOgp0CIlbF6AaJ30IGSrnWWESyWuvt2EAIG8RcK3KFPI2ygakELRZeZQqS ewHkdvofcnKzlo96h8ue1er0bKjzreDQJYQRp8uZLFueNZI+h87VLKNBE7oxyZSk X3UsVjf+H/WlKPJvmozICDlYUIFeOd8yr/1eGHQE0mNhn4BvurUwEdQQThdKiCyi ZYw+QVVJ0e8gD6srpYPCmW2jiUNOGg== =2zTJ -----END PGP SIGNATURE----- --Sig_/REYuMWzbM236QkW8hWaaqgk-- From unknown Wed Jun 18 22:57:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 05 Jul 2019 11:24:06 +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