Re: Problems with wincfg

"David Bailey" <[email protected]>
Newsgroups gmane.comp.emulators.wine.user
Message-ID <[email protected]>
Martin Gregorie wrote:
> 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");
> exit(EACCESS);
> }
> 
> 
> Martin


Well yes - though I would prefer a dialog box - wine tends to spew out quite a few errors to the console even for working code - they tend to get ignored, and the program might not be interactive.

The point is, even when you know about the problem, it is so easy to make a mistake. For example, I use Notepad++ under wine, so I am invoking wine all the time.

David
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.