r439 - in vdr/vdr/branches/sarge/debian: . patches

Tobias Grimm pkg-vdr-dvb-changes@lists.alioth.debian.org
Sun, 10 Apr 2005 19:15:18 +0000


Author: tiber-guest
Date: 2005-04-10 19:15:17 +0000 (Sun, 10 Apr 2005)
New Revision: 439

Modified:
   vdr/vdr/branches/sarge/debian/changelog
   vdr/vdr/branches/sarge/debian/patches/07_not_as_root.dpatch
   vdr/vdr/branches/sarge/debian/plugin-loader.sh
Log:
vdr(sarge): fixed bug with --allow-root

Modified: vdr/vdr/branches/sarge/debian/changelog
===================================================================
--- vdr/vdr/branches/sarge/debian/changelog	2005-04-10 16:00:21 UTC (rev 438)
+++ vdr/vdr/branches/sarge/debian/changelog	2005-04-10 19:15:17 UTC (rev 439)
@@ -1,3 +1,11 @@
+vdr (1.2.6-12) unstable; urgency=low
+
+  * Tobias Grimm <tg@e-tobi.net>
+    - Don't restrict root capabilities with --allow-root anymore
+    - Passing $OPTIONS to binary compatibility test in plugin loader now
+
+ -- Tobias Grimm <tg@e-tobi.net>  Sun, 10 Apr 2005 17:00:24 +0200
+
 vdr (1.2.6-11) unstable; urgency=low
 
   * Tobias Grimm <tg@e-tobi.net> 

Modified: vdr/vdr/branches/sarge/debian/patches/07_not_as_root.dpatch
===================================================================
--- vdr/vdr/branches/sarge/debian/patches/07_not_as_root.dpatch	2005-04-10 16:00:21 UTC (rev 438)
+++ vdr/vdr/branches/sarge/debian/patches/07_not_as_root.dpatch	2005-04-10 19:15:17 UTC (rev 439)
@@ -2,13 +2,13 @@
 ## 07_not_as_root.dpatch by Thomas Schmidt <tschmidt@debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: Refuse to run vdr as user root, except when using the 
-## DP: --allow-root option
+## DP: Refuse to run vdr as user root (Note: This patch requires the
+## DP: Don't allow vdr to be run as root
 
 @DPATCH@
-diff -urNad vdr/vdr.c /tmp/dpep.pru8wM/vdr/vdr.c
---- vdr/vdr.c	2005-04-09 11:33:32.000000000 +0200
-+++ /tmp/dpep.pru8wM/vdr/vdr.c	2005-04-09 11:34:17.000000000 +0200
+diff -urNad vdr/vdr.c /tmp/dpep.Qz74kG/vdr/vdr.c
+--- vdr/vdr.c	2005-04-10 15:51:35.000000000 +0200
++++ /tmp/dpep.Qz74kG/vdr/vdr.c	2005-04-10 15:53:03.000000000 +0200
 @@ -35,6 +35,7 @@
  #include <grp.h>
  #include <sys/capability.h>
@@ -77,7 +77,7 @@
          if (DisplayHelp)
             printf("Plugins: vdr -P\"name [OPTIONS]\"\n\n");
          for (int i = 0; ; i++) {
-@@ -394,6 +417,17 @@
+@@ -394,9 +417,20 @@
       return 0;
       }
  
@@ -94,4 +94,8 @@
 +  
    // Only try to change capabilities/user when vdr is called by 
    // root
-   if (!getuid () || !getgid () || !geteuid () || !getegid ()) {
+-  if (!getuid () || !getgid () || !geteuid () || !getegid ()) {
++  if (!IsAllowRootAnyway && (!getuid () || !getgid () || !geteuid () || !getegid ())) {
+      	if(username && set_keepcaps() != 0)
+     		return 2;
+ 

Modified: vdr/vdr/branches/sarge/debian/plugin-loader.sh
===================================================================
--- vdr/vdr/branches/sarge/debian/plugin-loader.sh	2005-04-10 16:00:21 UTC (rev 438)
+++ vdr/vdr/branches/sarge/debian/plugin-loader.sh	2005-04-10 19:15:17 UTC (rev 439)
@@ -47,7 +47,7 @@
 
         # move not startable plugins to $leftout2
         for (( i=${#installed_plugins[@]}, i-- ; i >= 0 ; i-- )); do
-            if ! /usr/bin/vdr -u $USER -g $GROUP -V -L $PLUGIN_DIR -P ${installed_plugins[$i]} \
+            if ! /usr/bin/vdr -u $USER -g $GROUP $OPTIONS -V -L $PLUGIN_DIR -P ${installed_plugins[$i]} \
                 2>/dev/null | grep -q "^${installed_plugins[$i]} "; then
                 leftout2="${leftout2} ${installed_plugins[$i]}"
                 unset installed_plugins[$i]