diff options
| author | phintuka <phintuka> | 2011-02-27 20:23:29 +0000 |
|---|---|---|
| committer | phintuka <phintuka> | 2011-02-27 20:23:29 +0000 |
| commit | 3443f2f70a66c0c6b40ff73af29c5f0ad541c165 (patch) | |
| tree | 3f2891780289722195c2e0fa1326c0515fcd4a68 | |
| parent | fee2db6e51a3dac97975c9d92394712475dce3ff (diff) | |
| download | xineliboutput-3443f2f70a66c0c6b40ff73af29c5f0ad541c165.tar.gz xineliboutput-3443f2f70a66c0c6b40ff73af29c5f0ad541c165.tar.bz2 | |
Do not call vdr's SetPriority() unless geteuid() == 0
| -rw-r--r-- | frontend_svr.c | 5 | ||||
| -rw-r--r-- | tools/udp_pes_scheduler.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/frontend_svr.c b/frontend_svr.c index 8121eca5..bad85d7b 100644 --- a/frontend_svr.c +++ b/frontend_svr.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: frontend_svr.c,v 1.99 2011-01-21 14:43:17 phintuka Exp $ + * $Id: frontend_svr.c,v 1.100 2011-02-27 20:23:28 phintuka Exp $ * */ @@ -1791,7 +1791,8 @@ void cXinelibServer::Action(void) pollfd pfd[MAXCLIENTS]; /* higher priority */ - SetPriority(-1); + if (geteuid() == 0) + SetPriority(-1); sched_param temp; temp.sched_priority = 2; diff --git a/tools/udp_pes_scheduler.c b/tools/udp_pes_scheduler.c index cf465354..c346aae6 100644 --- a/tools/udp_pes_scheduler.c +++ b/tools/udp_pes_scheduler.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: udp_pes_scheduler.c,v 1.54 2010-05-21 12:47:59 phintuka Exp $ + * $Id: udp_pes_scheduler.c,v 1.55 2011-02-27 20:23:29 phintuka Exp $ * */ @@ -737,7 +737,8 @@ void cUdpScheduler::Action(void) { /* UDP Scheduler needs high priority */ const int priority = -5; - SetPriority(priority); + if (geteuid() == 0) + SetPriority(priority); errno = 0; if ((nice(priority) == -1) && errno) LOGDBG("cUdpScheduler: Can't nice to value: %d", priority); |
