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

321 Commits

Author SHA1 Message Date
Andrew Bartlett
fd2b21fc38 s4-libnet: Add mem_ctx to libnet_rpc_useradd calls (bug #8889) 2012-04-30 13:08:28 +02:00
Stefan Metzmacher
84ae92da6b s4:libnet: pass an explicit mem_ctx to libnet_rpc_userinfo_send() (bug #8889)
This hopefully fixes the flakey autobuild.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Apr 24 16:43:03 CEST 2012 on sn-devel-104
2012-04-24 16:43:03 +02:00
Jelmer Vernooij
1c1b10f1d9 torture/libnet: Include prototype headers. 2012-02-07 01:11:07 +01:00
Andrew Bartlett
c091a92be5 s4-param Remove 'sam database' parameter
This now just relies on the private dir parameter, which remains.

Andrew Bartlett
2011-06-06 15:02:38 +10:00
Andrew Bartlett
7261a9b9f7 s4-libcli Remove resolve_name() as it conflicts with Samba3.
This was just a wrapper around resolve_name_ex(), so just call that
instead.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Jelmer Vernooij
9fc2e6c352 Use TestCase.get_credentials() where possible. 2011-01-03 01:48:05 +01:00
Jelmer Vernooij
35fbc7bbda s4-smbtorture: Make test names lowercase and dot-separated.
This is consistent with the test names used by selftest, should
make the names less confusing and easier to integrate with other tools.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
2010-12-11 04:16:13 +01:00
Jelmer Vernooij
1229935aa9 torture/becomedc: Add test for global schema, use samdb_connect().
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Oct 12 18:35:33 UTC 2010 on sn-devel-104
2010-10-12 18:35:33 +00:00
Andrew Tridgell
0009d1771a s4-libnet: print the domain name on domain open failure
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2010-09-15 15:39:36 +10:00
Kamen Mazdrashki
35aed17b26 s4-test: refactor API-DELETEUSER test a little to:
- fail torture_context in case libnet_DeleteUser() has failed
 - make use of torture_assert_* macros to track down where failur occured
 - use only one memory context internally
2010-09-05 23:34:28 +03:00
Björn Jacke
f222387533 s4: use GetTimeOfDay macro instead of gettimeofday 2010-08-31 11:33:22 +02:00
Stefan Metzmacher
b1a584f9dc s4:torture/libnet: avoid dereferencing dcerpc_binding_handle internals
metze
2010-08-02 17:42:49 +02:00
Andrew Tridgell
6b266b85cf s4-loadparm: 2nd half of lp_ to lpcfg_ conversion
this converts all callers that use the Samba4 loadparm lp_ calling
convention to use the lpcfg_ prefix.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-07-16 18:24:27 +10:00
Andrew Tridgell
4cb423f527 s4-python: python is not always in /usr/bin
Using "#!/usr/bin/env python" is more portable. It still isn't ideal
though, as we should really use the python path found at configure
time. We do that in many places already, but some don't.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
2010-06-24 18:46:57 +10:00
Jelmer Vernooij
c92db7b6dc python: Use samba.tests.TestCase, make sure base class tearDown and
setUp methods are called, fix formatting.
2010-06-19 22:46:45 +02:00
Stefan Metzmacher
6dbcffb51d s4:lib: merge LDB_WRAP and LDBSAMBA and make LDBSAMBA a library.
This is needed to remove samba specifc symbols from the bundled
ldb, in order to get the ABI right.

metze

Signed-off-by: Andreas Schneider <asn@samba.org>
2010-06-16 14:07:28 +02:00
Andrew Bartlett
ecf782da87 s4:torture Rework NET-API-BECOMEDC test to use libnet_vampire callbacks.
The libnet_vampire code was derived from this code in the first place,
but has continued to evolve, while this code has often bitrotted.
This avoids the needless duplication of the callbacks, while keeping
the toture wrapper.

Andrew Bartlett

Signed-off-by: Kamen Mazdrashki <kamenim@samba.org>
2010-06-15 10:51:34 +10:00
Kamen Mazdrashki
c65eb4852c s4/test-libnet: Re-align code a bit - more readable this way IMO 2010-06-11 17:46:36 +03:00
Kamen Mazdrashki
9baa73053e s4/test-libnet: Refactor test_group_create() a little to:
- Close unused policy handle for created group
- re-align code - it is more readable this way IMHO
2010-06-11 17:46:35 +03:00
Kamen Mazdrashki
6eecb968cb s4/test-libnet: Refactor test_user_create() little bit to:
- fix a flaw that user RID is not returned in case
  user is recreated
- close unused policy handle to created user
- do not take into account the result from
  test_samr_close_handle - we don't case
2010-06-11 17:46:35 +03:00
Kamen Mazdrashki
a735c1ade2 s4/test-libnet: add few comments for utility functions 2010-06-11 17:46:35 +03:00
Kamen Mazdrashki
84fb3ed8a5 s4/test-libnet: Move LSA close handle function to a common location 2010-06-11 17:46:34 +03:00
Kamen Mazdrashki
8714f130e5 s4/test-libnet: remove unused code
Pre-connecting SAMR and LSA pipes is implemented in
test_libnet_context_init() function
2010-06-11 17:46:34 +03:00
Kamen Mazdrashki
7168b1c99f s4/test-libnet: Fix compile-time warning 2010-06-11 17:46:34 +03:00
Kamen Mazdrashki
1ceb0dd92f s4/test: use test_libnet_context_init() function to create libnet_context
This way we ensure that LIBNET call will be issued against
the DC we are testing against
2010-06-11 01:20:10 +03:00
Kamen Mazdrashki
d6d8ec80f9 s4/test: fix SEGFAULT in test_group_create when rid is NULL
Caller of this function may not need group RID and
in such case it passes NULL for rid parameter
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
eda4926120 s4/test-libnet: Helper func to initialize libnet_context
and create rpc connections to SAMR and LSA pipes.
This function should be used in cases where we need
'deterministic' connection to the DC we are testing against.

The problem is that most of the test follow the pattern:
1. Connect to server supplied on command line
2. Create user/group through connection in 1.
3. Use 'fresh' libnet_context to query/alter the object in
   step 2.

In singe-DC environment this work well. But in multiple-DC
environment libnet may connect to another DC (step 3), not
the one we use in step 1 and 2. This leads to false error -
object created in step 2 is not found on DC we are querying
in step 3.
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
85d7863b2c s4/test: Call test_user_cleanup with original RDN for the user
'name' var is changed during the test execution and should
contain samAccountName for the user, while test_user_cleanup()
expects account RDN to be passed
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
61e5ac4a5a s4/test: Fix incorrect NTSTATUS comparison
In case group already exists, we should get NT_STATUS_GROUP_EXISTS.
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
64a71d380c s4/test: remove create/delete group implementation in API-CREATEGROUP test
We already have common implementation for create/delete
group in libnet/utils.c
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
d02c395abd s4/test: Remove duplicated test_opendomain() functionality
We already have a nice common test_domain_open()
function in libnet/util.c
2010-06-11 01:20:09 +03:00
Kamen Mazdrashki
7135abcd8d s4/test: libnet_user tests should use common test_user_cleanup
implementation instead of not-so-informative test_cleanup()
2010-06-11 01:20:08 +03:00
Kamen Mazdrashki
d1bcc23b2c s4/test: Refactor test_user_cleanup to be more robust
We always call this function with user's account RDN
while samr_LookupNames() searches for samAccountName.
2010-06-11 01:20:08 +03:00
Kamen Mazdrashki
1b8a8ddfe0 s4/test: remove duplicated comment 2010-06-11 01:20:08 +03:00
Kamen Mazdrashki
c9c8de3dcb s4/test-libnet: Remove multiple test_samr_close() impelementations
We now have a nice common test_samr_close_handle() function to use
2010-05-28 22:30:10 +03:00
Kamen Mazdrashki
c742f59bd2 s4/test-libnet-user: Remove test_createuser()
We have same functionality already implemented by
test_user_create() in libnet/utils.c
2010-05-28 22:30:10 +03:00
Kamen Mazdrashki
0f2263016f s4/test-libnet-utils: refactor test_user_create()
- param names made more clear what they stand for
- user RID out param is now optional, so that this function may
  be used in cases where we don't need user RID
- SAMR connection handle is closed as it is not used further
  (we should play nice with servers)
2010-05-28 22:30:09 +03:00
Kamen Mazdrashki
8dedb4d06e s4/test: remove local impl for open_domain and use common one 2010-05-28 22:30:09 +03:00
Kamen Mazdrashki
fce427134d s4/test: remove torture/libnet/utils.h as we are using proto.h now 2010-05-28 22:30:09 +03:00
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