1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-25 19:33:18 +03:00
Commit Graph

49 Commits

Author SHA1 Message Date
Jelmer Vernooij
d0d5c1a823 r26352: Don't make lp_load create a new context. 2007-12-21 05:48:56 +01:00
Jelmer Vernooij
1e02cd8db1 r26339: Make loadparm talloc-allocated. 2007-12-21 05:48:49 +01:00
Jelmer Vernooij
d01f0f4c20 r26275: return loadparm context in lp_load. 2007-12-21 05:48:01 +01:00
Jelmer Vernooij
6cbce47a3e r26226: Avoid more uses of global_loadparm. 2007-12-21 05:47:02 +01:00
Jelmer Vernooij
3fcc960839 r25398: Parse loadparm context to all lp_*() functions. 2007-10-10 15:07:25 -05:00
Jelmer Vernooij
c62f51cc28 r25392: Add loadparm context as argument in a couple more places. 2007-10-10 15:07:24 -05:00
Jelmer Vernooij
925abf74fa r24994: Fix some C++ warnings. 2007-10-10 15:05:26 -05:00
Andrew Tridgell
fcf38a38ac r23792: convert Samba4 to GPLv3
There are still a few tidyups of old FSF addresses to come (in both s3
and s4). More commits soon.
2007-10-10 14:59:12 -05:00
Stefan Metzmacher
f65fcd764b r22622: make it possible to pass the config file via 'SMB_CONF_PATH' envvar
very usefull for make testenv!

this makes it also possible to pass a config file to smbscript

metze
2007-10-10 14:51:54 -05:00
Jelmer Vernooij
0eb6097305 r19339: Merge my 4.0-unittest branch. This adds an API for more fine-grained
output in the testsuite rather than just True or False for a
set of tests.

The aim is to use this for:
 * known failure lists (run all tests and detect tests that
						started working or started failing). This
   would allow us to get rid of the RPC-SAMBA3-* tests
 * nicer torture output
 * simplification of the testsuite system
 * compatibility with other unit testing systems
 * easier usage of smbtorture (being able to run one test
						and automatically set up the environment for that)

This is still a work-in-progress; expect more updates over the next couple of
days.
2007-10-10 14:21:12 -05:00
Jelmer Vernooij
8575e9a490 r14603: Fix building of ejs modules as shared libs
Fix calling of ejs_exception() without requiring --export-dynamic
2007-10-10 13:58:59 -05:00
Jelmer Vernooij
867fc48922 r14500: Make some more functions public 2007-10-10 13:57:34 -05:00
Jelmer Vernooij
52a2356505 r13786: [merge] Add registration functions for LDB modules
Applications that use LDB modules will now have to run ldb_global_init()
before they can use LDB.

The next step will be adding support for loading LDB modules from .so
files. This will also allow us to use one LDB without difference between the
standalone and the Samba-specific build
2007-10-10 13:52:11 -05:00
Jelmer Vernooij
44f0aba715 r12620: Get rid of automatically generated lists of init functions of subsystems.
This allows Samba libraries to be used by other projects (and parts of
Samba to be built as shared libraries).
2007-10-10 13:49:06 -05:00
Jelmer Vernooij
c92ace494f r12499: Move smb_build.h out of includes.h 2007-10-10 13:47:45 -05:00
Jelmer Vernooij
0963ab9c14 r10316: More dynconfig fixes 2007-10-10 13:38:17 -05:00
Jelmer Vernooij
7e3b94dfb9 r9722: Initial attempt at converting samba3dump to EJS.. 2007-10-10 13:34:53 -05:00
Andrew Tridgell
84c756b25c r9504: use some low level ejs hackery to give much better exception error messages in both
the web server and smbscript. We can now give backtraces for all internal asserts, not
just high level errors
2007-10-10 13:34:23 -05:00
Andrew Tridgell
acf8c8fd49 r8678: setup for gdb backtrace in 'make test' 2007-10-10 13:29:53 -05:00
Andrew Tridgell
c2691ef712 r8643: - make lp_configfile() work again
- get rid of redundeny dyn_CONFIGFILE argument to lp_load()

- fixed provisioning to work with completely pristine install,
  creating an initial smb.conf is none is present

- added lp.set() and lp.reload() to loadparm ejs object interface
2007-10-10 13:29:48 -05:00
Andrew Tridgell
57d7a585e8 r8483: switched our generated ejs rpc code over to the new OO interface. This
means we don't pollute the name space, and also makes for faster
startup times as we only create variables for the pipes that we use,
not all pipes
2007-10-10 13:23:08 -05:00
Andrew Tridgell
778bcd3738 r8452: allow for the ugly hack:
#!/bin/sh
exec smbscript "$0" ${1+"$@"}

which is needed because bloody solaris puts 'env' in /bin instead of /usr/bin

also neaten up the #! handling code.
2007-10-10 13:23:05 -05:00
Andrew Tridgell
f476e7aeec r8411: we need to use mprVarToNumber() instead of var->integer now, to cope with
the 64 bit integer support

this fixes the exit status from smbscript
2007-10-10 13:22:59 -05:00
Andrew Tridgell
52db7a052b 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
2007-10-10 13:22:39 -05:00
Tim Potter
f76a7ec2a2 r8357: Call lp_load() so we can access the various lp_functions(). 2007-10-10 13:20:11 -05:00
Andrew Tridgell
775fb56ac2 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
2007-10-10 13:20:05 -05:00
Andrew Tridgell
061e20e509 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
2007-10-10 13:19:31 -05:00
Andrew Tridgell
9c885a7edb r8276: fixed the remaining memory leaks in smbscript. We can now loop doing
lots of rpc calls without memory usage increasing.
2007-10-10 13:19:30 -05:00
Andrew Tridgell
b220756cb4 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
2007-10-10 13:19:29 -05:00
Andrew Tridgell
a61cdee384 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
2007-10-10 13:19:21 -05:00
Andrew Tridgell
a782541db3 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
2007-10-10 13:19:04 -05:00
Andrew Bartlett
990e061939 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
2007-10-10 13:18:07 -05:00
Tim Potter
564dfe14d0 r7500: Initialise module subsystems. 2007-10-10 13:18:01 -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
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
Tim Potter
54051bf8bb r7082: Call load_interfaces() in smbscript initialisation. 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