loader: more stringent sanity check

Vitaliy Margolen wine-devel at kievinfo.com
Thu Mar 20 22:48:31 CDT 2008


Austin English wrote:
> On Thu, Mar 20, 2008 at 6:40 PM, Lei Zhang <thestig at google.com> wrote:
>>  On Ubuntu, you cannot even login as root, they'd have to run "sudo
>>  wine". On many other distros, if you login as root, you'll get a
>>  dialog warning you about it, and the desktop background will be bright
>>  red. Are people going out of their way to run Wine as root?
>>
> 
> I suspect it's more often people sudo'ing. I haven't tried it, but I
> know that Alexandre committed a fix that checks if you're running with
> sudo after the inital .wine directory is made, but I'm not sure about
> what happens if you do it initially. I.e.,
> $ wineprefixcreate
> $ sudo wine notepad # gives an error about permissions
> 
> but does:
> 
> $ rm -rf ~/.wine
> $ sudo wine notepad
> 
> give the same error (not at home or else I'd check).
> 
> Something should be done regardless, I'd personally rather see a gui
> warning each time wine is run as root without a switch, but at least
> if it is done at wineprefixcreate, then it'll catch most (and the
> permissions check should catch those that run sudo on their user's
> .wine directory). Those two efforts combined should catch most issues,
> IMHO.
> 
> 
GUI warning won't work - in some configurations root does not have $DISPLAY 
defined. So if a users logs in as a normal user then tries to do "sudo wine" 
it will be limited to text terminal only.

That btw is the main reason why we have to stop Wine from being run as a root.

Vitaliy.



More information about the wine-devel mailing list