vdr/vdradmin/debian postrm changelog postinst rules vdradmin.init
Thomas Schmidt
pkg-vdr-dvb-changes@lists.alioth.debian.org
Tue, 04 Jan 2005 21:13:47 +0000
Update of /cvsroot/pkg-vdr-dvb/vdr/vdradmin/debian
In directory haydn:/tmp/cvs-serv7636/vdr/vdradmin/debian
Modified Files:
changelog postinst rules vdradmin.init
Added Files:
postrm
Log Message:
* run vdradmin as user vdradmin (created in postinst)
* use start-stop-daemon
* change permissions of cfgfile to 0600 in postinst
Index: postinst
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdradmin/debian/postinst,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- postinst 29 Dec 2004 22:45:24 -0000 1.3
+++ postinst 4 Jan 2005 21:13:44 -0000 1.4
@@ -9,4 +9,17 @@
test -L $TEMPLATE_DIR/English/bilder || ln -s ../Deutsch/bilder $TEMPLATE_DIR/English/bilder
test -L $TEMPLATE_DIR/French/bilder || ln -s ../Deutsch/bilder $TEMPLATE_DIR/French/bilder
+# ensure that user and group 'vdradmin' exist
+adduser --system --home /dev/null --shell /bin/false --no-create-home \
+ --disabled-login --group vdradmin > /dev/null || true
+
+# ensure that vdradmin's config has the correct owner
+[ ! -d /etc/vdradmin ] || chown -R vdradmin:vdradmin /etc/vdradmin/
+
+# change the permissions of the cfg-file to 0600
+[ ! -e /etc/vdradmin/vdradmind.conf ] || chmod 0600 /etc/vdradmin/vdradmind.conf
+
+# change the owner and group of the logfile to vdradmin
+[ ! -e /var/log/vdradmind.log ] || chown vdradmin:vdradmin /var/log/vdradmind.log
+
##DEBHELPER##
Index: vdradmin.init
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdradmin/debian/vdradmin.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- vdradmin.init 27 May 2004 14:56:51 -0000 1.1
+++ vdradmin.init 4 Jan 2005 21:13:44 -0000 1.2
@@ -5,6 +5,15 @@
#
#
+# Default Settings:
+
+# Username vdradmin should run on:
+USER=vdradmin
+
+# Group under which vdradmin shoul run on:
+GROUP=vdradmin
+
+
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=/usr/bin/vdradmind.pl
NAME=vdradmin
@@ -24,19 +33,20 @@
case "$1" in
start)
echo -n "Starting $DESC: "
- $DAEMON $DAEMON_OPTS > /dev/null 2>&1
+ start-stop-daemon --start -c $USER:$GROUP -b -m --pidfile \
+ /var/run/vdradmin.pid --exec /usr/bin/vdradmind.pl -- -nf
echo "$NAME."
;;
stop)
echo -n "Stopping $DESC: "
- $DAEMON --kill > /dev/null 2>&1
+ start-stop-daemon --stop -q -o --pidfile /var/run/vdradmin.pid
echo "$NAME."
;;
restart|force-reload)
echo -n "Restarting $DESC: "
- $DAEMON --kill > /dev/null 2>&1
- sleep 1
- $DAEMON $DAEMON_OPTS > /dev/null 2>&1
+ start-stop-daemon --stop -q -o --pidfile /var/run/vdradmin.pid
+ start-stop-daemon --start -c $USER:$GROUP -b -m --pidfile \
+ /var/run/vdradmin.pid --exec /usr/bin/vdradmind.pl -- -nf
echo "$NAME."
;;
*)
Index: rules
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdradmin/debian/rules,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- rules 18 Dec 2004 12:02:08 -0000 1.5
+++ rules 4 Jan 2005 21:13:44 -0000 1.6
@@ -14,7 +14,7 @@
clean-patched:
dh_testdir
dh_testroot
- dh_clean --exclude ./template/Deutsch/tv.html.orig
+ dh_clean
build: patch-stamp
# Nothing to build here
@@ -24,7 +24,7 @@
install:
dh_testdir
dh_testroot
- dh_clean -k --exclude ./template/Deutsch/tv.html.orig
+ dh_clean -k
# Build architecture-independent files here.
binary-indep: install
@@ -39,8 +39,6 @@
dh_link
dh_compress
dh_fixperms
- # Set Permissions of Cfg-File to Read-/Write only for Owner
- chmod 600 debian/vdradmin/etc/vdradmin/vdradmind.conf
dh_perl
dh_installdeb
dh_shlibdeps
Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdradmin/debian/changelog,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- changelog 29 Dec 2004 22:45:24 -0000 1.11
+++ changelog 4 Jan 2005 21:13:44 -0000 1.12
@@ -1,12 +1,26 @@
+vdradmin (0.96-4) unstable; urgency=low
+
+ !!! unreleased !!!
+
+ * Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
+ - From now on vdradmin will run under the user vdradmin,
+ the owner of the cfg-file will be changed in postinst
+ - Also change the permission of the cfg-file to 0600 in
+ postinst
+ - Now using start-stop-daemon in init-script
+ - Cleanup debian/rules a little bit
+
+ -- Debian VDR Team <pkg-vdr-dvb-devel@lists.alioth.debian.org> Fri, 31 Dec 2004 16:53:01 +0100
+
vdradmin (0.96-3) unstable; urgency=high
* Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de>
- Urgency high, because it fixes a security issue
- Added 02_sectmpfiles.dpatch: use File::Temp to create temporary
files, to prevent possible symlink-attacks (Closes: #287601)
- - Set permissions of /etc/vdradmin/vdradmind.conf to 600 on new
+ - Set permissions of /etc/vdradmin/vdradmind.conf to 0600 on new
installations (users with an existing installation should
- ensure that the cfg-file has a permission of 600)
+ ensure that the cfg-file has a permission of 0600)
- Changed Maintainer to Debian VDR Team
<pkg-vdr-dvb-devel@lists.alioth.debian.org>
- Added myself as uploader
@@ -30,7 +44,7 @@
- Added a comment about the shipped config-file to README.Debian
- Added a manpage for vdradmind.pl
- Link /usr/share/vdradmin/template/{English,French}/bilder to
- /usr/share/vdradmin/template/Detsch/bilder, this reduces the
+ /usr/share/vdradmin/template/Deutsch/bilder, this reduces the
size of the deb by about 50%
-- Thomas Schmidt <thomas.schmidt@in.stud.tu-ilmenau.de> Fri, 14 Aug 2004 16:18:50 +0200
--- NEW FILE: postrm ---
#!/bin/sh -e
set -e
case "$1" in
purge)
deluser vdradmin > /dev/null || true
;;
remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
;;
*)
echo "postrm called with unknown argument \`$1'" >&2
exit 1
;;
esac
##DEBHELPER##