Package: redis
Severity: important
Tags: patch
X-Debbugs-Cc: yoss...@gmail.com

Hi,

A fix in Redis has changed the way it overwrites configuration files,
and instead of overwriting an existing file it will create a temporary
file and rename it over the old file.

Currently /etc/redis is not writable to 'redis', breaking CONFIG REWRITE
and SENTINEL FLUSHCONFIG.

The proposed fix is to make /etc/redis itself group writable to 'redis'.

Thanks
Yossi


-- System Information:
Debian Release: bullseye/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-1-amd64 (SMP w/8 CPU threads)
Locale: LANG=en_IL, LC_CTYPE=en_IL (charmap=UTF-8), LANGUAGE=en_IL:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages redis depends on:
pn  redis-server  <none>

redis recommends no packages.

redis suggests no packages.

*** permissions.diff
diff -Nru redis-6.0.9/debian/changelog redis-6.0.9/debian/changelog
--- redis-6.0.9/debian/changelog        2021-01-13 13:11:40.000000000 +0200
+++ redis-6.0.9/debian/changelog        2021-01-25 13:31:32.000000000 +0200
@@ -1,3 +1,10 @@
+redis (5:6.0.9-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix configuration file permission issues.
+
+ -- Yossi Gottlieb <yoss...@gmail.com>  Mon, 25 Jan 2021 13:31:32 +0200
+
 redis (5:6.0.9-2) unstable; urgency=medium
 
   * Enable systemd Type=notify support. Thanks to Michael Prokop for all his
diff -Nru redis-6.0.9/debian/redis-tools.postinst 
redis-6.0.9/debian/redis-tools.postinst
--- redis-6.0.9/debian/redis-tools.postinst     2021-01-13 13:11:40.000000000 
+0200
+++ redis-6.0.9/debian/redis-tools.postinst     2021-01-25 13:29:26.000000000 
+0200
@@ -11,17 +11,6 @@
 
        mkdir -pZ ${DIR}
 
-       case "${DIR}" in
-       /var/log/redis)
-               MODE="02750"
-               GROUP="adm"
-               ;;
-       *)
-               MODE="750"
-               GROUP="${USER}"
-               ;;
-       esac
-
        if ! dpkg-statoverride --list ${DIR} >/dev/null 2>&1
        then
                chown ${USER}:${GROUP} ${DIR}
@@ -38,8 +27,9 @@
                --group \
                ${USER} || true
 
-       Setup_dir /var/log/redis ${USER}:adm 2750
-       Setup_dir /var/lib/redis ${USER}:${USER} 750
+       Setup_dir /var/log/redis 2750 adm
+       Setup_dir /var/lib/redis 750 ${USER}
+       Setup_dir /etc/redis 2770 ${USER}
 fi
 
 #DEBHELPER#
diff -Nru redis-6.0.9/debian/redis-tools.postrm 
redis-6.0.9/debian/redis-tools.postrm
--- redis-6.0.9/debian/redis-tools.postrm       2021-01-13 13:11:40.000000000 
+0200
+++ redis-6.0.9/debian/redis-tools.postrm       2021-01-25 13:29:26.000000000 
+0200
@@ -5,7 +5,7 @@
 if [ "${1}" = "purge" ]
 then
        userdel redis || true
-       rm -rf /var/lib/redis /var/log/redis
+       rm -rf /var/lib/redis /var/log/redis /etc/redis
 fi
 
 #DEBHELPER#

Reply via email to