[vlc-devel] commit: Bring back reckless user proofing. ( Rémi Denis-Courmont )
git version control
git at videolan.org
Fri Jun 6 17:53:25 CEST 2008
vlc | branch: master | Rémi Denis-Courmont <rdenis at simphalempin.com> | Fri Jun 6 18:55:10 2008 +0300| [fa22e4435c9fc1d5d774567b150ba4fb587e2f1b]
Bring back reckless user proofing.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=fa22e4435c9fc1d5d774567b150ba4fb587e2f1b
---
src/vlc.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/src/vlc.c b/src/vlc.c
index 0a77e34..2ede943 100644
--- 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__
More information about the vlc-devel
mailing list