vdr/vdr/debian vdr-shutdown-wrapper.c changelog rules vdr.init vdr.install vdr.postinst

Thomas Schmidt pkg-vdr-dvb-changes@lists.alioth.debian.org
Sun, 09 Jan 2005 21:37:42 +0000


Update of /cvsroot/pkg-vdr-dvb/vdr/vdr/debian
In directory haydn:/tmp/cvs-serv23865/vdr/vdr/debian

Modified Files:
	changelog rules vdr.init vdr.install vdr.postinst 
Added Files:
	vdr-shutdown-wrapper.c 
Log Message:
* added small c wrapper, which calls /usr/lib/vdr/vdr-shutdown, because setting shell-scripts setuid/setgid can not work ;-)  - this wrapper is now the default program which is called in vdr.init (not very nice, but this finally works - the c code can (and should) still be extended by some checks about the calling userid...)

Index: changelog
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/changelog,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- changelog	9 Jan 2005 14:42:45 -0000	1.70
+++ changelog	9 Jan 2005 21:37:38 -0000	1.71
@@ -27,9 +27,9 @@
     - Do not run as user root anymore, the user vdr will be created
       and the video-directory and config-files will be changed, so the
       owner/group is vdr:vdr (closes: #287899)
-    - Changed owner/group of /usr/lib/vdr/vdr-shutdown to root:vdr and
-      changed mode to 6750, so that the user vdr is able to run vdr's
-      shutdown-hooks
+    - Added vdr-shutdown.wrapper wich is set to owner/group: root:vdr and
+      mode 6750, which calls the normal vdr-shutdown-script so that the 
+      user vdr is able to run vdr's shutdown-hooks
     - Added patch from Ludwig Nussel to be able to syncronize the system-
       time via DVB, even when vdr runs as user
     - Build-depend on libcap-dev

Index: vdr.postinst
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr.postinst,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- vdr.postinst	9 Jan 2005 14:42:45 -0000	1.15
+++ vdr.postinst	9 Jan 2005 21:37:39 -0000	1.16
@@ -109,9 +109,10 @@
 	[ ! -e /var/cache/vdr ] || chown vdr:vdr /var/cache/vdr/*
 	[ ! -e /var/cache/vdr ] || chown vdr:vdr /var/cache/vdr
 
-	# make /usr/lib/vdr/vdr-shutdown setuid/setgid (owner root:vdr, mode 6750)
-	[ ! -e /usr/lib/vdr/vdr-shutdown ] || chown root:vdr /usr/lib/vdr/vdr-shutdown \
-	&& chmod 6750 /usr/lib/vdr/vdr-shutdown
+	# make /usr/lib/vdr/vdr-shutdown.wrapper setuid/setgid (owner root:vdr, mode 6750)
+	[ ! -e /usr/lib/vdr/vdr-shutdown.wrapper ] || \
+	chown root:vdr /usr/lib/vdr/vdr-shutdown.wrapper && \
+	chmod 6750 /usr/lib/vdr/vdr-shutdown.wrapper
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)

--- NEW FILE: vdr-shutdown-wrapper.c ---
int main (int argc, char *argv[]) {
   return execv("/usr/lib/vdr/vdr-shutdown", argv);
}

Index: vdr.init
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr.init,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- vdr.init	9 Jan 2005 17:48:39 -0000	1.34
+++ vdr.init	9 Jan 2005 21:37:39 -0000	1.35
@@ -8,7 +8,7 @@
 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
 NAME=vdr
 DESC="Linux Video Disk Recorder"
-VDRSHUTDOWN=/usr/lib/vdr/vdr-shutdown
+VDRSHUTDOWN=/usr/lib/vdr/vdr-shutdown.wrapper
 
 test "$ENABLED" != "0" || exit 0
 

Index: rules
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/rules,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- rules	9 Jan 2005 18:22:47 -0000	1.38
+++ rules	9 Jan 2005 21:37:38 -0000	1.39
@@ -60,6 +60,8 @@
 
 	cp newplugin vdr-newplugin
 
+	gcc -o debian/vdr-shutdown.wrapper debian/vdr-shutdown-wrapper.c
+
 	touch build-stamp
 
 patchlevel:
@@ -81,6 +83,8 @@
 	rm -rf PLUGINS/lib
 	rm -f vdr-newplugin
 	sh debian/patchlevel.sh clean
+
+	rm -f debian/vdr-shutdown.wrapper
 	
 	dh_clean
 

Index: vdr.install
===================================================================
RCS file: /cvsroot/pkg-vdr-dvb/vdr/vdr/debian/vdr.install,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- vdr.install	2 Jan 2005 17:58:43 -0000	1.9
+++ vdr.install	9 Jan 2005 21:37:39 -0000	1.10
@@ -24,8 +24,9 @@
 debian/vdr-recordingaction usr/lib/vdr/
 debian/R90.custom          etc/vdr/recording-hooks/
 
-debian/vdr-shutdown usr/lib/vdr/
-debian/S90.custom   etc/vdr/shutdown-hooks/
+debian/vdr-shutdown         usr/lib/vdr/
+debian/vdr-shutdown.wrapper usr/lib/vdr/
+debian/S90.custom           etc/vdr/shutdown-hooks/
 
 debian/lintian/vdr usr/share/lintian/overrides/