ntdll: add a warning about running wine as root (resend)
Austin English
austinenglish at gmail.com
Fri Feb 6 21:54:33 CST 2009
Didn't receive any feedback on this one last time. Been seeing this a
bit recently in the forums, so adding a warning. No actual
functionality lost.
--
-Austin
-------------- next part --------------
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index 145540f..17e685e 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -832,6 +832,13 @@ static int server_connect(void)
if (chdir( serverdir ) == -1) fatal_perror( "chdir to %s", serverdir );
}
+ /* warn about running Wine as root */
+ if (getuid() == 0)
+ {
+ MESSAGE("You are running Wine as root. You risk damaging your system by giving windows applications full access to your system!\n");
+ MESSAGE("You should run your applications as a regular user unless root permissions are absolutely needed.\n");
+ }
+
/* make sure we are at the right place */
if (stat( ".", &st ) == -1) fatal_perror( "stat %s", serverdir );
if (st.st_uid != getuid()) fatal_error( "'%s' is not owned by you\n", serverdir );
More information about the wine-patches
mailing list