summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CONTRIBUTORS3
-rw-r--r--HISTORY2
-rw-r--r--vdr.c4
3 files changed, 7 insertions, 2 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 629bdceb..11a62eb1 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -1823,3 +1823,6 @@ Jurij Retzlaff <jurij@topofweb.de>
Richard Lithvall <richard@lithvall.se>
for adding a tolerance for symbol rate values that are off by one
+
+Tobias Grimm <listaccount@e-tobi.net>
+ for suggesting to use geteuid() to check whether VDR is running as user 'root'
diff --git a/HISTORY b/HISTORY
index 9ff354c1..f6687f2c 100644
--- a/HISTORY
+++ b/HISTORY
@@ -4515,3 +4515,5 @@ Video Disk Recorder Revision History
Richard Lithvall).
- Added VBITeletextDescriptorTag, TeletextDescriptorTag, LocalTimeOffsetDescriptorTag
and PremiereContentTransmissionDescriptor to 'libsi' (thanks to Marco Schlüßler).
+- Using geteuid() to check whether VDR is running as user 'root' (suggested by
+ Tobias Grimm).
diff --git a/vdr.c b/vdr.c
index 8d9ab54a..510be02c 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 1.254 2006/04/09 12:22:46 kls Exp $
+ * $Id: vdr.c 1.255 2006/04/14 11:01:18 kls Exp $
*/
#include <getopt.h>
@@ -346,7 +346,7 @@ int main(int argc, char *argv[])
// Set user id in case we were started as root:
- if (VdrUser && getuid() == 0) {
+ if (VdrUser && geteuid() == 0) {
StartedAsRoot = true;
if (strcmp(VdrUser, "root")) {
if (!SetKeepCaps(true))