1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00
Commit Graph

538 Commits

Author SHA1 Message Date
Jelmer Vernooij
8fd66feb88 Remove remaining obsolete EJS tests. 2008-09-21 05:43:39 +02:00
Jelmer Vernooij
163292f325 Merge branch 'master' of ssh://git.samba.org/data/git/samba into noejs 2008-09-19 16:26:00 +02:00
Jelmer Vernooij
62b5f1886d Make sure modify operations succeed. 2008-09-19 10:56:35 +02:00
Jelmer Vernooij
729ffbae08 Merge branch 'master' of ssh://git.samba.org/data/git/samba into noejs
Conflicts:
	source4/main.mk
2008-09-18 20:29:05 +02:00
Jelmer Vernooij
d7a0c26af4 Move torture/ blackbox tests closer to code they're testing. 2008-09-16 18:30:24 +02:00
Jelmer Vernooij
aa09d8a75f Move ndrdump tests closer to the code they test. 2008-09-16 18:16:49 +02:00
Jelmer Vernooij
f3a517a92e Remove minschema js tests. 2008-09-16 18:13:56 +02:00
Jelmer Vernooij
f594044d79 Remove remaining JavaScript code. 2008-09-16 18:09:34 +02:00
Stefan Metzmacher
b295dca7a0 blackbox: fix source => source4
metze
2008-09-14 23:08:45 +02:00
Andrew Bartlett
aa14b40c5c Fix the build on Win32, and use NEGOTIATE security (to allow kerberos)
(This used to be commit f0bde093d7)
2008-08-27 16:22:45 +10:00
Andrew Bartlett
16112762e7 Generate the subSchema in cn=Aggregate
This reads the schema from the in-memory structure, when the magic
attributes are requested.  The code is a modified version of that used
in the ad2oLschema tool (now shared).

The schema_fsmo module handles the insertion of the generated result.

As such, this commit also removes these entries from the setup/schema.ldif

Metze's previous stub of this functionality is also removed.

Andrew Bartlett
(This used to be commit c7c32ec7b4)
2008-08-15 20:40:57 +10:00
Jelmer Vernooij
26e9194e3a Move blackbox tests closer to what they're testing.
(This used to be commit c9b2e2aa86)
2008-06-26 10:56:59 +02:00
Andrew Bartlett
48100ca5c6 Remove old ldap.js test, we have replicated it in python now.
This will soon allow the removal of smbscript, once the samba3sam test
conversion is complete.

Andrew Bartlett
(This used to be commit 60c93b9777)
2008-06-19 14:53:14 +10:00
Jim McDonough
f3fb381952 Missed these on the last commit
(This used to be commit 0e8f946ed0)
2008-06-12 07:06:07 -04:00
Jim McDonough
0410dcb32d Initial automated wintest.
Added a blackbox test which looks for $WINTEST_CONF_DIR,
gets configuration vars from *.conf in that dir, disables
smbwrapper, and runs RAW-OPEN torture test.

Scripts are coming to startup/shutdown vm's.
(This used to be commit 74a0a9bb54)
2008-06-12 07:02:14 -04:00
Andrew Bartlett
446748bfe1 Align the Python and EJS ldap tests.
We should now (need to review and compare them once more) be able to
remove ldap.js (and once samba3sam.js is done, smbscript).

Andrew Bartlett
(This used to be commit f65e43e945)
2008-06-03 23:27:22 +10:00
Jelmer Vernooij
4e9ca6caf9 Remove unused EJS net bindings.
(This used to be commit 3923414849)
2008-05-26 14:00:28 +02:00
Jelmer Vernooij
9e37d25a92 Remove unused scripts.
(This used to be commit 3d22b72bb7)
2008-05-26 13:34:36 +02:00
Jelmer Vernooij
fb7e359561 Remove unused echo ejs script.
(This used to be commit 3a6b009d50)
2008-05-23 04:20:52 +02:00
Jelmer Vernooij
27005cb7a2 Convert samr test to python.
(This used to be commit 88d473b202)
2008-05-23 04:20:45 +02:00
Jelmer Vernooij
c6132465d1 Remove unused EJS testprogs.
(This used to be commit e14c930200)
2008-05-23 03:34:57 +02:00
Andrew Kroeger
fe17acfa82 subunit.sh: Properly capture and pass on the command output.
Previously, the output from $cmdline was never captured.  In case of a
failure, there was no output being passed to the subunit_fail_test() function,
but that function contains a call to "cat -".  This caused the script to hang
indefinitely waiting for input.

We now capture $cmdline output (including mapping stderr to stdout) using
backticks, and then pipe that output to the subunit_fail_test() if there is
a failure.
(This used to be commit c0234d1319)
2008-05-21 20:46:14 -05:00
Jelmer Vernooij
1929675813 Fix reference to removed smbpython.
(This used to be commit 58f956dc45)
2008-05-21 15:39:00 +02:00
Andrew Bartlett
9586462b8f Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-abartlet
(This used to be commit 18dd8120cc)
2008-04-16 16:12:58 +02:00
Andrew Bartlett
008c8adfe3 Fix wbinfo --trusted-domains.
The problems here were that we did not bind to the LSA pipe, and we
did not consider it possible to have 0 trusted domains.

Andrew Bartlett
(This used to be commit 86694d429d)
2008-04-16 16:10:16 +02:00
Jelmer Vernooij
228f342b1f Use the subunit shell library.
(This used to be commit 49367e044e)
2008-04-16 14:52:29 +02:00
Jelmer Vernooij
f540669c48 Use library for subunit test functions.
(This used to be commit 690924dc7f)
2008-04-16 12:34:53 +02:00
Jelmer Vernooij
83c8d6cc89 Fix -r test, knownfailure return code.
(This used to be commit 4f0954905a)
2008-04-16 01:10:20 +02:00
Jelmer Vernooij
f5c0be9208 Merge branch 'wbinfo-test' of git://git.samba.org/kai/samba/kai-work-in-progress into v4-0-selftest
(This used to be commit 56340a5fa1)
2008-04-16 00:05:36 +02:00
Jelmer Vernooij
edc9b35f1e Fix executable bit on blackbox ndrdump tests.
(This used to be commit a3f0e4151b)
2008-04-16 00:05:12 +02:00
Kai Blin
3413cfefb8 blackbox: Add many more tests for wbinfo
(This used to be commit 0a2942f6e9)
2008-04-15 23:36:41 +02:00
Andrew Bartlett
c7d9596764 Test password change with 'net password change'.
Andrew Bartlett
(This used to be commit 695cee0349)
2008-04-15 10:40:06 +02:00
Andrew Bartlett
5a18f0d82b Test a few more bits of smbclient
(This used to be commit 24a2409d72)
2008-04-15 10:05:29 +02:00
Andrew Bartlett
afaba23131 Add blackbox test for ndrdump, to ensure it at least does not
segfault.

Andrew Bartlett
(This used to be commit d2fe61a13a)
2008-04-15 09:13:32 +02:00
Andrew Bartlett
142fbfb3c1 Fix and test python scripts and kerberos
This fixes up the python credentials interface in a number of areas,
with the aim of supporting '-k yes' as a command line option.  (This
enables the use of kerberos).

As such, I've had to change the get_credentials call to take a
loadparm context, so that the credentials can be initialised
correctly.

The test_kinit script has been modified to prove that this continues
to work, as well as to provide greater code coverage of the kerberos
paths.

Andrew Bartlett
(This used to be commit 727ef40c2b)
2008-03-28 21:57:15 +11:00
Andrew Bartlett
3cdf0c64dd Extend the ldap.js test to prove faults with the LDAP backend.
Try to provide more information to see why OpenLDAP isn't quite up to
being a Samba4 Backend.

Andrew Bartlett
(This used to be commit 89458c7d8b)
2008-03-19 12:12:24 +11:00
Andrew Bartlett
736ae6a566 Don't hardcode objectCategory into the schema, even in the schema.
We now load the schema early enough that we can generate this too!

Andrew Bartlett
(This used to be commit 1adc74c65a)
2008-03-04 11:27:57 +11:00
Andrew Bartlett
0b2a762519 Extend the ldap.js test
Now we verify sAMAccountType and userAccountControl, as well as rename and
DN mismatch semantics.

Andrew Bartlett
(This used to be commit 0a5fa41dd7)
2008-02-28 08:37:11 +11:00
Andrew Tridgell
054bc11876 added blackbox testing of gentest
(This used to be commit 716345fd38)
2008-02-15 16:42:22 +11:00
Andrew Tridgell
c09f70608c added a blackbox test for masktest
(This used to be commit 05a110123d)
2008-02-15 15:33:10 +11:00
Andrew Tridgell
66e8bc9dac converted locktest to use popt and cmdline utility code
(This used to be commit 625ea49a95)
2008-02-15 14:55:31 +11:00
Andrew Tridgell
63c099c51a added blackbox testing for locktest
(This used to be commit af6484f78d)
2008-02-15 14:27:06 +11:00
Jelmer Vernooij
f44dbc296e Reintroduce samba3sam EJS test, at least until the Python test is ready.
(This used to be commit 13deb25214)
2008-02-12 01:42:58 +01:00
Jelmer Vernooij
0a6dc21955 Remove tests for Samba 3 EJS code.
(This used to be commit 7aff2ddd8c)
2008-02-11 13:38:07 +01:00
Jelmer Vernooij
b5bfabf152 Move nmblookup blackbox test closer to the code it tests.
(This used to be commit 3f24136b56)
2008-02-09 17:17:21 +01:00
Andrew Bartlett
655ec1aa06 A couple more ipsec classes for the schema.
Andrew Bartlett
(This used to be commit 41309dc862)
2008-02-09 14:48:56 +11:00
Andrew Bartlett
b2d47f9794 From a request from Peter Huang, include IPsec sechema.
(We may need to include more defaults in the template, but I want to
start small for now).

Andrew Bartlett
(This used to be commit a466dda118)
2008-02-09 09:59:45 +11:00
Jelmer Vernooij
066912ba80 Put temporary test files in test directory.
(This used to be commit 16382999be)
2008-02-08 00:34:29 +01:00
Stefan Metzmacher
c6a6fa1841 win32-tests: add a very usefull w32 programm to explore midl features
You have to define idl, call the client function
and add a server implementation.

Then you need to compile midltests.exe
and run it, it will dump the generated NDR on the
screen.

metze
(This used to be commit dc15c88335)
2008-02-06 16:34:36 +01:00
Andrew Bartlett
2eab4abf25 Make ranged results tests in ldap.js easier to debug.
This adds some extra information to the failure message, to chase down
which test is failing.

Andrew Bartlett
(This used to be commit 281bc76d3d)
2008-01-23 09:00:00 +11:00
Andrew Bartlett
85c7021216 Test the behaviour of mixed domain_scope and search_options controls.
Andrew Bartlett
(This used to be commit 89053bc564)
2008-01-16 08:58:07 +11:00
Andrew Bartlett
0ec60cfd83 Make ldap.js test easier to re-run in failure cases, by deleting more
things that we will create later.

Andrew Bartlett
(This used to be commit 9b47b551a3)
2008-01-16 08:57:28 +11:00
Jelmer Vernooij
7b06161904 Remove accidently committed debugging statement.
(This used to be commit 9ad2de6e99)
2008-01-13 04:50:33 +01:00
Jelmer Vernooij
95f83d9040 tests.blackbox: Avoid my local Kerberos setup from interfering with the blackbox.smbclient test.
(This used to be commit 1d703dcf3a)
2008-01-13 02:45:55 +01:00
Andrew Bartlett
dfc27ff863 r26488: Implement tests for the ranged_results module.
Untested code is broken code, so rework the module until it passes...

It turns out that AD puts search attributes onto the wire in the
reverse order to what Samba does.  This complicates exact value
matching, so this is skipped for now.

Andrew Bartlett
(This used to be commit 91bcb60d31)
2007-12-21 05:50:45 +01:00
Andrew Bartlett
449c681d5b r26479: Further test behaviour of 'attribute or value exists'.
Andrew Bartlett
(This used to be commit 11c153163c)
2007-12-21 05:50:37 +01:00
Andrew Bartlett
f8bc24065b r26420: Don't print a blow-by-blow description of every search we do, just the
errors that occour.

Andrew Bartlett
(This used to be commit bf5b2f467f)
2007-12-21 05:49:48 +01:00
Andrew Bartlett
9d4d41f65d r26419: Add a module to implement 'ambigious name resolution' by munging the
incoming LDAP filter.

Warning: Any anr search will perform a full index search.  Untill ldb
gets substring indexes, this is unavoidable.

Also implement a testsutie to show we match AD behaviour for this
important extension (used in the Active Directory Users and Computers
MMC plugin, as a genereral 'find').

This will also be useful to OpenChange, as their server needs to
implement this.

Andrew Bartlett
(This used to be commit 044b509472)
2007-12-21 05:49:48 +01:00
Andrew Bartlett
364266e22a r26192: Handle, test and implement the style of extended_dn requiest that MMC uses.
It appears that the control value is optional, implying type 0 responses.

Failing to parse this was causing LDAP disconnects with 'unavailable
critical extension'.

Andrew Bartlett
(This used to be commit 833dfc2f2a)
2007-12-21 05:46:44 +01:00
Andrew Bartlett
37fdef233e r26182: Extend our linked attribute testsuite to cover many more possible
modifications, and then extend our implementation to match.

Andrew Bartlett
(This used to be commit 65d17f0ad7)
2007-12-21 05:46:38 +01:00
Andrew Bartlett
470043bf7a r26140: Add a new test for searches by distinguieshedName and dn, and
implement these in the simple ldap mapping module.

We still don't pass this test, because we must get linked attributes
into OpenLDAP.

Andrew Bartlett
(This used to be commit d41f34e979)
2007-12-21 05:46:20 +01:00
Andrew Bartlett
3b6ff04631 r25961: Add new tests to verify basedn validation in LDAP searches.
Andrew Bartlett
(This used to be commit e178df4a18)
2007-12-21 05:45:19 +01:00
Andrew Bartlett
58f9b5702a r25948: Fix up the samba3sam test (which is very fragile) to work with the new
restrictions imposed by the samldb module.

This module is worth keeping, because when we go back to do more
extensive backend mapping, the testing of this module shows it is
still possible.

Andrew Bartlett
(This used to be commit a10d2554dc)
2007-12-21 05:45:13 +01:00
Andrew Bartlett
27c9f6c235 r25891: Test that we get the correct return value when we attempt to reference
invalid entries with a linked attribute.

Make Samba4 pass that test, by fixing a silly bug in the
linked_attributes module.  (By passing down the 'original' request
structure, tdb would override our handle, and therefore we would never
be called for the 'wait', which collects the errors).

Fix up the provision templates to handle the newly required
referential integrity.

Andrew Bartlett
(This used to be commit 0377d85bbd)
2007-12-21 05:44:41 +01:00
Andrew Bartlett
c112597ba7 r25826: Prove that adding a user or computer via LDAP doesn't magicly give
them any more group memberships.

Andrew Bartlett
(This used to be commit c805934017)
2007-12-21 05:44:15 +01:00
Andrew Bartlett
b98169884b r25788: Use a single routine to handle the creation of modify requests in the
linked_attributs code.

This drasticly reduces the code duplication here.

Andrew Bartlett
(This used to be commit c66e188e67)
2007-12-21 05:43:59 +01:00
Andrew Bartlett
96116b7f84 r25787: Assert that we handle the group membership updating correctly,
including when we delete members from the DB.

Andrew Bartlett
(This used to be commit 2c95274e25)
2007-12-21 05:43:58 +01:00
Andrew Bartlett
8a8948a17a r25781: Handle and test linked attribute renames.
Andrew Bartlett
(This used to be commit 56d9dd5140)
2007-12-21 05:43:56 +01:00
Andrew Bartlett
a4c79f06ae r25762: This test belongs best with the other checks for a valid parent, in
the objectclass module.

Andrew Bartlett
(This used to be commit 16a292fcb1)
2007-12-21 05:43:47 +01:00
Andrew Bartlett
464dd2ada1 r25761: Rename to be a DN to be a child of itself wasn't being checked for.
This prevents CN=test,dc=samba,dc=example,dc=com being renamed into
CN=test2,cn=test,dc=samba,dc=example,dc=com

Andrew Bartlett
(This used to be commit 958a92ed0c)
2007-12-21 05:43:47 +01:00
Andrew Bartlett
dbb3c74464 r25760: Test out relative distinguished name behaviour under renames.
Andrew Bartlett
(This used to be commit 0019596b71)
2007-12-21 05:43:47 +01:00
Andrew Bartlett
46210e11f1 r25754: More work on normal forms for ldb input.
This patch is to ensure that all attributes are in the same case as
the schema specifies.  In the process, I ensure that all attributes
are indeed in the schema.

This ensures we use the schema case, not the user supplied case for
future responses, which assists any (incorrect, but possible) case
sensitive processing on a client.

I've also removed more of the subtle 'schema &&' that metze objected
to in the for loops, moving to a much more explicit 'if (schema)'.

Andrew Bartlett
(This used to be commit bfc96fff06)
2007-12-21 05:43:45 +01:00
Andrew Bartlett
47f6988c6d r25753: Move cn=rootdse to @ROOTDSE to avoid being caught up in schema restrictions.
Andrew Bartlett
(This used to be commit f3390c9054)
2007-12-21 05:43:45 +01:00
Andrew Bartlett
16d0395047 r25750: Update the objectclass module to improve consistency in Samba4.
The aim here is to ensure that if we have

CN=Users,DC=samba,DC=example,DC=com

that we cannot have a DN of the form

cn=admin ,cn=useRS,DC=samba,DC=example,DC=com

This module pulls apart the DN, fixes up the relative DN part, and
searches for the parent to copy the base from.

I've used the objectclass module, as I intend to also validate the
placement of child objects, by reading the allowedChildClasses virtual
attribute.

In the future, I'll also force the attribute names to be consistant
(using the case from the schema).

Andrew Bartlett
(This used to be commit c0a0c69ac5)
2007-12-21 05:43:43 +01:00
Andrew Bartlett
5cfa773202 r25710: Finally fix subtree renames. Untested code is broken code and in this
case an oddity of the javascript caused the test to 'pass'.

For the same oddity, we have a failure in ldb's handling of spaces in
DNs.  We need to resolve that too.

Andrew Bartlett
(This used to be commit e8cbac1a46)
2007-12-21 05:43:24 +01:00
Andrew Bartlett
c64116e158 r25218: After discussion with Simo, remove the subclass support from LDB.
Subclass support was designed to avoid needing to spell out the full
list of objectClasses that an entry was in.  However, Samba4 now
enforces this restriction in the objectClass module, and the way
subclass matching was handled was complex and counter-intuitive in my
opinion (and did not match LDAP).

Andrew Bartlett
(This used to be commit f5ce04b904)
2007-10-10 15:06:56 -05:00
Andrew Bartlett
6a9a1bd913 r25204: Patch by Andrew Kroeger <andrew@sprocks.gotdns.com> fixing bug #4958 -
rename of ldb entries for a case change (only).

I've modified the testsuite to verify this.

Andrew Bartlett
(This used to be commit 9cccd00dac)
2007-10-10 15:06:52 -05:00
Jelmer Vernooij
bf4f1307ab r24876: Use more absolute paths to samba4 binaries.
(This used to be commit 8616bfa0ae)
2007-10-10 15:03:26 -05:00
Andrew Bartlett
4e1d0cc8e3 r24761: Permit subtree renames in Samba4.
The module is scary: On a rename, it does a search for all entries
under that entry (including itself), and fires off a seperate rename
call for each result.  This will fail miserably on an LDAP backend,
but I'll need to work on using hdb for OpenLDAP, and hope Fedora DS
can implement subtree renames at some point.

Andrew Bartlett
(This used to be commit 13908a8cb4)
2007-10-10 15:03:05 -05:00
Jelmer Vernooij
a73a8d4b9d r24706: Move nmblookup tests to separate blackbox testsuite.
(This used to be commit aeb2e714f2)
2007-10-10 15:02:52 -05:00
Andrew Bartlett
666a833d2e r24693: Test search options in ldb blackbox testing.
Andrew Bartlett
(This used to be commit 9f45b5553a)
2007-10-10 15:02:47 -05:00
Jelmer Vernooij
8d6b9f2b88 r24691: All smbclient blackbox tests pass.
(This used to be commit c3a1386274)
2007-10-10 15:02:46 -05:00
Andrew Bartlett
0eb3ee3204 r24459: Fix up ldap.js and test_ldb.sh to test the domain_scope control, and
to test the behaviour of objectCategory=user searches.

It turns out (thanks to a hint on
http://blog.joeware.net/2005/12/08/147/) that objectCategory=user maps
into objectCategory=CN=Person,... (by the defaultObjectCategory of
that objectclass).

Simplify the entryUUID module by using the fact that we now set the DN
as the canoncical form of objectCategory.

Andrew Bartlett
(This used to be commit b474be9507)
2007-10-10 15:01:53 -05:00
Jelmer Vernooij
4da477d4fa r24339: Move output functions to separate files.
(This used to be commit f4ff4c5f61)
2007-10-10 15:01:40 -05:00
Jelmer Vernooij
f1f4f665b0 r24335: Fix -N support.
(This used to be commit 18ea767d39)
2007-10-10 15:01:39 -05:00
Andrew Bartlett
c4e5fcc349 r24263: Fix bug 4846 (unable to copy users in MMC Active Directory Users and
Computers).

We now generate a security descriptor for each object, when it is
created.  This seems to keep MMC happy.  The next step is to honour
it.

Andrew Bartlett
(This used to be commit 72f4ae8246)
2007-10-10 15:01:32 -05:00
Andrew Bartlett
ae7819d715 r24262: Set the objectCategory by default in the objectclass module, rather than using templates.
Modify the samba3sam test to be less fussy, and not use the
objectclass module (which requires proper schema stuff now).

Andrew Bartlett
(This used to be commit 53c248c264)
2007-10-10 15:01:32 -05:00
Andrew Bartlett
63c20026c4 r24076: Make ldap.js pass against Win2k3 again (looks like we don't match AD
on this error code, but allow both for now).

Also prove that bug #4829 needs a different solution: we can't fix
this by changing the template.  I think this fix needs to be in the
SAMR server.

Andrew Bartlett
(This used to be commit c3554e3ee7)
2007-10-10 15:01:22 -05:00
Andrew Bartlett
bb68118840 r23965: Add testing the 'net time' command to the script.
Andrew Bartlett
(This used to be commit 4fab53432a)
2007-10-10 15:01:12 -05:00
Andrew Bartlett
8172bbb7e4 r23964: Update blackbox selftest scripts to cover more code, and to more
consistantly report errors.  (Some were being lost due to the "echo
foo | cmd" calling convention).

Andrew Bartlett
(This used to be commit d0a994d0ce)
2007-10-10 15:01:12 -05:00
Andrew Bartlett
4955b21f68 r23849: ldap_server: Provide more info in debug traces
blackbox tests:  increase test coverage by running more options.

Andrew Bartlett
(This used to be commit 46abf82675)
2007-10-10 14:59:24 -05:00
Andrew Tridgell
0479a2f1cb 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.
(This used to be commit fcf38a38ac)
2007-10-10 14:59:12 -05:00
Andrew Bartlett
2d2cde7d95 r23762: Fix DN renames over LDAP, and instrument the partition module. Add a
test to prove the behaviour of LDAP renames etc.

Fix LDB to return correct error code when failing to rename one DN
onto another.

Andrew Bartlett
(This used to be commit 3f3da9c471)
2007-10-10 14:59:11 -05:00
Andrew Bartlett
b0db52b63a r23737: Validate that we object to duplicate values in an add or replace.
We can't ever allow duplicates, even if the client sends them

Andrew Bartlett
(This used to be commit 10277f2724)
2007-10-10 14:59:09 -05:00
Andrew Bartlett
cc0756c302 r23719: ejs being case sensitive, while LDAP is not is a real pain when
dereferencing attributes.

Fix the case to match between the attributes searched for and the ejs
element.  (Fixes LDAP-backend selftest)

Andrew Bartlett
(This used to be commit 51cf66bb96)
2007-10-10 14:59:08 -05:00
Andrew Bartlett
e9d19477e4 r23560: - Activate metze's schema modules (from metze's schema-loading-13 patch).
- samba3sam.js: rework the samba3sam test to not use objectCategory,
  as it's has special rules (dnsName a simple match)
- ldap.js: Test the ordering of the objectClass attributes for the baseDN
- schema_init.c: Load the mayContain and mustContain (and system...) attributes when
  reading the schema from ldb
- To make the schema load not suck in terms of performance, write the
  schema into a static global variable
- ldif_handlers.c: Match objectCategory for equality and canonicolisation
  based on the loaded schema, not simple tring manipuation
- ldb_msg.c: don't duplicate attributes when adding attributes to a list
- kludge_acl.c: return allowedAttributesEffective based on schema results
  and privilages

Andrew Bartlett
(This used to be commit dcff83ebe4)
2007-10-10 14:53:27 -05:00
Andrew Bartlett
b0c5367f4f r23558: MMC seems to ask for this, so I think we need to include it in our schema.
Andrew Bartlett
(This used to be commit ef1899054e)
2007-10-10 14:53:27 -05:00
Rafal Szczesniak
262dc06b99 r23178: add simple js code I use for testing and which starts to look like
ejsnet command line utility (perhaps to be moved to utils later...)

rafal
(This used to be commit 43f9d9ba71)
2007-10-10 14:53:00 -05:00
Jelmer Vernooij
5a74acbb17 r23174: merge text
(This used to be commit a6293ab5cb)
2007-10-10 14:52:59 -05:00
Andrew Bartlett
246f94725a r23026: Add groupPolicyContainer, as we now require this schema element.
Andrew Bartlett
(This used to be commit 1c4d376d54)
2007-10-10 14:52:41 -05:00
Andrew Bartlett
78db3d4307 r22523: Give a hint why this test fails (helped debugging backend issues).
Andrew Bartlett
(This used to be commit f86d3b4785)
2007-10-10 14:51:37 -05:00
Andrew Bartlett
3d4c4c5fa3 r22478: Update the LDAP backend code to handle initialisation of multiple
partitions onto the target LDAP server.

Make the LDAP provision run before smbd starts, then stop the LDAP
server.  This ensures this occurs synchronously, We then restart it
for the 'real run' (with slapd's stdin being the FIFO).

This required fixing a few things in the provision scripts, with more
containers being created via a add/modify pair.

Andrew Bartlett
(This used to be commit 860dfa4ea1)
2007-10-10 14:51:31 -05:00
Andrew Bartlett
aacabe9c57 r22284: Make this script executable
(This used to be commit b0cbf16936)
2007-10-10 14:50:56 -05:00
Andrew Bartlett
b0cbe9ae4a r22235: Test kinit, and PKINIT functionality by means of a new blackbox test.
Andrew Bartlett
(This used to be commit 7f27bfc356)
2007-10-10 14:50:41 -05:00
Andrew Bartlett
f1b2b43ba5 r22187: Test kerberos logins in the smbclient blackbox tests, including with a
machine account.

Andrew Bartlett
(This used to be commit 16a2bb87a8)
2007-10-10 14:50:01 -05:00
Andrew Bartlett
f3303bc8f6 r22170: To get the smbclient blackbox test to pass again, we need to get the
private dir to contain a valid machine account.

It isn't really valid it use the DC's account any more, so extend this
script to also join the domain.  This nicely tests out some previously
untested code too!

Andrew Bartlett
(This used to be commit 12f4e6033e)
2007-10-10 14:49:57 -05:00
Andrew Bartlett
4362ce99ec r21737: Print the error strings in the ejs ldb test.
(This used to be commit fed42cf5a3)
2007-10-10 14:49:21 -05:00
Andrew Bartlett
847102c6ca r21736: Fix the smbclient test to do something more interesting with the last
few authentication tests.  Now that the tests correctly 'fail', I was
able to fix the credentials subsystem to honour USER and PASSWD.

To get --machine-pass working, I needed ldb to always load it's static
modules, so I put this in ldb_connect().

Andrew Bartlett
(This used to be commit 3430d8c072)
2007-10-10 14:49:20 -05:00
Jelmer Vernooij
72d88d158a r21707: Finally merge my (long-living) perlselftest branch.
This changes the main selftest code to be in perl rather than in shell script.

The selftest script is now no longer a black box but a regular executable that takes
--help.

This adds the following features:

 * "make test TESTS=foo" will run only the tests that match the regex "foo"
 * ability to deal with expected failures. the suite will not warn about tests
   that fail and are known to fail, but will warn about other failing tests and
   tests that are succeeding tests but incorrectly marked as failing.
 * ability to print a summary with all failures at the end of the run

It also opens up the way to the following features, which I hope to implement later:
 * "environments", for example having a complete domains with DCs and domain members
 in a testenvironment
 * only set up smbd if necessary (not when running LOCAL tests, for example)
 * different mktestsetup scripts per target. except for the mktestsetup script, we can
   use the same infrastructure for samba 3 or windows.
(This used to be commit 38f867880b)
2007-10-10 14:49:15 -05:00
Jelmer Vernooij
000a094318 r21700: Run mktestsetup as an external program. This guarantees that it can be used for other selftest implementations (in particular the perl one I've been working on).
(This used to be commit aa29907327)
2007-10-10 14:49:15 -05:00
Andrew Bartlett
7dc7156bd7 r21496: A number of ldb control and LDAP changes, surrounding the
'phantom_root' flag in the search_options control

- Add in support for LDB controls to the js layer
- Test the behaviour
- Implement support for the 'phantom_root' flag in the partitions module
- Make the LDAP server set the 'phantom_root' flag in the search_options control
  - This replaces the global_catalog flag passed down as an opaque pointer
- Rework the string-format control parsing function into
  ldb_parse_control_strings(), returning errors by ldb_errorstring()
  method, rather than with printf to stderr
- Rework some of the ldb_control handling logic

Andrew Bartlett
(This used to be commit 2b3df7f38d)
2007-10-10 14:48:44 -05:00
Stefan Metzmacher
2b086ac63e r21361: let samba3sam.js pass when we'll use unicodePwd for storing the nt hash
jelmer: what should this test really test?

metze
(This used to be commit c8d903b606)
2007-10-10 14:48:19 -05:00
Simo Sorce
7ca399c075 r21351: Change ldb ejs bindings return codes.
We were returning just true/false and discarding error number and string.

This checking probably breaks swat, will fix it in next round as swat
is what made me look into this as I had no way to get back error messages
to show to the users.

Simo.
(This used to be commit 35886b4ae6)
2007-10-10 14:48:18 -05:00
Jelmer Vernooij
48bb9bc6cd r21017: Actually run tests during test phase rather than when generating the recipe.
(This used to be commit b975ce3a47)
2007-10-10 14:44:20 -05:00
Stefan Metzmacher
cc29eac3fb r21000: add some options to control what ldif is dumped
default is dump everything

metze
(This used to be commit 4ceb12f5d3)
2007-10-10 14:44:19 -05:00
Stefan Metzmacher
ba57c5030d r20999: - update the list of attributes for classSchema and atttributeSchema objects
- use ${SCHEMADN} instead of CN=Schema,CN=Configuration,${BASEDN}
- do not include autogenerated values: instanceType, cn and name in the ldif output
- take care of the systemOnly attribute and a resulting NO-USER-MODIFICATION

metze
(This used to be commit 30a0e8b26e)
2007-10-10 14:44:19 -05:00
Andrew Bartlett
109d97a38f r20958: Inspired by the lcov output, check the PASSWD_FILE and
--authentication-file options to smbclient.

Andrew Bartlett
(This used to be commit f85e57a71e)
2007-10-10 14:44:02 -05:00
Jelmer Vernooij
f60f9de6a8 r20747: Move cifsdd to blackbox section
(This used to be commit 96ac1c62ee)
2007-10-10 14:40:36 -05:00
Jelmer Vernooij
d9665a737b r20746: Don't report each individual test in test_smbclient as a single testsuite.
Create separate directory for blackbox tests.
(This used to be commit 7e6357f213)
2007-10-10 14:40:36 -05:00
Andrew Bartlett
42fcb90e72 r20457: Print more information before asserting
(This used to be commit 0b7a5b7284)
2007-10-10 14:35:50 -05:00
Rafal Szczesniak
89bb9a47de r20176: Info method returns null object if the user is not found.
rafal
(This used to be commit a20b05183d)
2007-10-10 14:29:18 -05:00
Rafal Szczesniak
a1af18217b r20143: a bit of experiments before doing serious changes in ejsnet.
rafal
(This used to be commit 3cdd43ebce)
2007-10-10 14:29:14 -05:00
Rafal Szczesniak
ee7924732a r19971: typo fix
rafal
(This used to be commit 2586958881)
2007-10-10 14:28:42 -05:00
Andrew Bartlett
adae413042 r19731: Modify the ldb_map infrustructure to always map from requested
attributes to backend (remote) attributes.

We can't do a reverse mapping safely where the remote attribute may be
a source for multiple local attributes.  (We end up with the wrong
attributes returned).

In doing this, I've modified the samba3sam.js test to be more
realistic, and fixed some failures in the handling of primaryGroupID.

I've added a new (private) helper function ldb_msg_remove_element() to
avoid a double lookup of the element name.

I've also re-formatted many of the function headers, to fit into
standard editor widths.

Andrew Bartlett
(This used to be commit 186766e309)
2007-10-10 14:28:15 -05:00
Stefan Metzmacher
72ce2ab2ee r19729: - split basedn related tests to a new function
- and add some 'netlogon' attriubte related tests

metze
(This used to be commit d643c3cc5c)
2007-10-10 14:28:15 -05:00
Stefan Metzmacher
b7f7e8d4fd r19727: make it possible to run the ldap.js tests against non global catalog servers
metze
(This used to be commit 463ed4c004)
2007-10-10 14:28:15 -05:00
Andrew Bartlett
952ac3cba5 r18786: I moved the usnChanged code around, and it now loaded in a different
module.  I forgot to commit this last night.

Andrew Bartlett
(This used to be commit 6c5f4af01f)
2007-10-10 14:19:12 -05:00
Jelmer Vernooij
324a779167 r18721: Fix base and samba3sam EJS tests to work without installation.
(This used to be commit d062e10166)
2007-10-10 14:19:04 -05:00
Jelmer Vernooij
6ca895542a r18720: Get rid of unused file.
(This used to be commit 5c0451842b)
2007-10-10 14:19:04 -05:00
Andrew Tridgell
f5fc8e3530 r18573: disable the echo.js testing of echo_TestCall() for now.
Jelmer, we need to fix pidl to be able to handle the double pointers
in the ejs generated code
(This used to be commit 63760acbb7)
2007-10-10 14:18:48 -05:00
Andrew Bartlett
2ea2a705ce r17925: Another class we need.
Andrew Bartlett
(This used to be commit 5ff3f10d4f)
2007-10-10 14:16:54 -05:00
Simo Sorce
25ba47eaf8 r17839: do not reference possibleInferiors we have not extracted
trim duplicate may attributes
(This used to be commit 4975659fd7)
2007-10-10 14:16:47 -05:00
Simo Sorce
7cb4dcf146 r17662: some more enhancements to our schema extraction tool,
with a nasty hack in minschema.js that I really hate
(This used to be commit 74c40719f2)
2007-10-10 14:16:21 -05:00
Andrew Bartlett
372c2ea4dc r17661: A patch from Martin Kuehl:
This commit extends the samba3sam test suite, which contains tests for
the samba3sam and ldb_map modules, with a lot of tests for inbound,
i.e. add, modify, rename and delete requests.

The tests each add a single record, modify it, rename it, and then
delete it, at each step checking that the operations were successful
and that the right data went into the right partitions.
They are run for an unmapped record, a mapped record with data only in
the remote partition, a mapped record with remote data that is later
modified to include local data, and a mapped record with data in both
the local and remote partitions.

It also adds a function to the backend objects that makes construction
of DNs for their respective partitions more comfortable.

Cheers,
Martin
(This used to be commit 1ddd06f24d)
2007-10-10 14:16:21 -05:00
Simo Sorce
cb4ebd8917 r17651: Commit the set of classess used to generate our schema
and update the schema with the latest additions
(This used to be commit 09a3272611)
2007-10-10 14:16:20 -05:00
Simo Sorce
a46beefeb7 r17648: update minschema.js
this version returns also oMSyntax and oMObjectClass and also
use the right value for the objects CNs

add a nasty hack to ejs' mprLdbMessage() to handle binary blobs situations
(This used to be commit 8dd1c1c05b)
2007-10-10 14:16:19 -05:00
Andrew Bartlett
66bbd44ec1 r17646: Use authentication if specified.
Andrew Bartlett
(This used to be commit 67c9cd508e)
2007-10-10 14:16:19 -05:00
Andrew Bartlett
c69672dd98 r17598: Patch from Martin Kühl <mkhl@samba.org> to update the samba3sam test
suite, which contains tests for the samba3sam and ldb_map modules,
with a lot of tests for search requests.

The tests add a small set of known records to the database, half of
them with only remote data, half of them split across the local and
remote backends, and test searching these records by DN, by attribute
and with a range of parse trees.

This suite should be extensive enough to ensure that behaviour of
search requests doesn't break.
(This used to be commit 120f7891fa)
2007-10-10 14:16:15 -05:00
Simo Sorce
45719b6c80 r17597: fix prefix path handling
(This used to be commit 25cde0f730)
2007-10-10 14:16:15 -05:00
Andrew Bartlett
7d4da6897c r17547: Add test by mkhl for some of our variable substituion behaviour.
Andrew Bartlett
(This used to be commit c2c72565e4)
2007-10-10 14:15:36 -05:00
Andrew Bartlett
b7cef04351 r17546: Test the loading of per-partition modules.
Andrew Bartlett
(This used to be commit 1a5ade30dc)
2007-10-10 14:15:36 -05:00
Andrew Bartlett
0572822b0e r17544: Add execute bit to js script.
Andrew Bartlett
(This used to be commit c1349cfd8d)
2007-10-10 14:15:36 -05:00
Andrew Bartlett
1ace9b6ec0 r17543: Patch from Martin Kühl <martin.kuehl@gmail.com> to extend the
samba3sam test cases for ldb_map, and to include this into our default
'make test'.
(This used to be commit f69a842314)
2007-10-10 14:15:36 -05:00
Andrew Bartlett
027583e6de r17525: This is a merge from the Google Summer of Code 2006 project by Martin Kühl
<mkhl@samba.org>.

Martin took over the work done last year by Jelmer, in last year's
SoC.  This was a substanital task, as the the ldb modules API changed
significantly during the past year, with the addition of async calls.

This changeset reimplements and enables the ldb_map ldb module and
adapts the example module and test case, both named samba3sam, to the
implementation.

The ldb_map module supports splitting an ldb database into two parts
(called the "local" and "remote" part) and storing the data in one of
them (the remote database) in a different format while the other acts
as a fallback.
This allows ldb to e.g. store to and load data from a remote LDAP
server and present it according to the Samba4 schema while still
allowing the LDAP to present and modify its data separately.

A complex example of this is the samba3sam module (by Jelmer
Vernooij), which maps data between the samba3 and samba4 schemas.

A simpler example is given by the entryUUID module (by Andrew
Bartlett), which handles some of the differences between AD and
OpenLDAP in operational attributes.  It principally maps objectGUID,
to and from entryUUID elements.  This is also an example of a module
that doesn't use the local backend as fallback storage.

This merge also splits the ldb_map.c file into smaller, more
manageable parts.
(This used to be commit af2bece4d3)
2007-10-10 14:15:33 -05:00
Andrew Bartlett
1057b4bea2 r17380: An expanded test, cross-referencing the global catalog to the main port.
Andrew Bartlett
(This used to be commit eadc24ed29)
2007-10-10 14:15:20 -05:00
Andrew Bartlett
cfa762ff87 r17302: Testing!
This confirms that records are replicated into the correct databases,
and that the case insensitive flags really work.

Andrew Bartlett
(This used to be commit ad463c1a52)
2007-10-10 14:15:08 -05:00
Andrew Bartlett
77bb75ead0 r17299: Improve the partition module to replicate attribute records into all
partitions.

Test that we do that correctly.

Andrew Bartlett
(This used to be commit 90c07b8801)
2007-10-10 14:15:08 -05:00
Andrew Bartlett
30c1716eda r16934: Expand the ldb test to demonstrate partition behaviour, including the
global USN and global transactions.

Andrew Bartlett
(This used to be commit 5abe3c4f5f)
2007-10-10 14:10:01 -05:00
Andrew Bartlett
bfc02627ce r16914: Add more tests for the partition module.
Andrew Bartlett
(This used to be commit 2728b60dfa)
2007-10-10 14:09:59 -05:00
Andrew Bartlett
59bd3b66cd r16167: Add tests for the changes to use hex digits, including some tests
commented out until we fix some more things on our server.

Andrew Bartlett
(This used to be commit ac9d3cb5b0)
2007-10-10 14:09:03 -05:00
Andrew Bartlett
2f16057bf4 r16110: Start some simple rootDSE LDAP tests in ejs.
Andrew Bartlett
(This used to be commit 0201f0df3f)
2007-10-10 14:09:00 -05:00
Andrew Bartlett
9f6884df6a r16072: Do basic wildcard searching in the ejs LDAP test.
Unfortunetly this didn't find the wildcard bug, but at least it tests
something...

Andrew Bartlett
(This used to be commit f763970caf)
2007-10-10 14:08:57 -05:00
Andrew Bartlett
7707d453c6 r16068: Check against the correct result in the ldap.js test
Andrew Bartlett
(This used to be commit 52b4e83a1c)
2007-10-10 14:08:56 -05:00
Andrew Bartlett
efddd37af8 r16066: The OSX AD plugin uses objectCategory searches a lot, and uses them
both fully qualified and in the 'short' form.  Now we test and support
this query format.

Andrew Bartlett
(This used to be commit 9ddcfacbce)
2007-10-10 14:08:55 -05:00
Andrew Bartlett
629d6ad3cf r16061: Prove that removing the objectClass list in the samldb module breaks things.
With this fix, we now correctly detect computers again, and get the
correct objectCategory, which is important for the OSX AD plugin.

Andrew Bartlett
(This used to be commit 4e39d7bb24)
2007-10-10 14:08:55 -05:00
Andrew Bartlett
b31c685ec2 r16028: Re-add the objectclass module, in the new async scheme.
Add a test to show that we need this, and to prove it works (for add
at least).

Andrew Bartlett
(This used to be commit f72079029a)
2007-10-10 14:08:51 -05:00
Simo Sorce
0c45a12b65 r13356: test utf8 usernames
(This used to be commit 7ddec83a60)
2007-10-10 13:51:48 -05:00
Andrew Bartlett
7dad66d8e3 r12998: A big update to samldb.c
This updates the module to handle both SID allocation and nextRid
updating while importing users.  (As imported users already have a
SID, so don't go via the allocation step).  We also ensure that SIDs
in the database are unquie at create time.

Furthermore, at allocation time, we double-check the SID isn't already
in use, and that we don't create a foriegnSecurityPrincipal for a
'local' sid.

Also create random samAccountName entries for users without one (we
were setting $000000-000000000000).

We may want to seperate the uniqueness code from the rest of samldb,
and into a module with the objectguid code, which needs similar
checks.  These checks also need to apply to modification, or those
modifications denied outright.

Also update part of the testsuite to validate this.

Andrew Bartlett
(This used to be commit 7a9c8eee4b)
2007-10-10 13:51:15 -05:00
Andrew Bartlett
58f78fa182 r12892: Add a 'Migrate from Windows' page to our installation section in SWAT.
Doing this required reworking ejsnet, particularly so it could take a
set of credentials, not just a username and password argument.

This required fixing the ejsnet.js test script, which now adds and
deletes a user, and is run from 'make test'.  This should prevent it
being broken again.

Deleting a user from ejsnet required that the matching backend be
added to libnet, hooking fortunetly onto already existing code for the
actual deletion.

The js credentials interface now handles the 'set machine account' flag.

New functions have been added to provision.js to wrap the basic
operations (so we can write a command line version, as well as the web
based version).

Andrew Bartlett
(This used to be commit a5e7c17c34)
2007-10-10 13:50:59 -05:00
Andrew Tridgell
ddbeaa2f65 r12324: use command line credentials if available in ldap.js
(This used to be commit f4f99f9af3)
2007-10-10 13:47:29 -05:00
Rafal Szczesniak
6d3fac3fdc r11587: Trivial testing code giving an idea of how could using
subcontexts look like.

rafal
(This used to be commit 5a338b04f3)
2007-10-10 13:45:54 -05:00
Andrew Tridgell
375922801f r11467: yay! mmc now accepts our schema. The trick was to get all the OID
mappings right for the attributeTypes field of the aggregate schema

now to add the display specifiers and I won't need the proxy module
any more
(This used to be commit 69264362bd)
2007-10-10 13:45:40 -05:00
Andrew Tridgell
6dfb09c5a5 r11463: more progress on the schema generator. mmc now accepts all parts
except the attributeTypes fields of the Aggregrate record. Proxying
just that field and the display specifiers gives us a working mmc
client

hopefully i'll work out what it doesn't like about the attributeTypes
field soon
(This used to be commit 3af867a3f4)
2007-10-10 13:45:40 -05:00
Andrew Tridgell
4298fab790 r11436: this is work in progress for generating the schema we need for our ADS
ldap server. It's still not quite right, and I'm chasing down a few
errors that mmc throws up, but its a lot closer than it was. I had to
change the approach quite substantially over the last couple of days,
but this approach now seems to be working out.
(This used to be commit 38ea11510c)
2007-10-10 13:45:37 -05:00
Rafal Szczesniak
6386f31317 r11309: A trivial test script for ejs libnet interface.
rafal
(This used to be commit deb561ea4a)
2007-10-10 13:45:17 -05:00
Andrew Tridgell
840364eb97 r10990: the beginnings of a program designed to work out the minimal schema
needed to represent all the current records on a ADS LDAP server. The
idea is we will use something based on this code to work out exactly
what schema elements we will need for our initial ADS schema. I plan
on expanding this code to automatically work out attribute properties,
and write out a schema file that we can load into ldb.

Interestingly, it looks like we only need 43 objectclasses and around
200 attributes to represent all records of a newly installed w2k3 ADS
server.
(This used to be commit 7b0ae77757)
2007-10-10 13:39:51 -05:00
Andrew Tridgell
2e61cce2b4 r10919: fixed the ldb test for the new operational module
(This used to be commit 915878d7ce)
2007-10-10 13:39:43 -05:00
Jelmer Vernooij
ffbd9313e2 r10577: Fix error in ReadFile()
(This used to be commit 04b8c473d7)
2007-10-10 13:39:06 -05:00
Jelmer Vernooij
4ad69c3dee r10576: Add testprog for named pipes. Also add GNUmakefile's for cross-compilation
using mingw32
(This used to be commit 30ba8fdc3d)
2007-10-10 13:39:06 -05:00
Jelmer Vernooij
74b26525ea r9919: Remove debug statement from samba3sam
Add SOC STATUS doc
(This used to be commit 152c1a37b5)
2007-10-10 13:36:22 -05:00
Jelmer Vernooij
08f630be82 r9915: Some more mappings. Fix weird sAMAccountName values.
(This used to be commit 8ff1358f40)
2007-10-10 13:36:21 -05:00
Jelmer Vernooij
4f4dae05f0 r9912: Fix another bug in ldb_map.
(This used to be commit 4c3b37d660)
2007-10-10 13:36:21 -05:00
Jelmer Vernooij
ca6c0af86f r9908: Generate posixUser and posixGroup as well
(This used to be commit ebed25b47d)
2007-10-10 13:36:21 -05:00
Jelmer Vernooij
e2e2508b58 r9899: Be more conservative about what is sent to the remote server in ldb_map.
(This used to be commit 76e943d441)
2007-10-10 13:36:21 -05:00
Jelmer Vernooij
1b5cb7309d r9857: Fix rename/delete issues
(This used to be commit d6dce7ef3e)
2007-10-10 13:36:18 -05:00
Jelmer Vernooij
99054eb40a r9855: Finish ldb_map testsuite
Update PLAN
Some more small other fixes
(This used to be commit 31cd5d55a9)
2007-10-10 13:36:18 -05:00
Jelmer Vernooij
b19cc95a88 r9849: Extend testsuite a bit more.
(This used to be commit 5cbe1e6b70)
2007-10-10 13:36:17 -05:00
Jelmer Vernooij
222fdd5237 r9842: More error checks in the ldb_map modules, extend testsuite
(This used to be commit b7992de4b7)
2007-10-10 13:36:17 -05:00
Jelmer Vernooij
40f85ace04 r9813: Conver testsuite for samba3sam module to EJS
(This used to be commit 77f24ed131)
2007-10-10 13:35:04 -05:00
Andrew Tridgell
030087c449 r9599: fix formatting of echo output
(This used to be commit 47c11fd886)
2007-10-10 13:34:33 -05:00
Andrew Tridgell
fef7a81478 r9491: fixed up a few scripts that need to be updated for the new GetOptions syntax. Mimir, its
a good idea to use grep -r to find places that need fixing when you change the syntax of
a call :-)
(This used to be commit 1ead49f8e8)
2007-10-10 13:34:21 -05:00
Andrew Tridgell
f72c86d4dc r9383: remove unused file
(This used to be commit dae90b6959)
2007-10-10 13:33:31 -05:00
Andrew Tridgell
a533f398aa r9345: used the data blob functions in the echo.js test code
(This used to be commit f217f08b67)
2007-10-10 13:33:26 -05:00
Andrew Tridgell
60beb50044 r9342: removed extra libinclude of base.js
(This used to be commit bda6943c31)
2007-10-10 13:33:26 -05:00
Andrew Tridgell
66c3640366 r9341: updated the winreg test program to take advantage of the new EnumValue
functionality. It now completely enumerates a winreg tree.

This would make a good basis for a js version of regshell if someone
felt like taking that on.
(This used to be commit 75d0cf78ec)
2007-10-10 13:33:26 -05:00
Andrew Tridgell
924b3cc953 r9218: make the winreg library code handle arbitrary paths more efficiently
and more conveniently (caller doesn't need to know the hive names now)
(This used to be commit dadd7e22fb)
2007-10-10 13:31:32 -05:00
Andrew Tridgell
8658136f26 r9160: use the winreg lib in the test program
(This used to be commit 33bb76ed4e)
2007-10-10 13:31:25 -05:00
Andrew Tridgell
bc43808d8b r9153: added a sample program for enumerating winreg via js
(This used to be commit 10043db676)
2007-10-10 13:31:24 -05:00
Andrew Tridgell
f6d2892faa 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);
(This used to be commit f7b49ecd08)
2007-10-10 13:30:08 -05:00
Andrew Tridgell
fc9ffba413 r8745: make ldap.js cleanup after itself
(This used to be commit 3a1c6a176e)
2007-10-10 13:30:01 -05:00
Andrew Tridgell
52371753bd r8743: automatically find the basedn in ldap.js
(This used to be commit bdca9537a2)
2007-10-10 13:30:01 -05:00
Andrew Bartlett
a7f9d9c5b8 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
(This used to be commit 0cc58f5c3c)
2007-10-10 13:30:00 -05:00
Andrew Bartlett
77e52a4e2c r8738: Test (using ejs!) the basic operation of the ldb modules.
ejs seems to test this stuff very nicely!

Andrew Bartlett
(This used to be commit 325f6d24df)
2007-10-10 13:30:00 -05:00
Andrew Tridgell
11832f7222 r8652: added a test for the boolean bug just fixed
(This used to be commit 19ae68f59a)
2007-10-10 13:29:50 -05:00
Andrew Tridgell
86d628a292 r8639: moved loadparm calls into an ejs object
(This used to be commit 2dc493eea6)
2007-10-10 13:29:48 -05:00
Andrew Tridgell
620301858a 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
(This used to be commit a978484738)
2007-10-10 13:29:48 -05:00
Andrew Tridgell
524044a64a 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
(This used to be commit 42ae50db81)
2007-10-10 13:29:47 -05:00
Andrew Tridgell
94d99612b9 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
(This used to be commit cf35818648)
2007-10-10 13:23:08 -05:00
Andrew Tridgell
4f62205cad r8486: switched to a separate connection operation in ldb interface
(a suggestion from simo)
(This used to be commit 98c9c4ecb8)
2007-10-10 13:23:08 -05:00
Andrew Tridgell
a0bc4da1a3 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
(This used to be commit 57d7a585e8)
2007-10-10 13:23:08 -05:00
Andrew Tridgell
63535f566e 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).
(This used to be commit 3093057d97)
2007-10-10 13:23:07 -05:00
Andrew Tridgell
6fafd2f055 r8413: mark exprbug() as fixed, and add a new bug
(This used to be commit c470c3ceac)
2007-10-10 13:22:59 -05:00
Andrew Tridgell
26a55c330a r8355: - added a vsprintf() function
- removed the --outputdir option from provision, as its not used any
  more (as ejs knows the real paths)
(This used to be commit abbf9c703c)
2007-10-10 13:20:10 -05:00
Andrew Tridgell
9370fca5dd r8346: added a sprintf test suite for ejs
(This used to be commit 14af014410)
2007-10-10 13:20:09 -05:00
Andrew Tridgell
1864b27857 r8317: convert the example scripts over to the new GetOptions() call
(This used to be commit 5f079d7463)
2007-10-10 13:20:06 -05:00
Andrew Tridgell
f9ff72cbda 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
(This used to be commit 2a444dedbe)
2007-10-10 13:19:33 -05:00
Andrew Tridgell
b7c6b20c37 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
(This used to be commit cd1ea857ce)
2007-10-10 13:19:32 -05:00
Andrew Tridgell
001dc40ecd 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.
(This used to be commit 757c22aab4)
2007-10-10 13:19:28 -05:00
Andrew Tridgell
2a08b29013 r8269: added automatic testing of rpc calls from ejs in 'make test'
(This used to be commit c760180119)
2007-10-10 13:19:28 -05:00
Andrew Tridgell
a343050b2b 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.
(This used to be commit eb354f6da7)
2007-10-10 13:19:26 -05:00
Andrew Tridgell
002c4f7d18 r8244: need to be careful about local vs global variables in js
(This used to be commit 763296a9b3)
2007-10-10 13:19:24 -05:00
Andrew Tridgell
14b8ce1b01 r8241: - take advantage of pointer comparison
- added testing of samr_EnumDomainGroups()
(This used to be commit dd9465af5b)
2007-10-10 13:19:24 -05:00
Andrew Tridgell
78b3ea6c26 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
(This used to be commit a929a90ed7)
2007-10-10 13:19:23 -05:00
Andrew Tridgell
d1298d9c81 r8237: expanded the samr.js test to do a samr_Connect(), samr_EnumDomains() and samr_Close()
(This used to be commit 5be26e7491)
2007-10-10 13:19:23 -05:00
Andrew Tridgell
82251eddee r8234: started on testing samr calls from ejs. So far it only does samr_Connect()
(This used to be commit 2e50a5b780)
2007-10-10 13:19:23 -05:00
Andrew Tridgell
c11204339a 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
(This used to be commit a61cdee384)
2007-10-10 13:19:21 -05:00
Andrew Tridgell
d105d5e9e4 r8218: added testing of echo_TestSurrounding() and
echo_TestDoublePointer(). All echo.idl functions are now tested and
working from ejs.
(This used to be commit c065d67769)
2007-10-10 13:19:21 -05:00
Andrew Tridgell
ce14638c04 r8217: added testing of echo_TestSleep() and echo_TestEnum() in echo js code
(This used to be commit 7fa9b8251d)
2007-10-10 13:19:21 -05:00
Andrew Tridgell
1e1a96eea6 r8214: added testing of echo_TestCall2(), which tests the union push code
(This used to be commit 1429b885fb)
2007-10-10 13:19:20 -05:00
Andrew Tridgell
5eea409d4c r8199: - we don't need to pre-declare 'var status;' everywhere
- added testing of echo_TestCall(), which uses strings
(This used to be commit 67aa628413)
2007-10-10 13:19:19 -05:00
Andrew Tridgell
3c2dc30b3e r8197: added testing of echo_SinkData() and echo_SourceData()
(This used to be commit f1d6b328c4)
2007-10-10 13:19:19 -05:00
Andrew Tridgell
0fe84a92fb r8196: - added testing of the EchoData interface in the echo test script
- add asserts on all calls for correct results
(This used to be commit 0b67754c28)
2007-10-10 13:19:18 -05:00
Andrew Tridgell
179927fea5 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
(This used to be commit 757bb7f31c)
2007-10-10 13:19:18 -05:00
Andrew Tridgell
f663c67c4e r8074: demonstrate calling echo_AddOne() from ejs
(This used to be commit 0c534699ef)
2007-10-10 13:19:05 -05:00
Andrew Tridgell
52f481b666 r8070: a (as yet not working) example of how rpc calls might be made from js scripts
(This used to be commit b9e73fa932)
2007-10-10 13:19:05 -05:00
Tim Potter
b124351079 r7261: Pass by reference is done in js via MPR_TYPE_OBJECT. Update argument
parsing and example for resolveName().
(This used to be commit 1a4a549317)
2007-10-10 13:17:33 -05:00
Tim Potter
28732d9208 r7256: Demonstrate use of resolveName() js function.
(This used to be commit b8e1d2f68e)
2007-10-10 13:17:32 -05:00
Jelmer Vernooij
8474f37dc1 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)
(This used to be commit 6731e0a654)
2007-10-10 13:17:21 -05:00
Andrew Tridgell
a8efb670df r7128: added recursion to bugs list
(This used to be commit 645e645a4e)
2007-10-10 13:17:20 -05:00
Andrew Tridgell
509e57995c r7125: demonstrate some bugs in ejs
(This used to be commit 46adb4a065)
2007-10-10 13:17:20 -05:00
Andrew Tridgell
eba9bc5eaa r7076: added demos of using ARGV[]
(This used to be commit 9679f20272)
2007-10-10 13:17:12 -05:00
Andrew Tridgell
9e5bdc3c5d r7073: added some simple example scripts for use with smbscript
(This used to be commit f1d0c00660)
2007-10-10 13:17:12 -05:00
Jelmer Vernooij
c531b7f66c r6611: Add mailslot test program
(This used to be commit fae95f740d)
2007-10-10 13:16:30 -05:00
Andrew Tridgell
14b7313543 r6541: added double pointer test to win32 echo client
(This used to be commit cb4e07744d)
2007-10-10 13:16:24 -05:00
Jelmer Vernooij
c6595e1ead r6306: Add simple WMI client test script
(This used to be commit 690a7d71d8)
2007-10-10 13:11:30 -05:00
Jelmer Vernooij
d600b78c33 r6019: Add IDL and server side code for Test_DoublePointer
(This used to be commit 0559f22bbe)
2007-10-10 13:11:15 -05:00
Jelmer Vernooij
fa9fa3d99e r6018: Add idl and server side for Test_Surrounding
(This used to be commit ed11601aef)
2007-10-10 13:11:14 -05:00
Jelmer Vernooij
1e415ce7ba r6015: Add testprogs/ directory and original rpcecho sources
( from tridges junkcode at http://samba.org/ftp/unpacked/junkcode/rpcecho-win32 )
(This used to be commit e33397f383)
2007-10-10 13:11:14 -05:00