Skip to content

Commit

Permalink
systemd: make libaudit optional
Browse files Browse the repository at this point in the history
Expose a new `withAudit` flag (defaults to `true` for backwards compatibility) to be able to conditionally enable and disable an integration with the `libaudit` library, which is used to integrate with Linux Audit Framework for logging various security-relevant events.
  • Loading branch information
filakhtov committed Mar 8, 2023
1 parent d37221d commit 86aff5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkgs/os-specific/linux/systemd/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
, withAcl ? true
, withAnalyze ? true
, withApparmor ? true
, withAudit ? true
, withCompression ? true # adds bzip2, lz4, xz and zstd
, withCoredump ? true
, withCryptsetup ? true
Expand Down Expand Up @@ -378,7 +379,6 @@ stdenv.mkDerivation (finalAttrs: {

buildInputs =
[
audit
kmod
libxcrypt
libcap
Expand All @@ -392,6 +392,7 @@ stdenv.mkDerivation (finalAttrs: {
++ lib.optional withTests glib
++ lib.optional withAcl acl
++ lib.optional withApparmor libapparmor
++ lib.optional withAudit audit
++ lib.optional wantCurl (lib.getDev curl)
++ lib.optionals withCompression [ bzip2 lz4 xz zstd ]
++ lib.optional withCoredump elfutils
Expand Down Expand Up @@ -439,6 +440,7 @@ stdenv.mkDerivation (finalAttrs: {
"-Dtests=false"
"-Dacl=${lib.boolToString withAcl}"
"-Danalyze=${lib.boolToString withAnalyze}"
"-Daudit=${lib.boolToString withAudit}"
"-Dgcrypt=${lib.boolToString wantGcrypt}"
"-Dimportd=${lib.boolToString withImportd}"
"-Dlz4=${lib.boolToString withCompression}"
Expand Down

0 comments on commit 86aff5f

Please sign in to comment.