Skip to content
Snippets Groups Projects
Commit 97d5e163 authored by Chris Morgan's avatar Chris Morgan Committed by Alexandre Julliard
Browse files

Message box to suggest the user not run wine as root.

parent bc2520b3
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <wine/debug.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include "properties.h"
#include "resource.h"
......@@ -203,6 +206,10 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nShow)
WINE_ERR("initialization failed, aborting\n");
ExitProcess(1);
}
/* is the user running as root? */
if(getuid() == 0)
MessageBox(NULL, "It is not advisable to run wine as root. Doing so may compromise the security of your computer. Please run wine as a normal user.", "Warning", MB_OK);
/*
* The next 3 lines should be all that is needed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment