]> git.sesse.net Git - vlc/commitdiff
Bring back reckless user proofing.
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Fri, 6 Jun 2008 15:55:10 +0000 (18:55 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Fri, 6 Jun 2008 15:55:10 +0000 (18:55 +0300)
src/vlc.c

index 0a77e340c027b10d2283146950612b920df9a4a3..2ede9433e4b67ff029654d1266ec13cec7cb9369 100644 (file)
--- a/src/vlc.c
+++ b/src/vlc.c
@@ -51,6 +51,15 @@ int main( int i_argc, const char *ppsz_argv[] )
 {
     int i_ret;
 
+    if (geteuid () == 0)
+    {
+        fprintf (stderr, "VLC is not supposed to be run as root. Sorry.\n"
+        "If you need to use real-time priorities and/or privileged TCP ports\n"
+        "you can use %s-wrapper (make sure it is Set-UID root first and\n"
+        "cannot be run by non-trusted users first).\n", ppsz_argv[0]);
+        return 1;
+    }
+
     setlocale (LC_ALL, "");
 
 #ifndef __APPLE__