From 6a6aac9dd37fa19db11adead264405313f795e23 Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sun, 1 Feb 2009 10:15:47 +0100 Subject: [PATCH] Added cap_sys_nice to the capabilities that are not dropped --- CONTRIBUTORS | 1 + HISTORY | 4 +++- vdr.c | 10 +++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 37abef58..0afcd6a9 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1061,6 +1061,7 @@ Rolf Ahrenberg the last replayed recording was in a subdirectory, and pressing Back for setting the thread name, so that it can be seen in 'top -H' for replacing the Finnish language code "smi" with "suo" + for adding cap_sys_nice to the capabilities that are not dropped Ralf Klueber for reporting a bug in cutting a recording if there is only a single editing mark diff --git a/HISTORY b/HISTORY index 9cb133bb..0cc1e91b 100644 --- a/HISTORY +++ b/HISTORY @@ -5979,8 +5979,10 @@ Video Disk Recorder Revision History cDevice class reimplements PlayTs() or PlayPes(), it also needs to make sure this new function works as expected. -2009-01-30: Version 1.7.5 +2009-02-01: Version 1.7.5 - Fixed a hangup when replaying a TS recording with subtitles activated (reported by Timo Helkio). - Fixed handling the 'new' indicator in the recordings menu for TS recordings. +- Added cap_sys_nice to the capabilities that are not dropped (thanks to Rolf + Ahrenberg). diff --git a/vdr.c b/vdr.c index 34ad856f..60fc11a1 100644 --- a/vdr.c +++ b/vdr.c @@ -22,7 +22,7 @@ * * The project's page is at http://www.cadsoft.de/vdr * - * $Id: vdr.c 2.4 2009/01/18 11:02:37 kls Exp $ + * $Id: vdr.c 2.5 2009/02/01 10:13:48 kls Exp $ */ #include @@ -112,10 +112,10 @@ static bool SetUser(const char *UserName, bool UserDump)//XXX name? return true; } -static bool SetCapSysTime(void) +static bool DropCaps(void) { - // drop all capabilities except cap_sys_time - cap_t caps = cap_from_text("= cap_sys_time=ep"); + // drop all capabilities except selected ones + cap_t caps = cap_from_text("= cap_sys_nice,cap_sys_time=ep"); if (!caps) { fprintf(stderr, "vdr: cap_from_text failed: %s\n", strerror(errno)); return false; @@ -387,7 +387,7 @@ int main(int argc, char *argv[]) return 2; if (!SetKeepCaps(false)) return 2; - if (!SetCapSysTime()) + if (!DropCaps()) return 2; } }