Package: runit
Version: 2.1.2-25helpers1
Severity: normal
Tags: patch

Hi,

I've just find out about #919296, so I realised that runit's update-service
(used in git-daemon maint scripts) is using a different path for supervise
directory.
In the attached patch i'm changing that path to be consistent with the one
used by dh-runit (both service and log).

But also I spot another difference:
a directory inside supervise created by dh-runit has mode 755 while the one
created by runsv (with update-service) has mode 700.
For example:
# ls -l /var/lib/supervise/ | grep elogind
drwx------ 2 root root 4096 Mar 15 19:11 elogind
drwx------ 2 root root 4096 Mar 15 19:11 elogind.log

# ls -l /var/lib/runit/supervise/ | grep getty-tty2
drwxr-xr-x 2 root root 4096 Mar 15 19:11 getty-tty2

With mode 755 both the pid file and the stat file are world readable..
Maybe mode 700 is safer?

Thanks,
Lorenzo


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

Kernel: Linux 4.20.3-van (SMP w/4 CPU cores; PREEMPT)
Kernel taint flags: TAINT_OOT_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: runit (via /run/runit.stopit)

Versions of packages runit depends on:
ii  libc6           2.28-8
ii  runit-helper    2.8.9
ii  sysuser-helper  1.3.3

Versions of packages runit recommends:
ii  runit-init  2.1.2-25helpers1

runit suggests no packages.

-- Configuration Files:
/etc/runit/3 changed [not included]

-- no debconf information
>From 365ed42d2e6840cd531d534bb94c27d12f7ee39d Mon Sep 17 00:00:00 2001
From: Lorenzo Puliti <lorenzo.r...@gmail.com>
Date: Thu, 14 Mar 2019 22:29:41 +0100
Subject: [PATCH] Change the supervise path in update-service

Change the supervise directory path of update-service
to be consistent with the path used in dh-runit.
---
 debian/contrib/update-service | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/debian/contrib/update-service b/debian/contrib/update-service
index 01d10da..7e72501 100644
--- a/debian/contrib/update-service
+++ b/debian/contrib/update-service
@@ -63,11 +63,11 @@ case "$opt" in
     if test "${svdir#/etc/}" != "$svdir"; then
       if test ! -h "$svdir"/supervise; then
         rm -rf "$svdir"/supervise
-        ln -s /var/lib/supervise/"$sv" "$svdir"/supervise
+        ln -s /var/lib/runit/supervise/"$sv" "$svdir"/supervise
       fi
       if test -d "$svdir"/log && test ! -h "$svdir"/log/supervise; then
         rm -rf "$svdir"/log/supervise
-        ln -s /var/lib/supervise/"$sv".log "$svdir"/log/supervise
+        ln -s /var/lib/runit/log/supervise/"$sv" "$svdir"/log/supervise
       fi
     fi
     ln -s "$svdir" "$servicedir"/"$sv"
-- 
2.20.1

Reply via email to