summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs/mprutil.c
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r8489: neaten up the object handlingAndrew Tridgell1-0/+18
(This used to be commit ccf20b2b13b11ac07b59988809b6c5160388a616)
2007-10-10r8488: after discussions with simo, moved to a full OO interface, so you ↵Andrew Tridgell1-2/+5
don't need to keep a 'db' variable around. The ldb object knows what it is connected to. Added a simple ldb testsuite in testprogs/ldb.js (This used to be commit cf35818648b5b649d0cd25f115a04b7b5b5311aa)
2007-10-10r8481: switched ldb ejs called over to an OO interface, so you do:Andrew Tridgell1-0/+15
var ldb = ldb_init(); res = ldb.search(dbfile, "(objectClass=user)"); you can also do: ldbSearch = ldb.search; res = ldbSearch(dbfile, "(objectClass=user)"); if you want the old interface (ie. you can use this to import functions into the global or local namespace). (This used to be commit 3093057d9735cbb62f57e7159264d5a28b85320f)
2007-10-10r8399: move the ejs and esp code closer to the directory layout used by theAndrew Tridgell1-1/+1
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 52db7a052baeb0f11361ed69b71cb790039e3cc9)
2007-10-10r8340: - added sys_gmtime()Andrew Tridgell1-7/+7
- 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! (This used to be commit 625628a3f6e78349d2240ebcc79081f350672070)
2007-10-10r8337: - use 64 bit access functions in ejs callsAndrew Tridgell1-3/+35
- added access to smbd random functions - fixed ordering in join() - added sys_interfaces(), sys_hostname(), sys_nttime() and sys_ldaptime() (This used to be commit 28c1a1f3c0cd2f8228fd8c3c695ab6f45226fa3f)
2007-10-10r8333: merged with latest upstream ejs sourcesAndrew Tridgell1-3/+3
(This used to be commit b0f9ddafe95d4e8d846bc72a39e94d22da271348)
2007-10-10r8320: make sure all our returned objects are full objects, which means theyAndrew Tridgell1-8/+15
have the toString() and valueOf() default attributes this allows all our returned objects to be used in logical expressions (This used to be commit 570f071b1544b497d5f480b8ad50df097fe4c843)
2007-10-10r8318: added a bunch more ejs calls.Andrew Tridgell1-0/+12
getgr*() getpw*() strlower() strupper() IfaceList() (This used to be commit 1517ad490dd67302f38ab9dcd8a3b24b73b8d550)
2007-10-10r8316: give full access to the popt command line parsing in ejs scripts, ↵Andrew Tridgell1-0/+3
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 775fb56ac287b8d485b38f633b9480d7b7ab64e3)
2007-10-10r8284: - fixed some uninitialised variables in the irpc codeAndrew Tridgell1-3/+3
- 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 061e20e509d95ffe16d7dd6fba7db39fc7a165ed)
2007-10-10r8280: - added irpc_connect() for connecting to a irpc server by nameAndrew Tridgell1-0/+9
- 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) (This used to be commit 1c170138a8e82cb42958b88b94a1d567ffa88a92)
2007-10-10r8276: fixed the remaining memory leaks in smbscript. We can now loop doingAndrew Tridgell1-31/+95
lots of rpc calls without memory usage increasing. (This used to be commit 9c885a7edb771486793eb287288158157b34e8f3)
2007-10-10r8256: - allow rpc calls from non-command line ejs contexts by creating a setAndrew Tridgell1-0/+1
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 (This used to be commit 12d2092dd8668de41776132ccbcd634790c371a9)
2007-10-10r8073: a successful rpc call from ejs!Andrew Tridgell1-2/+2
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. (This used to be commit b1ea58ddc482c373783d16331dd07378010ba39a)
2007-10-10r8069: the beginnings of code to allow rpc calls to be made from ejsAndrew Tridgell1-0/+26
tpot, note that this shows how you can modify passed in MprVar variables in C call (This used to be commit a782541db3de6ca3b599a220265cf9e6cb0c4d7b)
2007-10-10r7254: Add a mprWERROR() function with the same attributes as mprNTSTATUS.Tim Potter1-0/+24
(This used to be commit 2fa6f7bb2b8390f6486f6531212b556e98a6c528)
2007-10-10r7225: Create a MprVar object from a NTSTATUS, e.g:Tim Potter1-0/+23
res: { is_err: true, is_ok: false, errstr: "NT_STATUS_IO_TIMEOUT", v: -1073741643 } (This used to be commit d81d5f8317ca82a08e6fc38ef7313fad2e631281)
2007-10-10r7081: Add mprToInt() function.Tim Potter1-0/+9
(This used to be commit 790a46f53bd5b6994cbf6aed670df1407a44e2f3)
2007-10-10r7072: moved the esp hooks calls to the ejs level, so we can call them fromAndrew Tridgell1-0/+159
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 e59ae64f60d388a5634559e4e0887e4676b70871)