[Xorp-hackers] Shell command suppport

Adam Greenhalgh adam@hiddennet.net
Fri, 20 Aug 2004 09:43:42 +0100


What permissions are you able to execute commands as ? I'd assume it was
as a normal user "ray" ? 

Much of the idea about not having the ability to access the underlying
os is that you are using a router and not a unix box. 

This may seem like a dumb question, but what are you wanting shell
access to the router when in xorpsh mode ? What is the set of tasks you
are wanting to do ? From this it maybe possible to code in the specific
functionality into xorpsh.

Adam
On Thu, 2004-08-19 at 21:15 -0700, Ray Qiu wrote:
> I made a patch to add command "shell" to the operational mode.  It
> uses system() call.
> It can be used to execute Unix shell commands.  I didn't see any
> problems even when I configured to use xorpsh as the login shell.
> Screen capture is attached.
> 
> Did I miss anything?
> 
> --Ray
> 
> On Thu, 19 Aug 2004 22:17:31 -0300, João Carlos Mendes Luís
> <jonny@jonny.eng.br> wrote:
> > In Unix, if it is a login shell, two conditions will occur:
> > 
> > - $SHELL wil be set to /path/xorpsh
> > - argv[0] of the runnig process will have a '-' as the first character
> > 
> > Both of these, especially the last, could be checked to verify if it is a login
> > shell, and decide to allow or not shell commands.
> > 
> > 
> > 
> > Atanu Ghosh wrote:
> > > If the xorpsh is installed as a login shell it may not be desirable
> > > to allow the execution of shell commands.
> > >
> > >    Atanu.
> > >
> > >
> > >>>>>>"Ray" == Ray Qiu <ray.qiu@gmail.com> writes:
> > >
> > >
> > >     Ray> Hi, Is there any particular reason that XORP doesn't support
> > >     Ray> executing shell commands from the CLI?
> > >
> > >     Ray> Thanks.
> > >
> > >     Ray> --Ray _______________________________________________
> > >     Ray> Xorp-hackers mailing list Xorp-hackers@icir.org
> > >     Ray> http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
> > > _______________________________________________
> > > Xorp-hackers mailing list
> > > Xorp-hackers@icir.org
> > > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
> > 
> > --
> > 
> >                                          Jonny
> > 
> > --
> > João Carlos Mendes Luís - Networking Engineer - jonny@jonny.eng.br
> > _______________________________________________
> > 
> > 
> > Xorp-hackers mailing list
> > Xorp-hackers@icir.org
> > http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers
> >