Future and plans for libnet? Why 'all the way with ejs'?

tridge at samba.org tridge at samba.org
Sun Jul 10 01:29:22 GMT 2005


Rafal,

 > You mean command line interfaces powered by ejs ?

I don't mind if the net tool stays in C or is converted to ejs, thats
up to you as the maintainer of that tool.

but I would like to see some new tools written in ejs. For example,
I think smbstatus should be written in ejs, and if we want a rpcclient
like tool then ejs makes a lot of sense for that. I think I mentioned
at least smbstatus in ejs when I talked about the design of the
management code a few weeks ago, and that has been one of the goals of
my current work (along with ejs functions for monitoring tasks in the
web server).

I also think it would make a lot of sense for smbclient to be written
in ejs. The current smbclient code isn't very nice, and it would
certainly be a huge bonus for it to be scriptable, and to be easily
extendable with new commands.

To make that work we would need to do this:

 - add a readline() extension call in ejs, just like we have added
   many other C calls in scripting/ejs/

 - write ejs functions smbclient_get(), smbclient_put(),
   smbclient_ls() etc, one for each smbclient command.

 - the smbclient ejs script would call readline() to get a command
   line, then would just call smbclient_$FUNC($args) after parsing the
   line.

I won't do the conversion of smbclient myself just yet, as its not
critical for a first release of Samba4 so it isn't a priority for me,
but if someone else wants to take it on then that would be great.

Cheers, Tridge


More information about the samba-technical mailing list