[Wine] Problems with wincfg

Martin Gregorie martin at gregorie.org
Mon Jun 18 15:58:05 CDT 2012

On Mon, 2012-06-18 at 15:37 -0500, David Bailey wrote:

> I don't really understand, surely the very first line of wine's main()
> could contain a test for super user - just attempt to make a directory
> inside /etc - should do, but I am sure their are neater methods.
There's a much easier way: 

if (strcmp(getenv("USER"), "root") == 0)
   if (!run_as_root_ok)
      fprintf(stderr, "Error: wine is being run as root\n");


More information about the wine-users mailing list