summaryrefslogtreecommitdiffstats
path: root/source/scripting
Commit message (Collapse)AuthorAgeFilesLines
...
* r8452: allow for the ugly hack:Andrew Tridgell2005-07-141-9/+9
| | | | | | | | | #!/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.
* r8445: if a system doesn't have "nogroup" then try "nobody"Andrew Tridgell2005-07-141-1/+1
|
* r8411: we need to use mprVarToNumber() instead of var->integer now, to cope withAndrew Tridgell2005-07-131-1/+1
| | | | | | the 64 bit integer support this fixes the exit status from smbscript
* r8406: make sure we give an error in ldbAdd() if any record failsAndrew Tridgell2005-07-131-0/+1
|
* r8399: move the ejs and esp code closer to the directory layout used by theAndrew Tridgell2005-07-1316-16/+16
| | | | | | 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
* r8394: Make sure the argument to ctype is*(3) macros are unsigned char asLove Hörnquist Åstrand2005-07-121-1/+1
| | | | required by ISO C99.
* r8372: - split out provisioning logic into a separate ejs libraryAndrew Tridgell2005-07-122-0/+237
| | | | - added a provisioning web page
* r8358: Return an error message if js include path not set instead of silentlyTim Potter2005-07-121-0/+1
| | | | failing.
* r8357: Call lp_load() so we can access the various lp_functions().Tim Potter2005-07-121-0/+2
|
* r8355: - added a vsprintf() functionAndrew Tridgell2005-07-122-0/+44
| | | | | - removed the --outputdir option from provision, as its not used any more (as ejs knows the real paths)
* r8340: - added sys_gmtime()Andrew Tridgell2005-07-1210-234/+236
| | | | | | | | | | | | | | - added sys_unlink() - added sys_file_load() and sys_file_save() - use mprString() instead of mprCreateStringVar() to cope with NULL strings - removed smbcalls_irpc.c as its not needed any more - allow ldbAdd() and ldbModify() to take multiple ldif records - added a sprintf() function to ejs. Quite complex, but very useful!
* r8339: added ldbAdd(), ldbModify(), ldbDelete() and ldbRename() to ejs ldb ↵Andrew Tridgell2005-07-121-0/+144
| | | | functions
* r8338: - added a substitute_var() js library function for doing hash drivenAndrew Tridgell2005-07-121-0/+29
| | | | | | substitution of variables in strings - the js provision script now correctly processes provision.ldif
* r8337: - use 64 bit access functions in ejs callsAndrew Tridgell2005-07-129-23/+230
| | | | | | | | - added access to smbd random functions - fixed ordering in join() - added sys_interfaces(), sys_hostname(), sys_nttime() and sys_ldaptime()
* r8333: merged with latest upstream ejs sourcesAndrew Tridgell2005-07-114-12/+9
|
* r8331: added split(), join() and FileLoad() functions to ejs.Andrew Tridgell2005-07-111-0/+103
| | | | this gets me most of the way through a ejs provision script
* r8320: make sure all our returned objects are full objects, which means theyAndrew Tridgell2005-07-117-16/+23
| | | | | | have the toString() and valueOf() default attributes this allows all our returned objects to be used in logical expressions
* r8318: added a bunch more ejs calls.Andrew Tridgell2005-07-117-4/+249
| | | | | | | | getgr*() getpw*() strlower() strupper() IfaceList()
* r8316: give full access to the popt command line parsing in ejs scripts, ↵Andrew Tridgell2005-07-115-27/+204
| | | | | | | | | | | | | | | | 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
* r8298: - started building a library of js routines in scripting/libjs/Andrew Tridgell2005-07-112-0/+223
| | | | | | - switched the existing test programs over to using the library - added install of js lib
* r8297: add libinclude() function in ejs, which is like include() but ↵Andrew Tridgell2005-07-111-0/+47
| | | | | | | | | 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
* r8296: - split out the ejs auth functions into a separate fileAndrew Tridgell2005-07-104-121/+148
| | | | - got rid of the one line ejs_returnlist()
* r8284: - fixed some uninitialised variables in the irpc codeAndrew Tridgell2005-07-104-7/+99
| | | | | | | - 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
* r8281: pass the callnum and rpc interface table directly from the generatedAndrew Tridgell2005-07-102-19/+26
| | | | | | code in pidl for ejs calls. This means that ejs_rpc_call() doesn't need to scan the rpc tables for the right interface, and doesn't need to scan for the call name
* r8280: - added irpc_connect() for connecting to a irpc server by nameAndrew Tridgell2005-07-103-3/+87
| | | | | | | | - make the dcerpc pipe in rpc_connect() a talloc child of the ejs connection variable. That means when the connection variable goes out of scope, the connection is automatically closed. That makes for a more natural interface for closing connections in a scripting language (tpot, you may wish to use mprSetPtrChild() in your smb glue code too)
* r8276: fixed the remaining memory leaks in smbscript. We can now loop doingAndrew Tridgell2005-07-1010-124/+138
| | | | lots of rpc calls without memory usage increasing.
* r8273: fixed some memory leaks in smbscript. This required convertingAndrew Tridgell2005-07-104-29/+16
| | | | | | | 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
* r8262: - simplify the dependency handling for ejs modulesAndrew Tridgell2005-07-093-106/+63
| | | | | | - added config.mk entries for some more pipes - simplify the handling of ejs variables in the pidl code
* r8260: added an init based registration system for the generated ejs rpc ↵Andrew Tridgell2005-07-092-18/+47
| | | | | | code, so adding a new pipe only involves changes to librpc/config.mk
* r8256: - allow rpc calls from non-command line ejs contexts by creating a setAndrew Tridgell2005-07-094-2/+34
| | | | | | | | | | | of null credentials to use if cmdline_credentials is not setup - hide the length and size elements of a lsa_String from js scripts, so you can use a lsa_String just as an ordinary string without knowing its a structure. We won't do this with all structures, just a few core ones that are used often enough to warrant it. - make sure returned ldb arrays have a length property
* r8254: fixed a valgrind error in the unix auth codeAndrew Tridgell2005-07-091-1/+1
|
* r8238: - fixed handling of NULL pointers from ejsAndrew Tridgell2005-07-083-0/+26
| | | | - added automatic creation of all constants in IDL as ejs variables
* r8236: fixed support for arrays of structuresAndrew Tridgell2005-07-081-4/+4
|
* r8233: - added support for more base types in pidl ejsAndrew Tridgell2005-07-084-5/+143
| | | | | | | | | | | | | | | - added auto generation of a header with prototypes for public ejs functions - make public functions non-static - fixed allocation of fixed sized arrays - added 'noejs' flag indicating that a typedef will be handled manually by ejs - added manual functions for sid and GUID, so they show up as nice strings in ejs scripts This allows ejs to bring in samr, security, lsa and misc IDL functions
* r8230: prevent authentication dying on a NULL domainAndrew Tridgell2005-07-081-1/+1
|
* r8220: added auto-generation of ENUM constants in ejs wrapper. So we can now ↵Andrew Tridgell2005-07-085-1/+41
| | | | | | use the enum name instead of a integer in ejs scripts making rpc calls
* r8216: - handle union pull in ejs pidl generationAndrew Tridgell2005-07-081-0/+9
| | | | - added debugging calls for missing structure/union elements
* r8215: switched the pull side of the ejs generator over to the recursive ↵Andrew Tridgell2005-07-082-30/+14
| | | | | | LEVELS based approach. This allows for much more complex structure mappings to be generated.
* r8213: I've started to understand the LEVELS stuff in pidl much better now,Andrew Tridgell2005-07-082-29/+13
| | | | | | | | | and have re-coded the push side of the ejs generator to use it properly. It ends up being very neat and small, and should handle much more complex structures (like arrays of pointers to unions etc). Also added push side support for unions. This should get more of the echo pipe working via ejs.
* r8200: - added stub functions for union pull/pushAndrew Tridgell2005-07-071-0/+3
| | | | - kill the js interpreter with an exception on internal errors
* r8198: - handled push/pull of simple strings in ejsAndrew Tridgell2005-07-073-9/+56
| | | | | - improved the error handling, so the ejs wrappers don't just ignore a type they don't handle, instead an exception is issued saying what isn't handled
* r8195: - fixed handling of simple arrays. To keep the logic simple, I moved ↵Andrew Tridgell2005-07-072-17/+17
| | | | | | | | | to making all push functions taking a constant pointer to the type rather than having a different calling convention for scalars and pointers - fixed the setting of the 'length' element in arrays
* r8194: delete the old hand-written ejs code for echo_AddOne. This is nowAndrew Tridgell2005-07-071-45/+0
| | | | autogenerated by pidl
* r8192: updated the glue code for the generated ejs functions from pidlAndrew Tridgell2005-07-075-30/+155
| | | | only handles a small subset of all IDL files so far
* r8114: fixed the build after tpots ejs commit ....Andrew Tridgell2005-07-041-0/+11
|
* r8105: Add ejsrpc push/pull functions for uint16 and uint8.Tim Potter2005-07-042-12/+55
|
* r8073: a successful rpc call from ejs!Andrew Tridgell2005-07-026-13/+292
| | | | | | | | the ejs_echo.c code is the stuff that needs to be auto-generated by pidl. It only does echo_AddOne so far. We also need a table for registering these calls. The code is hard-wired for echo_AddOne for now.
* r8069: the beginnings of code to allow rpc calls to be made from ejsAndrew Tridgell2005-07-026-39/+194
| | | | | tpot, note that this shows how you can modify passed in MprVar variables in C call
* r7928: Add rename, unlink and list commands.Tim Potter2005-06-261-2/+139
| | | | | list() returns a list of strings, but maybe it should be a list of objects with size, attrib, short name etc.
* r7924: Add mkdir() and rmdir() functions.Tim Potter2005-06-261-2/+81
| | | | Write a macro to check tree handle parameters.