1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-13 13:18:06 +03:00
Commit Graph

28 Commits

Author SHA1 Message Date
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
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
797d9cf0c7 r8358: Return an error message if js include path not set instead of silently
failing.
2007-10-10 13:20:11 -05:00
Andrew Tridgell
28c1a1f3c0 r8337: - use 64 bit access functions in ejs calls
- added access to smbd random functions

- fixed ordering in join()

- added sys_interfaces(), sys_hostname(), sys_nttime() and sys_ldaptime()
2007-10-10 13:20:07 -05:00
Andrew Tridgell
570f071b15 r8320: make sure all our returned objects are full objects, which means they
have the toString() and valueOf() default attributes

this allows all our returned objects to be used in logical expressions
2007-10-10 13:20:06 -05:00
Andrew Tridgell
1517ad490d r8318: added a bunch more ejs calls.
getgr*()
  getpw*()
  strlower()
  strupper()
  IfaceList()
2007-10-10 13:20:06 -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
ff60529ba2 r8297: add libinclude() function in ejs, which is like include() but searches a js library
path set in "js include" in smb.conf.

This will allow us to start building up a library of common js code,
while avoiding the problem of hard-coding include paths in scripts
2007-10-10 13:19:32 -05:00
Andrew Tridgell
6961fe2905 r8296: - split out the ejs auth functions into a separate file
- got rid of the one line ejs_returnlist()
2007-10-10 13:19:32 -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
ad1a4802d0 r8254: fixed a valgrind error in the unix auth code 2007-10-10 13:19:26 -05:00
Andrew Tridgell
e1cfc6d032 r8230: prevent authentication dying on a NULL domain 2007-10-10 13:19:22 -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 Tridgell
3a3025485b r7633: this patch started as an attempt to make the dcerpc code use a given
event_context for the socket_connect() call, so that when things that
use dcerpc are running alongside anything else it doesn't block the
whole process during a connect.

Then of course I needed to change any code that created a dcerpc
connection (such as the auth code) to also take an event context, and
anything that called that and so on .... thus the size of the patch.

There were 3 places where I punted:

  - abartlet wanted me to add a gensec_set_event_context() call
    instead of adding it to the gensec init calls. Andrew, my
    apologies for not doing this. I didn't do it as adding a new
    parameter allowed me to catch all the callers with the
    compiler. Now that its done, we could go back and use
    gensec_set_event_context()

  - the ejs code calls auth initialisation, which means it should pass
    in the event context from the web server. I punted on that. Needs fixing.

  - I used a NULL event context in dcom_get_pipe(). This is equivalent
    to what we did already, but should be fixed to use a callers event
    context. Jelmer, can you think of a clean way to do that?

I also cleaned up a couple of things:

 - libnet_context_destroy() makes no sense. I removed it.

 - removed some unused vars in various places
2007-10-10 13:18:15 -05:00
Tim Potter
8574f64ca2 r7477: Add MPR_TYPE_PTR to ejs_typeof(). 2007-10-10 13:17:57 -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
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
Simo Sorce
8a98572a3b r7238: Add pam auth support in swat 2007-10-10 13:17:30 -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
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
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