summaryrefslogtreecommitdiffhomepage
path: root/debian
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2016-10-22 15:46:35 -0700
committerSean Whitton <spwhitton@spwhitton.name>2016-10-22 15:46:35 -0700
commitf10c63402284ddde7d7309f2f571048b52c8b278 (patch)
tree36522a7366dc58f0d5cf767c6d9fe5c740419c47 /debian
parent07df119193e9c1e6f3a2804e87b1c6ea4644f3d8 (diff)
downloadkeysafe-f10c63402284ddde7d7309f2f571048b52c8b278.tar.gz
uid/gid keysafe -> _keysafe
Diffstat (limited to 'debian')
-rwxr-xr-x[-rw-r--r--]debian/keysafe-server.postinst4
-rwxr-xr-xdebian/keysafe-server.postrm4
-rw-r--r--debian/patches/series1
-rw-r--r--debian/patches/use-_keysafe.patch43
4 files changed, 48 insertions, 4 deletions
diff --git a/debian/keysafe-server.postinst b/debian/keysafe-server.postinst
index c459f0f..04ce1e8 100644..100755
--- a/debian/keysafe-server.postinst
+++ b/debian/keysafe-server.postinst
@@ -1,8 +1,8 @@
#!/bin/sh
-if ! getent passwd keysafe >/dev/null; then
+if ! getent passwd _keysafe >/dev/null; then
adduser --system --group --disabled-login --disabled-password \
- --home /var/lib/keysafe keysafe
+ --home /var/lib/keysafe _keysafe
chmod 700 /var/lib/keysafe
fi
diff --git a/debian/keysafe-server.postrm b/debian/keysafe-server.postrm
index 1293d92..f31defe 100755
--- a/debian/keysafe-server.postrm
+++ b/debian/keysafe-server.postrm
@@ -9,6 +9,6 @@
# without also deleting the store of shards, so we leave both the user
# and the store intact when the package is merely removed
if [ "$1" = "purge" ]; then
- userdel --remove keysafe
- groupdel keysafe
+ userdel --remove _keysafe
+ groupdel _keysafe
fi
diff --git a/debian/patches/series b/debian/patches/series
index 519c3e1..ef57f64 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
fix-spelling-errors-caught-by-lintian.patch
add-keywords-to-desktop-file.patch
fix-use-of-.IP-macro-in-manpage.patch
+use-_keysafe.patch
diff --git a/debian/patches/use-_keysafe.patch b/debian/patches/use-_keysafe.patch
new file mode 100644
index 0000000..60d499f
--- /dev/null
+++ b/debian/patches/use-_keysafe.patch
@@ -0,0 +1,43 @@
+From: Sean Whitton <spwhitton@spwhitton.name>
+Date: Sat, 22 Oct 2016 15:46:03 -0700
+Subject: use _keysafe
+
+To avoid clashes with any non-system user accounts or groups.
+
+Forwarded: not-needed
+---
+ keysafe.init | 2 +-
+ keysafe.service | 4 ++--
+ 2 files changed, 3 insertions(+), 3 deletions(-)
+ mode change 100644 => 100755 keysafe.init
+
+diff --git a/keysafe.init b/keysafe.init
+old mode 100644
+new mode 100755
+index 4aa1348..b3c3eeb
+--- a/keysafe.init
++++ b/keysafe.init
+@@ -32,7 +32,7 @@ case "$1" in
+ start-stop-daemon --start --quiet --oknodo \
+ --background --no-close \
+ --pidfile "$PIDFILE" --make-pidfile \
+- --chuid keysafe:keysafe \
++ --chuid _keysafe:_keysafe \
+ --exec "$DAEMON" -- --server $DAEMON_PARAMS \
+ > /var/log/keysafe.log
+ log_end_msg $?
+diff --git a/keysafe.service b/keysafe.service
+index 895fbcf..2e2a140 100644
+--- a/keysafe.service
++++ b/keysafe.service
+@@ -7,8 +7,8 @@ EnvironmentFile=-/etc/default/keysafe
+ ExecStart=/usr/bin/keysafe --server $DAEMON_PARAMS
+ InaccessiblePaths=/home /etc
+ ReadWritePaths=/var/lib/keysafe
+-User=keysafe
+-Group=keysafe
++User=_keysafe
++Group=_keysafe
+ StandardInput=null
+ StandardOutput=journal
+ StandardError=journal