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

This commit is contained in:
Chris Morgan 2004-03-15 20:10:14 +00:00 committed by Alexandre Julliard
parent bc2520b3b7
commit 97d5e1638f

View File

@ -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