upstream/openstack/barbican/debian/deb_patches/0003-Create-barbican-user-g...

56 lines
1.9 KiB
Diff

From a729c3af80ec8b045ba8f04dfb7db4c90ab8b9c5 Mon Sep 17 00:00:00 2001
From: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Date: Thu, 31 Mar 2022 18:31:00 +0300
Subject: [PATCH 3/3] Create barbican user, group, log dir
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
---
debian/barbican-common.dirs | 1 +
...{barbican-common.posinst => barbican-common.postinst} | 9 +--------
2 files changed, 2 insertions(+), 8 deletions(-)
create mode 100644 debian/barbican-common.dirs
rename debian/{barbican-common.posinst => barbican-common.postinst} (52%)
diff --git a/debian/barbican-common.dirs b/debian/barbican-common.dirs
new file mode 100644
index 0000000..3a4ef46
--- /dev/null
+++ b/debian/barbican-common.dirs
@@ -0,0 +1 @@
+/var/log/barbican
diff --git a/debian/barbican-common.posinst b/debian/barbican-common.postinst
similarity index 52%
rename from debian/barbican-common.posinst
rename to debian/barbican-common.postinst
index 9cf6a4c..bcf54d1 100644
--- a/debian/barbican-common.posinst
+++ b/debian/barbican-common.postinst
@@ -2,8 +2,6 @@
set -e
-set -e
-
if [ "$1" = "configure" ]; then
if ! getent group barbican > /dev/null 2>&1; then
addgroup --system barbican >/dev/null
@@ -13,14 +11,9 @@ if [ "$1" = "configure" ]; then
adduser --system --home /var/lib/barbican --ingroup barbican --no-create-home --shell /bin/false barbican
fi
- chown barbican:adm /var/log/barbican
+ chown barbican:barbican /var/log/barbican
chmod 0750 /var/log/barbican
- find /etc/barbican -exec chown root:barbican "{}" +
- find /etc/barbican -type f -exec chmod 0640 "{}" + -o -type d -exec chmod 0750 "{}" +
-
- find /var/lib/barbican -exec chown barbican:barbican "{}" +
- find /var/lib/barbican -type f -exec chmod 0640 "{}" + -o -type d -exec chmod 0750 "{}" +
fi
#DEBHELPER#
--
2.30.0