1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

50 Commits

Author SHA1 Message Date
Andrew Tridgell
f7b49ecd08 r8821: continue the trend to move to a more OO style of interface for our js
calls. This changes the generated RPC and IRPC calls to use the 'this'
object pointer instead of requiring the passing of the object on each
call. So typical usage is now:

var echo = echo_init();
var io = irpcObj();

status = echo.connect("ncacn_np:server");
assert(status.is_ok);

io.input.in_data = 7;
status = echo.AddOne(io);
assert(status.is_ok);
2007-10-10 13:30:08 -05:00
Andrew Tridgell
3a1c6a176e r8745: make ldap.js cleanup after itself 2007-10-10 13:30:01 -05:00
Andrew Tridgell
bdca9537a2 r8743: automatically find the basedn in ldap.js 2007-10-10 13:30:01 -05:00
Andrew Bartlett
0cc58f5c3c r8740: Extend the rdn_name module to handle adding the rdn as an attribute. ie:
dn: cn=foo,ou=bar
objectClass: person

implies

dn: cn=foo,ou=bar
objectClass: person
cn: foo
(as well as a pile more default attributes)

We also correct the case in the attirbute to match that in the DN
(win2k3 behaviour) and I have a testsuite (in ejs) to prove it.

This module also found a bug in our provision.ldif, so and reduces
code complexity in the samdb module.

Andrew Bartlett
2007-10-10 13:30:00 -05:00
Andrew Bartlett
325f6d24df r8738: Test (using ejs!) the basic operation of the ldb modules.
ejs seems to test this stuff very nicely!

Andrew Bartlett
2007-10-10 13:30:00 -05:00
Andrew Tridgell
19ae68f59a r8652: added a test for the boolean bug just fixed 2007-10-10 13:29:50 -05:00
Andrew Tridgell
2dc493eea6 r8639: moved loadparm calls into an ejs object 2007-10-10 13:29:48 -05:00
Andrew Tridgell
a978484738 r8638: continue the trend of maknig our C functions true ejs objects by making the string functions
into an object. To keep existing code working I have added:

  string_init(global);

into base.js. That brings the functions into the global scope for our
existing scripts
2007-10-10 13:29:48 -05:00
Andrew Tridgell
42ae50db81 r8636: fixed the ejs ldb test to work with the new ldb.search() syntax, and
add it to our test suite so it will be maintained
2007-10-10 13:29:47 -05:00
Andrew Tridgell
cf35818648 r8488: after discussions with simo, moved to a full OO interface, so you 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
2007-10-10 13:23:08 -05:00
Andrew Tridgell
98c9c4ecb8 r8486: switched to a separate connection operation in ldb interface
(a suggestion from simo)
2007-10-10 13:23:08 -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
3093057d97 r8481: switched ldb ejs called over to an OO interface, so you do:
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).
2007-10-10 13:23:07 -05:00
Andrew Tridgell
c470c3ceac r8413: mark exprbug() as fixed, and add a new bug 2007-10-10 13:22:59 -05:00
Andrew Tridgell
abbf9c703c r8355: - added a vsprintf() function
- removed the --outputdir option from provision, as its not used any
  more (as ejs knows the real paths)
2007-10-10 13:20:10 -05:00
Andrew Tridgell
14af014410 r8346: added a sprintf test suite for ejs 2007-10-10 13:20:09 -05:00
Andrew Tridgell
5f079d7463 r8317: convert the example scripts over to the new GetOptions() call 2007-10-10 13:20:06 -05:00
Andrew Tridgell
2a444dedbe r8298: - started building a library of js routines in scripting/libjs/
- switched the existing test programs over to using the library

- added install of js lib
2007-10-10 13:19:33 -05:00
Andrew Tridgell
cd1ea857ce r8287: yay! finally irpc calls from ejs are all working.
This is a demo script that shows the nbt server statistics. For example:

nbt_server statistics:
        total_received: 185
        total_sent:     59
        query_count:    13
        release_count:  21
        register_count: 7
2007-10-10 13:19:32 -05:00
Andrew Tridgell
757c22aab4 r8271: make the ejs test scripts directly executable scripts using:
#!/usr/bin/env smbscript

I'll be interested to see how portable this is in the build farm.
2007-10-10 13:19:28 -05:00
Andrew Tridgell
c760180119 r8269: added automatic testing of rpc calls from ejs in 'make test' 2007-10-10 13:19:28 -05:00
Andrew Tridgell
eb354f6da7 r8257: add a samr rpc test page in the web server. It lists all level3
information from QueryUserInfo for all users in the domain.

If you want to see why I am putting the effort into ejs, then please
read swat/scripting/samr.js, and compare it to other methods of rpc
access for our web management interface. Using ejs like this will make
building a rich interface _much_ easier.
2007-10-10 13:19:26 -05:00
Andrew Tridgell
763296a9b3 r8244: need to be careful about local vs global variables in js 2007-10-10 13:19:24 -05:00
Andrew Tridgell
dd9465af5b r8241: - take advantage of pointer comparison
- added testing of samr_EnumDomainGroups()
2007-10-10 13:19:24 -05:00
Andrew Tridgell
a929a90ed7 r8239: - added testing of LookupDomain, OpenDomain and EnumDomainUsers
- used SEC_FLAG_MAXIMUM_ALLOWED for access mask. This gets the samr.js
  test working with w2k3 as the server
2007-10-10 13:19:23 -05:00
Andrew Tridgell
5be26e7491 r8237: expanded the samr.js test to do a samr_Connect(), samr_EnumDomains() and samr_Close() 2007-10-10 13:19:23 -05:00
Andrew Tridgell
2e50a5b780 r8234: started on testing samr calls from ejs. So far it only does samr_Connect() 2007-10-10 13:19:23 -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
c065d67769 r8218: added testing of echo_TestSurrounding() and
echo_TestDoublePointer(). All echo.idl functions are now tested and
working from ejs.
2007-10-10 13:19:21 -05:00
Andrew Tridgell
7fa9b8251d r8217: added testing of echo_TestSleep() and echo_TestEnum() in echo js code 2007-10-10 13:19:21 -05:00
Andrew Tridgell
1429b885fb r8214: added testing of echo_TestCall2(), which tests the union push code 2007-10-10 13:19:20 -05:00
Andrew Tridgell
67aa628413 r8199: - we don't need to pre-declare 'var status;' everywhere
- added testing of echo_TestCall(), which uses strings
2007-10-10 13:19:19 -05:00
Andrew Tridgell
f1d6b328c4 r8197: added testing of echo_SinkData() and echo_SourceData() 2007-10-10 13:19:19 -05:00
Andrew Tridgell
0b67754c28 r8196: - added testing of the EchoData interface in the echo test script
- add asserts on all calls for correct results
2007-10-10 13:19:18 -05:00
Andrew Tridgell
757bb7f31c r8193: fixed the echo.js example code to work with the new syntax for rpc
calls from js. I chose the new syntax to match the C calling syntax,
so if you are familiar with using the Samba4 rpc libraries from C,
then using them from js should be easy
2007-10-10 13:19:18 -05:00
Andrew Tridgell
0c534699ef r8074: demonstrate calling echo_AddOne() from ejs 2007-10-10 13:19:05 -05:00
Andrew Tridgell
b9e73fa932 r8070: a (as yet not working) example of how rpc calls might be made from js scripts 2007-10-10 13:19:05 -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
b8e1d2f68e r7256: Demonstrate use of resolveName() js function. 2007-10-10 13:17:32 -05:00
Jelmer Vernooij
6731e0a654 r7161: - Add support for "aliases" for pidls scalar types and add a few aliases.
- Define __PIDL__ when preprocessing IDL files.
- Remove a couple of useless defines from rpcecho.idl
rpcecho.idl now works in both pidl and midl
(althought pidl is a bit pedantic and gives two warnings)
2007-10-10 13:17:21 -05:00
Andrew Tridgell
645e645a4e r7128: added recursion to bugs list 2007-10-10 13:17:20 -05:00
Andrew Tridgell
46adb4a065 r7125: demonstrate some bugs in ejs 2007-10-10 13:17:20 -05:00
Andrew Tridgell
9679f20272 r7076: added demos of using ARGV[] 2007-10-10 13:17:12 -05:00
Andrew Tridgell
f1d0c00660 r7073: added some simple example scripts for use with smbscript 2007-10-10 13:17:12 -05:00
Jelmer Vernooij
fae95f740d r6611: Add mailslot test program 2007-10-10 13:16:30 -05:00
Andrew Tridgell
cb4e07744d r6541: added double pointer test to win32 echo client 2007-10-10 13:16:24 -05:00
Jelmer Vernooij
690a7d71d8 r6306: Add simple WMI client test script 2007-10-10 13:11:30 -05:00
Jelmer Vernooij
0559f22bbe r6019: Add IDL and server side code for Test_DoublePointer 2007-10-10 13:11:15 -05:00
Jelmer Vernooij
ed11601aef r6018: Add idl and server side for Test_Surrounding 2007-10-10 13:11:14 -05:00
Jelmer Vernooij
e33397f383 r6015: Add testprogs/ directory and original rpcecho sources
( from tridges junkcode at http://samba.org/ftp/unpacked/junkcode/rpcecho-win32 )
2007-10-10 13:11:14 -05:00