[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: sudo and shell builtins



also sprach Thanasis Kinias <tkinias@optimalco.com> [2002.08.03.0041 +0200]:
> > When sudo finished, permissions will be dropped. what good is a shell
> > that might have `pwd` set to a non-permitted resource, but not be able
> > to do anything with it since it's administratively prohibited?
> 
> I can do 'sudo ls', 'sudo tail _file_', etc.

yup. but you can't do cd'ing as it changes the current shell, which
doesn't have root privileges. ls'ing a dir is not a problem as it
doesn't change the shell, just temporarily it gets a directory
listing with root privs, then prints that, then it's over. a cd call
leaves you in another directory. what if the root privileges allow the
cd into a specific dir? if your regular privs don't allow a cd into
that dir, you'll be left in that directory without rights.

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:"; net@madduck
  
al telefono: "pronto?  cantina sociale?".  "hic!".

Attachment: pgpMnK66en5tO.pgp
Description: PGP signature


Reply to: