1
0
mirror of https://github.com/samba-team/samba.git synced 2025-07-08 16:59:09 +03:00
Commit Graph

26 Commits

Author SHA1 Message Date
adbb1612c1 r8399: move the ejs and esp code closer to the directory layout used by the
upstream sources. This makes it much easier to keep it up to date.

I will separate out the mpr code into lib/appweb/mpr next
(This used to be commit 52db7a052b)
2007-10-10 13:22:39 -05:00
6b38e62f0a r8357: Call lp_load() so we can access the various lp_functions().
(This used to be commit f76a7ec2a2)
2007-10-10 13:20:11 -05:00
f583a85d4d r8316: give full access to the popt command line parsing in ejs scripts, including
access to the samba common options. For example:

ok = GetOptions(ARGV, options,
		"POPT_AUTOHELP",
		"POPT_COMMON_SAMBA",
		"myopt=s",
		"intopt=i",
		"noopt");

this allows scripts to support their own extended options properly
(This used to be commit 775fb56ac2)
2007-10-10 13:20:05 -05:00
056096c30b r8284: - fixed some uninitialised variables in the irpc code
- added code to send multiple irpc calls in parallel, to all servers
  that have registered the given name, with output going in
  io.results[i]. This allows you to make rpc calls to multiple servers
  at once, which is needed for clients like smbstatus
(This used to be commit 061e20e509)
2007-10-10 13:19:31 -05:00
60ec75cbc7 r8276: fixed the remaining memory leaks in smbscript. We can now loop doing
lots of rpc calls without memory usage increasing.
(This used to be commit 9c885a7edb)
2007-10-10 13:19:30 -05:00
76ecf81428 r8273: fixed some memory leaks in smbscript. This required converting
file_load() to use talloc, which impacted quite a few bits of code,
including our smb.conf processing.

took the opportunity to remove the gloabls in params.c while doing this
(This used to be commit b220756cb4)
2007-10-10 13:19:29 -05:00
c11204339a r8220: added auto-generation of ENUM constants in ejs wrapper. So we can now use the enum name
instead of a integer in ejs scripts making rpc calls
(This used to be commit a61cdee384)
2007-10-10 13:19:21 -05:00
643e5d8239 r8069: the beginnings of code to allow rpc calls to be made from ejs
tpot, note that this shows how you can modify passed in MprVar
variables in C call
(This used to be commit a782541db3)
2007-10-10 13:19:04 -05:00
00e2b7c1b4 r7530: Simply calling convention of lp_load().
This always loads all the services, as we now don't have an easy way
to split out smbd.

Andrew Bartlett
(This used to be commit 990e061939)
2007-10-10 13:18:07 -05:00
9e555f75e2 r7500: Initialise module subsystems.
(This used to be commit 564dfe14d0)
2007-10-10 13:18:01 -05:00
32f2e9806b 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.
(This used to be commit c77a232b11)
2007-10-10 13:17:33 -05:00
d6555cadb7 r7262: Add a length property to ARGV array.
(This used to be commit 4b775c619b)
2007-10-10 13:17:33 -05:00
c1b95bd467 r7223: Advance script past interpreter line.
(This used to be commit 31b9fadbed)
2007-10-10 13:17:27 -05:00
afeaf137c4 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!!
(This used to be commit 14a2053c04)
2007-10-10 13:17:27 -05:00
520e2258c9 r7082: Call load_interfaces() in smbscript initialisation.
(This used to be commit 54051bf8bb)
2007-10-10 13:17:13 -05:00
0b2f972c8a r7080: Fix typo in error message.
(This used to be commit fcf177c86e)
2007-10-10 13:17:13 -05:00
09e00bbdc1 r7078: - fix an uninitialised variable in smbscript
- fixed handle passing in the smb/ejs interface calls, so they can be called
  safely from esp
(This used to be commit 45ea1b6441)
2007-10-10 13:17:13 -05:00
f477a74129 r7075: added support for ARGV[] in ejs scripts
(This used to be commit 3db568eb6b)
2007-10-10 13:17:12 -05:00
8f84f7cdec r7074: we should load all shares in smbscript
(This used to be commit 92f85507df)
2007-10-10 13:17:12 -05:00
8754c793bf 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
(This used to be commit e59ae64f60)
2007-10-10 13:17:12 -05:00
21f3a3921c 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
(This used to be commit 06d27a1921)
2007-10-10 13:17:11 -05:00
7756b990f3 r7066: Rename http_exception to ejs_exception.
(This used to be commit f2e59d3adf)
2007-10-10 13:17:11 -05:00
14ade23914 r7065: Move ejs from web_server to lib so it can be shared with smbscript.
(This used to be commit b83dc8fbfb)
2007-10-10 13:17:11 -05:00
de850cb754 r7064: Clean up handle parameter passing after peeking at tridge's ejstest.c
(This used to be commit 805b6c7cf0)
2007-10-10 13:17:11 -05:00
e95c8f1911 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!
(This used to be commit 5e2458ae6c)
2007-10-10 13:17:10 -05:00
f52a740215 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().
(This used to be commit 3444cd5429)
2007-10-10 13:17:10 -05:00