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

282 Commits

Author SHA1 Message Date
Kamen Mazdrashki
1118c7b0e4 s4/test: change prototype for test_opendomain()
- name changed to test_domain_open to be more alike athore functions
  in utils.c file
- output parameters moved to the end param list definition just
  after mem_ctx so it is somehow more clear those params are OUT
2010-05-28 22:30:08 +03:00
Kamen Mazdrashki
8e3a433f93 s4/test: Refactor test_opendomain to address following
- param names made more clear what they stand for
- dom_sid out param is now optional, so that this function may
  be used in cases where we don't need dom_sid
- SAMR connection handle is closed as it is not used further
2010-05-28 22:30:08 +03:00
Kamen Mazdrashki
3a899e24d5 s4/test: make samr_close handle functio public
It is to be used further for closing opened handles when testing
using SAMR interface
2010-05-28 22:30:08 +03:00
Kamen Mazdrashki
cf79435545 s4/test: refactor NET-USERINFO test to be more 'torture' friendly
Test may be further refactored to be converted as a test case
(what it is actually)
2010-05-28 22:30:07 +03:00
Kamen Mazdrashki
2053403045 s4/test: test_userinfo/_async tests should use passed user_name param value 2010-05-28 22:30:07 +03:00
Kamen Mazdrashki
c2021e4211 s4/test: Connect SAMR and LDARPC pipes before calling libnet_ functions
In multi-DC environment, NBT name resolution may resolv
domain name to any of DCs.
This make this test to fail, as we are modifying the user account
on one DC and query user info immediately after that on another DC.
2010-05-26 14:36:15 +03:00
Kamen Mazdrashki
de60cbb6e7 s4/test: remove unused code
There is no need anymore to modify samAccountName
of the testing user to original value as test_cleanup()
will spot the right samAccountName to delete
2010-05-26 14:36:14 +03:00
Kamen Mazdrashki
5444272f89 s4/test: make test_cleanup() in libnet_user library more robust
test_cleanup() is called always with RDN name of the user to be deleted.
When modify-user test fails however, we end up with a user
with RDN = libnetusertest and samAccountName = random_name.
This way we can not delete the user and the error message is
quite misleading (I've spent a *lot* of time trying to figure out
if the database is corrupted because of this error).
2010-05-26 14:36:13 +03:00
Kamen Mazdrashki
bbdb838422 s4/test: rename enum test_fields{} member names to be more descriptive 2010-05-26 14:36:13 +03:00
Kamen Mazdrashki
644593d30e s4/test: Replace hand-made field count to test
This patch replaces hand-make count of fields to be tested
with defines for FIRST-LAST value for corresponding fields
to test with.

As a side-effect, 'acct_flags' is now included in tests.
2010-05-26 14:36:12 +03:00
Jelmer Vernooij
f9ca9e46ad Finish removal of iconv_convenience in public API's. 2010-05-18 11:45:30 +02:00
Stefan Metzmacher
e1e2195a4a s4:torture/rpc: rename rpc.h => torture_rpc.h
The reason for this is that some systems include
<rpc/rpc.h> from within system headers. HP-UX 11.00
does so somewhere deep inside of <shadow.h>.

For torture/winbind/struct_based.c <rpc/rpc.h> resolves
to torture/rpc/rpc.h and breaks the build.

metze
2010-04-14 20:27:11 +02:00
Jelmer Vernooij
7da94cc4a6 subunit: Support formatting compatible with upstream subunit, for consistency.
Upstream subunit makes a ":" after commands optional, so I've fixed any
places where we might trigger commands accidently. I've filed a bug
about this in subunit.
2010-04-11 20:57:33 +02:00
Günther Deschner
1248adb2c5 s4:torture/libnet:add explicit check for NTSTATUS r.out.result
Guenther
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2010-03-29 15:35:48 +02:00
Günther Deschner
3e04bf4fbc s4-smbtorture: use torture_context in libnet domain tests as well.
Guenther
2010-03-23 16:57:30 +01:00
Günther Deschner
97a974e5b7 s4-smbtorture: use torture_context for debugging output everywhere in libnet torture tests.
Mimir, please check.

Guenther
2010-03-23 16:13:54 +01:00
Günther Deschner
f5eb8eb97f s4-smbtorture: remove trailing whitespace in libnet torture tests.
Guenther
2010-03-23 16:13:54 +01:00
Andrew Bartlett
2de07761e0 s4:dsdb Change dsdb_get_schema() callers to use new talloc argument
This choses an appropriate talloc context to attach the schema too,
long enough lived to ensure it does not go away before the operation
compleates.

Andrew Bartlett
2010-03-16 19:26:03 +11:00
Stefan Metzmacher
f49d5e3288 s4:tortore/libnet: fix crash bugs because of incorrect function prototypes
metze
2010-03-15 09:40:28 +01:00
Stefan Metzmacher
f1633934cd s4:torture/libnet: make use of dcerpc_binding_handle stubs
metze
2010-03-12 15:25:52 +01:00
Stefan Metzmacher
4585ea06a5 s4:torture/libnet/libnet_user.c: fix double free in error path
metze
2010-03-11 15:13:52 +01:00
Stefan Metzmacher
dd934472e8 NET-API-BECOME-DC: convert to torture api
metze
2010-03-11 13:31:40 +01:00
Andrew Tridgell
f461a72ec3 idl: switched to using the WSPP names for the 'neighbour' DRS options
The documentation shows that all these functions in fact use the same
flags variable type. To be consistent between functions, and to allow
easy reference to the WSPP docs, it is better for us to also use this
generic DrsOptions bitfield rather than one per operations.
2010-01-18 07:25:18 +11:00
Kamen Mazdrashki
33699bb1be s4-libnet: Simple test for net.SetPassword() python binding
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
2009-12-25 14:15:53 +01:00
Andrew Bartlett
39b8f31d66 s4:dsdb Load objectGUID and extended DN defaultObjectCategory into the schema
The load of defaultObjectCategory as an extended DN means we need to
use the common parsing functions I just split out, rather than the
GET_DS_DN macro.

The objectGUIDs are loaded so that we can create the extended DN when
we load from LDIF (and are loaded for the other cases for
consistency).

Also adapt callers to API changes needed for common parsing code

Andrew Bartlett
2009-11-17 10:38:02 +11:00
Stefan Metzmacher
1012b806a7 NET-API-BECOME-DC: resolve the host name to an address before calling
libnet_BecomeDC and libnet_UnbecomeDC()

We're supposed to pass in source_dsa_address...

metze
2009-11-12 16:34:12 +11:00
Andrew Bartlett
df7546ac16 s4:dsdb/repl Split the 'convert' or 'commit' stages in the DRS import
This will allow us in future to do tests on the LDB values we generate
from the DRS replication.

Andrew Bartlett
2009-11-12 16:34:10 +11:00
Kamen Mazdrashki
ba4d87f817 s4/drs: dsdb_map_int2oid() replaced by dsdb_schema_pfm_oid_from_attid()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:43 +01:00
Kamen Mazdrashki
ddab9d1fe7 s4/drs: dsdb_verify_oid_mappings_drsuapi() replaced by dsdb_schema_pfm_contains_drsuapi_pfm()
dsdb_schema_pfm_contains_drsuapi_pfm() is part of reimplemented
prefixMap interface.

This name was choosen to clearly show, that this a week verification
in case we want to determine if remote schema is changed.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:42 +01:00
Kamen Mazdrashki
a83385303b s4/drs: dsdb_load_oid_mappings_drsuapi() -> dsdb_load_prefixmap_from_drsuapi()
Also, dsdb_load_oid_mappings_drsuapi() was reimplemented to use
dsdb_schema_pfm_from_drsuapi_pfm() function to load
drsuapi_prefixMap into schema->prefixmap

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2009-11-06 14:05:41 +01:00
Andrew Tridgell
98e4393df9 s4-dsdb: create a static system_session context
This patch adds a system_session cache, preventing us from having to
recreate it on every ldb open, and allowing us to detect when the same
session is being used in ldb_wrap
2009-10-23 14:52:17 +11:00
Andrew Tridgell
9c9e853c77 s4-torture: fixed double free in libnet_group test 2009-10-22 18:46:27 +11:00
Andrew Tridgell
84d0047377 s4-torture: ran minimal_includes.pl over source4/torture
This reduces compile time somewhat.
2009-10-20 16:04:46 +11:00
Andrew Tridgell
bfd0877261 s4-repl: don't do double replication
When we replicate from a remote DC, we need to note the new uSN that
the local changes have resulted in, and modify the uSN that the notify
task uses to determine if it should send a ReplicaSync message back to
the remote DC. Otherwise we end up always triggering a ReplicaSync
every time we replicate from another DC
2009-09-15 14:52:23 -07:00
Andrew Bartlett
58e8db912d s4:libnet Allow 'net password change' to work on expired passwords
We need to pass down flags to the DCE/RPC layer to allow fallback to
anonymous connections, as we can't log in with an expired password.

The anonymous connection can then change the password with SAMR.

Andrew Bartlett
2009-06-18 13:49:30 +10:00
Andrew Tridgell
9539e2b508 major upgrade to the ldb attribute handling
This is all working towards supporting the full WSPP schema without a
major performance penalty.

We now use binary searches when looking up classes and attributes. We
also avoid the loop loading the attributes into ldb, by adding a hook
to override the ldb attribute search function in a module. The
attributes can thus be loaded once, and then saved as part of the
global schema. 

Also added support for a few more key attribute syntaxes, as needed
for the full schema.
2009-04-02 16:42:21 +11:00
Kai Blin
855d2a927e s4 libnet: Add support for groupinfo by sid lookup 2008-12-29 12:52:27 +01:00
Jelmer Vernooij
dcc4081f75 Fix more compiler warnings. 2008-12-23 23:22:57 +01:00
Günther Deschner
bb1d7684d2 s4-samr: merge samr_LookupDomain from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
61391d0ade s4-samr: merge samr_LookupNames from s3 idl. (fixme: python)
Guenther
2008-11-10 21:46:30 +01:00
Günther Deschner
3206f35527 s4-srvsvc: merge srvsvc_NetShareAdd from s3 idl.
Guenther
2008-10-31 02:44:31 +01:00
Günther Deschner
0b95cb251c s4-srvsvc: merge srvsvc_NetShareInfo502 from s3.
Apparently both s3 and s4 are not entirely correct one this. metze is looking
into hand-marshalling security descriptors so this will fix this finally. For
now, just keep the two in sync.

Guenther
2008-10-31 02:44:29 +01:00
Jelmer Vernooij
23302413b3 Remove unused include param/param.h. 2008-10-24 16:37:56 +02:00
Jelmer Vernooij
87ec1d2532 Make sure prototypes are always included, make some functions static and
remove some unused functions.
2008-10-20 18:59:51 +02:00
Jelmer Vernooij
9565999755 Fix include paths to new location of libutil. 2008-10-11 21:31:42 +02:00
Stefan Metzmacher
29049aa670 drsuapi: print out the number of linked attribute values we got
metze
(This used to be commit 34f8b2abdd)
2008-07-16 14:42:12 +02:00
Stefan Metzmacher
f0e44c35af drsuapi: make use of the 'more_data' field in DsGetNCChangesCtr[1|6]
metze
(This used to be commit 35c7fa470a)
2008-07-16 14:42:11 +02:00
Stefan Metzmacher
c6ea7f0221 drsuapi: total_object_count was the wrong guess
The total_object_count member of DsGetNCChangesCtr[1|6] was wrong
it's the error code of an extended operation.

DsGetNCChangesCtr6 has a nc_object_count value which contains
the estimated amount of objects in the naming_context.

W2k seems to have a bug and sends this number of objects
in the extended_ret field. Maybe it's just a bug and
not a feature:-)

metze
(This used to be commit 6793109212)
2008-07-16 12:16:58 +02:00
Stefan Metzmacher
dfb1ba3d9e NET-API-BECOME-DC: fix crash bugs because of unintialized variables
metze
(This used to be commit 6acf42c2e4)
2008-07-16 12:12:29 +02:00
Simo Sorce
929adc9efa Make up the right dependencies now that ldb depends on libevents
(This used to be commit 3b8eec7ca3)
2008-06-14 11:59:19 -04:00