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

330 Commits

Author SHA1 Message Date
Stefan Metzmacher
d9573ae076 s4:libnet: let libnet_rpc_usermod() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
5bbcec0c2a s4:libnet: let libnet_rpc_userdel() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
adef841a59 s4:libnet: let libnet_rpc_useradd() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:52 +01:00
Stefan Metzmacher
e3b8df2b09 s4:libnet: let libnet_rpc_useradd_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
208991e497 s4:libnet: let libnet_rpc_userinfo() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
59fb19ebc4 s4:libnet: let libnet_rpc_userinfo_send() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
7a97662bb5 s4:libnet: let libnet_rpc_groupadd() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Stefan Metzmacher
959d94b153 s4:libnet: let libnet_rpc_groupinfo() take tevent_context/dcerpc_binding_handle
This avoids usage/dereferencing 'struct dcerpc_pipe'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2014-01-16 16:22:51 +01:00
Matthieu Patou
e3b6b465ee Force cast to long as on some platform tv_usec is 32bit long
Autobuild-User(master): Matthieu Patou <mat@samba.org>
Autobuild-Date(master): Mon Sep 10 07:33:50 CEST 2012 on sn-devel-104
2012-09-10 07:33:50 +02:00
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