Package: systemd
Version: 204-5
Severity: wishlist
Tags: patch

Hi,
attached patch adds the systemd-journal group by default so one doesn't
have to create it explicitly in order to add user to it. This makes it
simpler to enable users to read all logs.
Cheers,
 -- Guido
>From 6c7e12bffeeb353711dd77787dc54babc2a78725 Mon Sep 17 00:00:00 2001
Message-Id: <6c7e12bffeeb353711dd77787dc54babc2a78725.1380197648.git....@sigxcpu.org>
From: =?UTF-8?q?Guido=20G=C3=BCnther?= <a...@sigxcpu.org>
Date: Thu, 26 Sep 2013 14:13:24 +0200
Subject: [PATCH] Add systemd-journal group

Users in this group are allowed to see system messages and messages from
other uses.
---
 debian/systemd.postinst | 4 ++++
 debian/systemd.postrm   | 4 ++++
 2 files changed, 8 insertions(+)

diff --git a/debian/systemd.postinst b/debian/systemd.postinst
index c4e2d62..8497d98 100644
--- a/debian/systemd.postinst
+++ b/debian/systemd.postinst
@@ -80,6 +80,10 @@ fi
 
 systemd-machine-id-setup
 
+if ! getent group systemd-journal >/dev/null; then
+        addgroup --system systemd-journal
+fi
+
 # initial update of the Message Catalogs database
 _update_catalog
 
diff --git a/debian/systemd.postrm b/debian/systemd.postrm
index f764cdc..8ecfdda 100644
--- a/debian/systemd.postrm
+++ b/debian/systemd.postrm
@@ -6,6 +6,10 @@ case "$1" in
     purge)
         rm -f /var/lib/systemd/catalog/database
         rmdir --ignore-fail-on-non-empty /var/lib/systemd/catalog 2> /dev/null || true
+
+        if getent group systemd-journal >/dev/null; then
+                delgroup systemd-journal || true
+        fi
     ;;
 esac
 
-- 
1.8.4.rc3

Reply via email to