[PATCH UPDATE] tools/wineshelllink *METHOD 4*

Speeddymon speeddymon at yahoo.com
Thu Apr 25 16:46:36 CDT 2002


--- Vincent Béron <vberon at mecano.gme.usherb.ca> wrote:
> Paul Millar a écrit :
> > 
> > On Thu, 25 Apr 2002, Speeddymon wrote:
> > > +  if [ -d "/usr/lib/menu" -a "$mode" = "menu"
> -a ! `whoami` = "root" ]
> > > +  then
> > [...]
> > > +  elif [ `whoami` = "root" ]
> > > +  then
> > > +    mdk_entry >> "/usr/lib/menu/wine"
> > > +  fi
> > 
> > Sorry, I haven't been following this but isn't the
> elif condition
> > redundant?
> > 
> > Also, AFAIK although its unusual, there's no
> reason an account name cannot
> > have a space in it, so
> >  `whoami`  should be  "`whoami`"
> > 
> > [spent too much time debugging strings in scripts
> ;^]
> > 
> > ----
> > Paul Millar
> 
> Shouldn't we check for uid == 0? The common name for
> that uid is "root",
> but I don't think anything prevents you from
> changing that name to
> say... administrator, or god. But that check is
> easier to do with a C
> program than shell...
> 
> And besides, as I read in another thread about
> Mingw, shouldn't we test
> for a functionality (being able to write somewhere,
> to use a certain
> program) rather than rely on the username and
> implied permissions of it?
> 
> But maybe I'm just way off track here...
> 
> Cheers,
> Vincent
> 

you are right on track, but im going for simplicity,
most users aren't going to change root to
administrator or god, and if they do then wine won't
install for them anyways (not without some script
editing) and besides if they know how to change root's
username then they know how to add the menu items
themselves and wouldn't need a script to do it IMHO...

__________________________________________________
Do You Yahoo!?
Yahoo! Games - play chess, backgammon, pool and more
http://games.yahoo.com/



More information about the wine-patches mailing list