ntdll: add a warning about running wine as root
Austin English
austinenglish at gmail.com
Sat Jan 31 20:41:27 CST 2009
Been seeing it quite a bit recently in the forums. While the patches
to break using sudo/su have helped a bit, seems some users are
convinced they need to run wine as root. This adds a non fatal
message, so no functionality is lost for those that _do_ need to run
as root.
--
-Austin
-------------- next part --------------
diff --git a/dlls/ntdll/server.c b/dlls/ntdll/server.c
index 145540f..15a91fc 100644
--- a/dlls/ntdll/server.c
+++ b/dlls/ntdll/server.c
@@ -832,6 +832,12 @@ static int server_connect(void)
if (chdir( serverdir ) == -1) fatal_perror( "chdir to %s", serverdir );
}
+ /* warn about running Wine as root */
+ if (geteuid() == 0)
+ {
+ MESSAGE("You're running Wine as root. This is NOT recommended unless you absolutely need it!\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