forked from Mirrors/wine-wine
Message box to suggest the user not run wine as root.
parent
bc2520b3b7
commit
97d5e1638f
|
@ -29,6 +29,9 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <wine/debug.h>
|
#include <wine/debug.h>
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "properties.h"
|
#include "properties.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
@ -203,6 +206,10 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrev, LPSTR szCmdLine, int nShow)
|
||||||
WINE_ERR("initialization failed, aborting\n");
|
WINE_ERR("initialization failed, aborting\n");
|
||||||
ExitProcess(1);
|
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
|
* The next 3 lines should be all that is needed
|
||||||
|
|
Loading…
Reference in New Issue