r1692 - in vdr/vdr/trunk/debian: . patches

Thomas Schmidt tschmidt at costa.debian.org
Mon Jan 9 19:15:13 UTC 2006


Author: tschmidt
Date: 2006-01-09 19:15:12 +0000 (Mon, 09 Jan 2006)
New Revision: 1692

Added:
   vdr/vdr/trunk/debian/patches/18_vdr-1.3.38-root-fix.dpatch
Modified:
   vdr/vdr/trunk/debian/changelog
   vdr/vdr/trunk/debian/patches/00list
Log:
vdr: Added 18_vdr-1.3.38-root-fix.dpatch

Modified: vdr/vdr/trunk/debian/changelog
===================================================================
--- vdr/vdr/trunk/debian/changelog	2006-01-09 18:41:29 UTC (rev 1691)
+++ vdr/vdr/trunk/debian/changelog	2006-01-09 19:15:12 UTC (rev 1692)
@@ -8,6 +8,7 @@
       + Updated 06_default_svdrp_port_0.dpatch
       + Removed 07_not_as_root.dpatch
       + Removed 08_security_CAN-2005-0071.dpatch
+      + Added 18_vdr-1.3.38-root-fix.dpatch
     - Do not try to install ca.conf, because it is not needed anmore
     - Removed option to set group under which vdr should run from the
       init-script

Modified: vdr/vdr/trunk/debian/patches/00list
===================================================================
--- vdr/vdr/trunk/debian/patches/00list	2006-01-09 18:41:29 UTC (rev 1691)
+++ vdr/vdr/trunk/debian/patches/00list	2006-01-09 19:15:12 UTC (rev 1692)
@@ -9,6 +9,7 @@
 13_epgfix
 15_dvbplayer
 17_replay
+18_vdr-1.3.38-root-fix
 
 # Patch needed for DVB subtitles or ttxtsubs (does not work with AC3-patch)
 # opt-21_subtitles_and_ttxtsubs

Added: vdr/vdr/trunk/debian/patches/18_vdr-1.3.38-root-fix.dpatch
===================================================================
--- vdr/vdr/trunk/debian/patches/18_vdr-1.3.38-root-fix.dpatch	2006-01-09 18:41:29 UTC (rev 1691)
+++ vdr/vdr/trunk/debian/patches/18_vdr-1.3.38-root-fix.dpatch	2006-01-09 19:15:12 UTC (rev 1692)
@@ -0,0 +1,36 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+
+## 18_vdr-1.3.38-root-fix.dpatch by Thomas Schmidt <tschmidt at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Do not try to change capabilities when running as root
+
+ at DPATCH@
+diff -urNad vdr-1.3.38/vdr.c /tmp/dpep.tm8hXN/vdr-1.3.38/vdr.c
+--- vdr-1.3.38/vdr.c	2006-01-08 12:49:03.000000000 +0100
++++ /tmp/dpep.tm8hXN/vdr-1.3.38/vdr.c	2006-01-09 20:12:03.632027750 +0100
+@@ -339,14 +339,16 @@
+ 
+   if (getuid() == 0) {
+      StartedAsRoot = true;
+-     if (!SetKeepCaps(true))
+-        return 2;
+-     if (!SetUser(VdrUser))
+-        return 2;
+-     if (!SetKeepCaps(false))
+-        return 2;
+-     if (!SetCapSysTime())
+-        return 2;
++     if (strcmp(VdrUser, "root")) {
++        if (!SetKeepCaps(true))
++           return 2;
++        if (!SetUser(VdrUser))
++           return 2;
++        if (!SetKeepCaps(false))
++           return 2;
++        if (!SetCapSysTime())
++           return 2;
++        }
+      }
+ 
+   // Help and version info:




More information about the pkg-vdr-dvb-changes mailing list