summaryrefslogtreecommitdiff
path: root/vdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'vdr.c')
-rw-r--r--vdr.c10
1 files changed, 5 insertions, 5 deletions
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 <getopt.h>
@@ -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;
}
}