1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-06 08:23:50 +03:00
Commit Graph

230 Commits

Author SHA1 Message Date
Tim Potter
a55e40651d r7422: Create a ejs object to wrap a smbcli_transport pointer. 2007-10-10 13:17:51 -05:00
Tim Potter
8062e808ef r7351: Start of ejs smb client library. I need to figure out a nice API here
that doesn't expose too much of the cifs protocol but still allows
people to do neat things.

Also, talloc lifetimes need to be thought about properly.
2007-10-10 13:17:45 -05:00
Tim Potter
ada0045957 r7350: Remove unused label. 2007-10-10 13:17:45 -05:00
Simo Sorce
ddd7454cb3 r7268: allocate the strings to avoid them disappearing under our feet 2007-10-10 13:17:34 -05:00
Simo Sorce
41bae267e2 r7267: REMOTE_HOST is a better choice 2007-10-10 13:17:34 -05:00
Tim Potter
b086768589 r7266: Split the different types of js function defines into separate files,
as there are going to be a lot more of them.
2007-10-10 13:17:34 -05:00
Tim Potter
c77a232b11 r7263: Exit smbscript with the intepreter return value (defaults to 0).
Change the exit value for an exception, usage error and other non-js
errors to 127 which is kinda like the return value for the system(3)
function.
2007-10-10 13:17:33 -05:00
Tim Potter
4b775c619b r7262: Add a length property to ARGV array. 2007-10-10 13:17:33 -05:00
Tim Potter
1a4a549317 r7261: Pass by reference is done in js via MPR_TYPE_OBJECT. Update argument
parsing and example for resolveName().
2007-10-10 13:17:33 -05:00
Tim Potter
aef99859f2 r7255: Change syntax of resolveName() js function to be more like the
resolve_name() C function.  I can't figure out how to return variables
by reference though.  Writing to argv[] doesn't seem to work.
2007-10-10 13:17:32 -05:00
Tim Potter
2fa6f7bb2b r7254: Add a mprWERROR() function with the same attributes as mprNTSTATUS. 2007-10-10 13:17:32 -05:00
Simo Sorce
8a98572a3b r7238: Add pam auth support in swat 2007-10-10 13:17:30 -05:00
Tim Potter
d81d5f8317 r7225: Create a MprVar object from a NTSTATUS, e.g:
res: {
  is_err: true,
  is_ok: false,
  errstr: "NT_STATUS_IO_TIMEOUT",
  v: -1073741643
}
2007-10-10 13:17:28 -05:00
Tim Potter
31b9fadbed r7223: Advance script past interpreter line. 2007-10-10 13:17:27 -05:00
Tim Potter
14a2053c04 r7215: Convert smbscript to use ejsEvalScript() and file_load() instead of
ejsEvalFile().

Still need to add advancement of the script past the hash-bang line but
it's home time now!!
2007-10-10 13:17:27 -05:00
Andrew Tridgell
29ab4cc6cb r7135: make typeof() complient with ECMA 11.4.3 2007-10-10 13:17:21 -05:00
Tim Potter
6911e46c6a r7083: Add a ejs hook to the resolve_name() function.
We need to figure out what the best way to return NTSTATUS codes.  In the
Python wrappers I threw an exception which could be caught by some code,
but I'm not sure whether this is possible in ejs.
2007-10-10 13:17:14 -05:00
Tim Potter
54051bf8bb r7082: Call load_interfaces() in smbscript initialisation. 2007-10-10 13:17:13 -05:00
Tim Potter
790a46f53b r7081: Add mprToInt() function. 2007-10-10 13:17:13 -05:00
Tim Potter
fcf177c86e r7080: Fix typo in error message. 2007-10-10 13:17:13 -05:00
Andrew Tridgell
45ea1b6441 r7078: - fix an uninitialised variable in smbscript
- fixed handle passing in the smb/ejs interface calls, so they can be called
  safely from esp
2007-10-10 13:17:13 -05:00
Andrew Tridgell
3db568eb6b r7075: added support for ARGV[] in ejs scripts 2007-10-10 13:17:12 -05:00
Andrew Tridgell
92f85507df r7074: we should load all shares in smbscript 2007-10-10 13:17:12 -05:00
Andrew Tridgell
e59ae64f60 r7072: moved the esp hooks calls to the ejs level, so we can call them from
both esp scripts and ejs scripts. This allows the smbscript program to
call all the existing extension calls like lpGet() and ldbSearch()

Also fixed smbscript to load smb.conf, and setup logging for DEBUG()

I left the unixAuth() routine in web_server/calls.c at the moment, as
that is really only useful for esp scripts. I imagine that as we
extend esp/ejs, we will put some functions in scripting/ejs/ for use
in both ejs and esp, and some functions in web_server/ where they will
only be accessed by esp web scripts
2007-10-10 13:17:12 -05:00
Volker Lendecke
06d27a1921 r7069: Add a little usage message to smbscript and fix a compiler warning. My
compiler still complains about "handle" (scripting/ejs/smbscrip.c:46) possibly
not being initialized and to me this looks true.

Running smbscript with the trivial write("Hello, world\n"); also leaves some
memory around.

Volker
2007-10-10 13:17:11 -05:00
Tim Potter
f2e59d3adf r7066: Rename http_exception to ejs_exception. 2007-10-10 13:17:11 -05:00
Tim Potter
b83dc8fbfb r7065: Move ejs from web_server to lib so it can be shared with smbscript. 2007-10-10 13:17:11 -05:00
Tim Potter
805b6c7cf0 r7064: Clean up handle parameter passing after peeking at tridge's ejstest.c 2007-10-10 13:17:11 -05:00
Tim Potter
5e2458ae6c r7063: Do error checking on the ejs functions.
Tridge says there is a bug in defining per-engine CFunction's so move
calls to ejsDefineStringCFunction() above the ejsOpenEngine() call.

Test script now works!
2007-10-10 13:17:10 -05:00
Tim Potter
3444cd5429 r7061: A ejs scripting client. This should allow javascript to be run in a
command line environment instead of inside the web server.

It doesn't work yet though, rather an exception is thrown when trying
to call ejsDefineStringCFunction().
2007-10-10 13:17:10 -05:00