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

5299 Commits

Author SHA1 Message Date
Michael Adam
d92b955cca s4:torture:smb2:durable-open: fix a silly access-after-free panic
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Feb 28 08:33:44 CET 2012 on sn-devel-104
2012-02-28 08:33:44 +01:00
Michael Adam
60a4095936 s4:torture:smb2: add new "session" testsuite starting with a session.reconnect test 2012-02-28 00:08:55 +01:00
Michael Adam
ba4acf05b2 s4:torture:smb2: add durable_open.reopen2a - variant of reopen2 with session reconnect 2012-02-28 00:08:54 +01:00
Michael Adam
1d9df362b2 s4:torture:smb2: add torture_smb2_connection_ext() that takes previous_session 2012-02-28 00:08:54 +01:00
Michael Adam
681bca6768 s4:torture:smb2: add previous_session argument to torture_smb2_session_setup()
To allow for doing a session reconnect
2012-02-28 00:08:53 +01:00
Michael Adam
69a64e6695 s4:libcli:smb2: add a previous session argument to smb2_session_setup_spnego()
So that we can do a session reconnect.
2012-02-28 00:08:53 +01:00
Andrew Tridgell
d21f7783f6 torture: don't check the NOINDEXED bit in attribute comparison
this bit is dependent on user settings on the filesystem

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2012-02-27 07:36:05 +01:00
Michael Adam
8e947f0f5d s4:torture:smb2:durable-open: prevent using a disconnected handle in reopen4
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Feb 27 03:44:16 CET 2012 on sn-devel-104
2012-02-27 03:44:16 +01:00
Michael Adam
6deec81b8e s4:torture:smb2:durable-open: introduce new variable for the new session
This is to clarify the code.
2012-02-27 02:08:28 +01:00
Michael Adam
d5cefee6fc s4:torture:smb2:durable-open: make a comment more precise in the reopen4 test 2012-02-27 02:08:27 +01:00
Michael Adam
b041d28fea s4:torture:smb2:durable_open: use the correct tree in the final close call 2012-02-27 02:08:27 +01:00
Michael Adam
77889f63e6 s4:torture:smb2: add a durable-open.open-oplock test
this is a variant of the open-lease test that does the initial
durable open with a batch oplock instead of a RH lease.

This is e.g. useful do analyse a (mis?) behaviour with current
windows 8 preview versions, compared to w2k8r2

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Feb 21 19:51:21 CET 2012 on sn-devel-104
2012-02-21 19:51:21 +01:00
Michael Adam
1f1ff1cf0a s4:torture:smb2: extend and prettify comment for durable-open.open-lease test 2012-02-21 18:11:07 +01:00
Michael Adam
0d3d8256d8 s4:torture:smb2:durable-open: rename the open test to open-lease 2012-02-21 18:11:06 +01:00
Michael Adam
a36e257160 s4:torture:smb2: move some initialization and call to smb2_create together in durable-open.open test 2012-02-21 18:11:06 +01:00
Michael Adam
65da3b74fa s4:torture:smb2: fix a typo in the durable-open.open test file name 2012-02-21 18:11:06 +01:00
Michael Adam
9d66ad8c30 s4:torture:smb2: invalidate the handle after the connection has been killed
Not to run into using the old handle with a new tree connect in the error case.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Feb 20 18:34:48 CET 2012 on sn-devel-104
2012-02-20 18:34:48 +01:00
Michael Adam
71164cef61 s4:torture: improve comment for the smb2.durable-open.reopen1 test 2012-02-20 17:02:24 +01:00
Andrew Bartlett
f433baa3c8 auth: Make more of the ntlmssp code private or static
Now that there is only one gensec_ntlmssp server, some of these functions can be static

For the rest, put the implemtnation of the gensec_ntlmssp code into ntlmssp_private.h

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-02-17 10:48:10 +01:00
Björn Baumbach
83d0a860a1 s4-selftest: fix output of opened connections in torture_holdcon
Signed-off-by: Michael Adam <obnox@samba.org>
2012-02-16 12:07:32 +01:00
Christian Ambach
ad2a2c4e3a s4:torture: add another SMB2 rename test
this mimics Word 2010 saving a file

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Mon Feb 13 18:33:43 CET 2012 on sn-devel-104
2012-02-13 18:33:43 +01:00
Christian Ambach
bff119a3b7 s4:torture: add some SMB2 renaming tests 2012-02-10 13:28:08 +01:00
Jelmer Vernooij
1c1b10f1d9 torture/libnet: Include prototype headers. 2012-02-07 01:11:07 +01:00
Michael Adam
877d4e048e s4:torture: add a smb2.durable_open.reopen4 test
open a durable handle, logoff, new sessions setup, try durable reopen (fail),
open tcon, durable reopen (succeed)

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Feb  3 12:45:34 CET 2012 on sn-devel-104
2012-02-03 12:45:34 +01:00
Michael Adam
a4fd3eb4a9 s4:torture: add a torture_smb2_session_setup() utility function 2012-02-03 11:10:30 +01:00
Michael Adam
adb9b7fbf0 s4:torture: add smb2.durable_open test reopen3
Do a durable open, tdis, tree_connect, durable reopen -> fail
2012-02-03 11:10:30 +01:00
Michael Adam
7c7e1fd5c7 s4:torture: add torture_smb2_tree_connect() utility function
This does a tcon based on an existing session, using the
name an host present in the torture context.
2012-02-03 11:10:30 +01:00
Michael Adam
1d8fbff7ff s4:torture: add smb2.durable_open test reopen2
durable open, disconnect, new seession, durable reopen
2012-02-03 11:10:30 +01:00
Michael Adam
f9e85d09b3 s4:torture: add smb2.durable_open test reopen1 2012-02-03 11:10:30 +01:00
Michael Adam
97823b69e9 s4:libcli/torture:smb2: change smb2_tree_connect to take a smb2_session instead of smb2_tree arguement.
Only the tree->session is needed. This way it is less confusing.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-02-03 11:10:30 +01:00
Michael Adam
ce5fc22896 s4:torture:smb2: talloc_free the right tree structure in secondary_tcon()
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-02-03 11:10:30 +01:00
Michael Adam
87cf808edb s4:torture:smb2: check for success of talloc in secondary_tcon()
Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
2012-02-03 11:10:29 +01:00
Michael Adam
5f19eb8e58 s4:torture:smb2:notify: remove an unused variable 2012-02-03 11:10:29 +01:00
Michael Adam
48ee2c3450 s4:torture:smb2:notify: remove an unused variable 2012-02-03 11:10:29 +01:00
Michael Adam
3116592552 s4:torture:smb2: remove an unused variable from torture_smb2_setinfo() 2012-02-03 11:10:29 +01:00
Christof Schmitt
c892217a12 smbtorture: Do not leak child processes when exiting
When some child processes could not be created, smbtorture would exit
and leave the successfully started child processes running.  Add a loop
to kill the existing child processes for this case.

Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu Feb  2 01:35:27 CET 2012 on sn-devel-104
2012-02-02 01:35:27 +01:00
Andrew Bartlett
eecf2ac4c8 selftest: Remove unused support for --exeext 2012-02-01 02:45:07 +01:00
Andrew Bartlett
697a6e9504 auth: provide private pointer and do not return original PAC signatures
There is no need to return the PAC signatures via the special-purpose
torture element.  Instead, use a private pointer on the auth_context
in conjunction with the private PAC processing method.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Sun Jan 29 23:52:50 CET 2012 on sn-devel-104
2012-01-29 23:52:50 +01:00
Amitay Isaacs
4444612b86 s4-torture: For authenticated users, add AUTHENTICATED USERS sid
Autobuild-User: Amitay Isaacs <amitay@samba.org>
Autobuild-Date: Wed Jan 25 01:36:02 CET 2012 on sn-devel-104
2012-01-25 01:36:02 +01:00
David Disseldorp
3bfcf343cf torture: add spoolss overlapping driver deletion tests
Signed-off-by: Andreas Schneider <asn@samba.org>

Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Fri Jan 20 18:20:14 CET 2012 on sn-devel-104
2012-01-20 18:20:14 +01:00
David Disseldorp
b37f66c7b7 torture: confirm printer driver file removal
Signed-off-by: Andreas Schneider <asn@samba.org>
2012-01-20 17:44:01 +01:00
David Disseldorp
cc8cd7b038 torture: add spoolss del printer driver test
Test handling of DeletePrinterDriverEx when the DPD_DELETE_ALL_FILES
flag is set.

Signed-off-by: Andreas Schneider <asn@samba.org>
2012-01-20 17:43:54 +01:00
David Disseldorp
2fd4be0085 s4-smbtorture: tweak spoolss_OpenPrinterEx devmode
Flip some bits after the null terminator in the spoolss device mode
character arrays to trigger bug 8606.

Signed-off-by: Jeremy Allison <jra@samba.org>
2012-01-13 09:37:36 -08:00
Stefan Metzmacher
6ee628341f LDAP-CLDAP: demonstrate that pdc name is not an unc path
For LOGON_SAM_LOGON_RESPONSE_EX and LOGON_SAM_LOGON_USER_UNKNOWN_EX,
pdc name is not in unc path form.

[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan  4 20:06:14 CET 2012 on sn-devel-104
2012-01-04 20:06:14 +01:00
Matthias Dieter Wallnöfer
55db69198b s4:torture/nbt/dgram.c - NBT samlogon requests don't return the PDC name as UNC path
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-01-04 18:33:06 +01:00
Stefan Metzmacher
bf0da0b4f7 LDAP-CLDAP: demonstrate that pdc name is an unc path
For LOGON_SAM_LOGON_RESPONSE and LOGON_SAM_LOGON_USER_UNKNOWN,
I assume all levels without _EX in the name, pdc name is
in unc path form.

[MS-ADTS] 7.3.1.* uses UnicodeLogonServer, which seems to be in unc form,
while NetbiosComputerName is not in unc form.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jan  4 13:37:42 CET 2012 on sn-devel-104
2012-01-04 13:37:42 +01:00
Stefan Metzmacher
f9b1fb02df s4:torture/nbt/dgram.c: NBT samlogon requests without _EX return the PDC name as UNC path
metze
2012-01-04 11:56:11 +01:00
Matthias Dieter Wallnöfer
4fd1220f9a s4:torture/rpc/netlogon.c - enhance the "DsRGetDCName*" tests
To check for the expected behaviour (DS_* flags). Always according to
MS-NRPC 2.2.1.2.1.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jan  2 20:43:05 CET 2012 on sn-devel-104
2012-01-02 20:43:05 +01:00
Andrew Bartlett
c76ffcf3c4 s4-toture: Rename memory contexts in rpc.pac for greater clarity
This should better follow the mem_ctx/tmp_ctx pattern used elsewhere in Samba.

Thankyou Simo for the suggestion.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Dec 29 14:14:06 CET 2011 on sn-devel-104
2011-12-29 14:14:06 +01:00
Andrew Bartlett
fe693e9148 s4-torture: Demonstrate handling of the PAC in a custom auth_context
This demonstrates how a different function pointer can be supplied
to handle the PAC blob, without depending on the provisioned samdb etc.

Andrew Bartlett
2011-12-29 14:01:55 +11:00
Matthias Dieter Wallnöfer
31db5e667b s4:torture/rpc/netlogon.c - factor out the computer name check in an own test
This check is by no ways specific to "DsRGetSiteName" and hence it should
be factored out in an own function.
Samba at the moment does not implement the expected behaviour so I have
added the "torture_skip" action.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Fri Dec 23 12:17:48 CET 2011 on sn-devel-104
2011-12-23 12:17:48 +01:00
Stefan Metzmacher
2f5e9aae86 s4-torture: Test rpc schannel netr_LogonGetCapability.
metze
2011-12-22 17:48:24 +01:00
Stefan Metzmacher
714954c16f s4:torture/rap/printing: check smbcli_rap_netprintqgetinfo() WERR status
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Dec 17 01:09:32 CET 2011 on sn-devel-104
2011-12-17 01:09:32 +01:00
Günther Deschner
030ccc42b9 s4-smbtorture: make sure we can successfully run the schannel test against windows.
lsa lookupsids3/lookupnames4 is only available over schannel sealed
ncacn_ip_tcp.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec 14 17:28:29 CET 2011 on sn-devel-104
2011-12-14 17:28:29 +01:00
Andreas Schneider
be288b0c82 s4-torture: LookupSids3 is only available over NCACN_IP_TCP.
Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Wed Dec 14 15:39:58 CET 2011 on sn-devel-104
2011-12-14 15:39:58 +01:00
Andreas Schneider
e917c7b0ee s4-torture: Fix schannel test against win2k8. 2011-12-14 13:41:28 +01:00
Günther Deschner
19411c9953 s4-smbtorture: fix some typos in schannel test.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Dec 14 02:52:54 CET 2011 on sn-devel-104
2011-12-14 02:52:54 +01:00
Günther Deschner
87be316c57 s4-smbtorture: avoid printf(); in schannel test.
Guenther
2011-12-14 01:18:04 +01:00
Günther Deschner
b550ead171 s4-smbtorture: remove trailing whitespace from schannel test.
Guenther
2011-12-14 01:18:04 +01:00
Andrew Bartlett
47a4388b91 s4-torture Do not use a fixed password for forest trust tests
It is much better to always use random passwords.

Andrew Bartlett
2011-12-12 12:57:08 +01:00
Andrew Bartlett
29635c93d7 s4-torture cope with servers earlier than Windows 2008
Only Win2008 started to support new encryption types.

Andrew Bartlett
2011-12-12 12:57:08 +01:00
Andrew Bartlett
8d3e86d6ae s4-torture Modify rpc.lsa.forest.trust test to progress further FL Win2003 R2
This modification is required to pass against a domain in functional
level Windows 2003 or later.

Andrew Bartlett
2011-12-12 12:57:08 +01:00
Andrew Bartlett
5ae24e1cc0 s4-torture: Fix comment 2011-12-12 12:57:08 +01:00
Andrew Bartlett
c79db40040 torture: do not reuse bindings between pipes
This avoids connecting to the netlogon server over \pipe\lsarpc

This works against windows because all pipes are implemented in the same
process, but not Samba4, and relying on this is not recommended in the WSPP docs.

Andrew Bartlett
2011-12-12 12:57:07 +01:00
Jelmer Vernooij
05bc4de083 Revert making public of the samba-module library.
This library was tiny - containing just two public functions than were
themselves trivial. The amount of overhead this causes isn't really worth the
benefits of sharing the code with other projects like OpenChange. In addition, this code
isn't really generically useful anyway, as it can only load from the module path
set for Samba at configure time.

Adding a new library was breaking the API/ABI anyway, so OpenChange had to be
updated to cope with the new situation one way or another. I've added a simpler
(compatible) routine for loading modules to OpenChange, which is less than 100 lines of code.

Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Dec  3 08:36:33 CET 2011 on sn-devel-104
2011-12-03 08:36:30 +01:00
Stefan Metzmacher
4afbda221c s4:libcli/raw: implement on top of smbXcli_conn/req
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Nov 30 15:13:36 CET 2011 on sn-devel-104
2011-11-30 15:13:36 +01:00
Stefan Metzmacher
4877be53df s4:libcli: move smbcli_transport_establish() logic into smbcli_socket_connect()
metze
2011-11-30 13:41:08 +01:00
Stefan Metzmacher
511dc9358d s4:torture: use tctx->ev as event context for polling
metze
2011-11-29 16:00:08 +01:00
Stefan Metzmacher
46f0b73c8a s4:gentest: get the tid from the smbcli_tree struct
metze
2011-11-29 16:00:08 +01:00
Stefan Metzmacher
1764607150 s4:torture/rpc: use talloc_zero() in torture_join_domain()
metze
2011-11-29 09:21:25 +01:00
Matthias Dieter Wallnöfer
0e526062a4 s4:torture/ldap/cldap.c - remove the "test_cldap_netlogon_flag_ds_dns_forest" test
The test is wrong since the DNS_* (DS_DNS_CONTROLLER, DS_DNS_DOMAIN,
DS_DNS_FOREST_ROOT) flags are never set on the plain CLDAP pipe. They
get added only over the DsRGetDCName* calls over NETLOGON RPC.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Nov 27 16:23:27 CET 2011 on sn-devel-104
2011-11-27 16:23:27 +01:00
Matthieu Patou
9e6c88bda5 smbtorture: avoid sigsev if the password is not correct
Signed-off-by: Matthias Dieter Wallnöfer <mdw@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-11-26 10:17:39 +01:00
Stefan Metzmacher
300343d16c s4:libcli/smb2: implement on top of smbXcli_conn/req
metze
2011-11-24 19:02:33 +01:00
Stefan Metzmacher
378c21a72a s4:torture/smb2: use tctx->ev as event context for polling
metze
2011-11-24 19:02:33 +01:00
Jeremy Allison
3e6e1aed94 Fix a bunch of "warning: variable ‘XXXX’ set but not used [-Wunused-but-set-variable]" warnings from the new gcc.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Mon Nov 21 23:39:08 CET 2011 on sn-devel-104
2011-11-21 23:39:08 +01:00
Günther Deschner
1781415196 s4-smbtorture: add ndr test for nbt_netlogon_packet to avoid future regressions.
Guys, we really should make sure to always add ndr tests like this whenever we
change some sensitive libndr or handmarshalling bits.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Sun Nov 20 23:10:39 CET 2011 on sn-devel-104
2011-11-20 23:10:39 +01:00
Matthias Dieter Wallnöfer
793f1a5478 s4:torture/rpc/samr.c - use "NULL" instead of "0" when initialising pointers 2011-11-15 21:01:36 +01:00
Günther Deschner
d48f08fefb s4-smbtorture: add spoolss_OpenPrinterEx ndr test with full devmode.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Nov 14 20:21:48 CET 2011 on sn-devel-104
2011-11-14 20:21:48 +01:00
Michael Adam
4c52e8f68b s4:torture:smb2: rewrite durable-open.open test to use smb2_*_create functions
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Nov  9 02:36:36 CET 2011 on sn-devel-104
2011-11-09 02:36:36 +01:00
Michael Adam
9d862c00e5 s4:torture:smb2: rewrite the durable-open.lock test to use smb2_lease_create() 2011-11-09 01:02:09 +01:00
Michael Adam
0652b21c68 s4:torture:smb2: rewrite the durable-open.lease test to use smb2_lease_create() 2011-11-09 01:02:09 +01:00
Michael Adam
cda10063ab s4:torture:smb2: rewrite the durable-open.oplock test to use smb2_oplock_create() 2011-11-09 01:02:08 +01:00
Michael Adam
5d3b6aa674 s4:torture:smb2: rewrite the durable-open.file-position test to use smb2_oplock_create() 2011-11-09 01:02:08 +01:00
Michael Adam
6e721fdd43 s4:torture:smb2: rewrite the durable-open.open2 test to use smb2_lease_create_share() 2011-11-09 01:02:08 +01:00
Michael Adam
afc94fea2a s4:torture:smb2: rewrite the durable-open.open1 test to use smb2_oplock_create_share() 2011-11-09 01:02:08 +01:00
Michael Adam
cb98e31b24 s4:torture:smb2: add smb2_oplock_create_share() that takes sharemode as parameter 2011-11-09 01:02:08 +01:00
Michael Adam
901cab2def s4:torture:smb2: add smb2_lease_create_share() that takes a sharemode as parameter 2011-11-09 01:02:08 +01:00
Michael Adam
ef6c0974a0 s4:torture:smb2: add smb2_generic_create_share() that also takes the sharemode as parameter 2011-11-09 01:02:08 +01:00
Michael Adam
4746edc55d s4:torture:smb2: move the smb2_create_*() utility functions from lease.c to util.c for re-use 2011-11-09 01:02:08 +01:00
Michael Adam
a5d8614e63 s4:torture:smb2: use smb2_util_oplock_level() in the durable-open test for convenience 2011-11-09 01:02:08 +01:00
Michael Adam
3078c27be1 s4:torture:smb2: lease: oplock_level is uint8_t, not uint32_t or int 2011-11-09 01:02:08 +01:00
Michael Adam
7f1920801b s4:torture:smb2: move oplock() from lease.c to smb2_util_oplock_level() in util.c for re-use 2011-11-09 01:02:08 +01:00
Michael Adam
b47edad673 s4:torture:smb2: extract map_sharemode() to smb2_util_share_access() in util.c 2011-11-09 01:02:08 +01:00
Michael Adam
4ea5ac04b2 s4:torture:smb2: use common smb2_util_lease_state() in the lease tests 2011-11-09 01:02:08 +01:00
Michael Adam
33ccdf88f9 s4:torture:smb2: extract map_lease() to util.c as smb2_util_lease_state(). 2011-11-09 01:02:08 +01:00
Michael Adam
9fe4709a4b s4:torture:smb2: fix illegal write/uninitialized data bug in the lease.multibreak test 2011-11-09 01:02:08 +01:00
Michael Adam
b76bd39b6f s4:torture:smb2: lease.update2: some more reasonable struct names and a comment 2011-11-09 01:02:08 +01:00
Michael Adam
8dab942d1c s4:torture:smb2: change the test file name in the durable-open.oplock test
to a more reasonable name. This one must have been copied
from the durable-open.lease test.
2011-11-09 01:02:07 +01:00
Günther Deschner
8a18edf1c2 samr: filterModuleName is a lsa_String in userPwdChangeFailureInformation.
The entire marshalling of samr_ChangePasswordUser3 broke with c2685cdedb.

Matthias, the bad effect of this change was that actually all failed password
change attempts will always return NT_STATUS_OK because the last 4 bytes (the
resulting status code) were not marshalled anymore.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed Nov  9 00:41:13 CET 2011 on sn-devel-104
2011-11-09 00:41:13 +01:00
Günther Deschner
bfe084bd8b s4-smbtorture: demonstrate how broken our samr_ChangePasswordUser3 marshalling is...
Guenther
2011-11-08 23:00:40 +01:00
Günther Deschner
79ab7ac33b s4-smbtorture: add some ndr validation tests for netlogon_samlogon_response structs.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Nov  3 20:08:20 CET 2011 on sn-devel-104
2011-11-03 20:08:20 +01:00
Günther Deschner
185b94eefa nbt: trim down header dependencies of nbt.idl.
Guenther
2011-11-03 18:35:08 +01:00
Michael Adam
06f4672d23 s4:torture:smb2: add a new durable-open.upgrade2 test to test all upgrade combinations
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Nov  1 04:58:03 CET 2011 on sn-devel-104
2011-11-01 04:58:03 +01:00
Michael Adam
53d1d7b939 s4:torture:smb2: expand durable-open.open2 test matrix by all share-modes 2011-11-01 03:20:37 +01:00
Michael Adam
18ca6c850f s4:torture:smb2: expand durable-open.open1 test matrix by all share-modes 2011-11-01 03:20:37 +01:00
Michael Adam
a4e36df78a s4:torture:smb2: rename the durable-open.basic2 test to durable-open.open2 for clarity 2011-11-01 03:20:37 +01:00
Michael Adam
a9b31e68cf s4:torture:smb2: rename the durable-open.basic1 test to durable-open.open1 for clarity 2011-11-01 03:20:37 +01:00
Stefan Metzmacher
c90870f9b7 s4:torture/smb2: fix compound.invalid2 against windows
Tested against w2k8r2 with signing and win8pre0 without signing.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 31 21:40:25 CET 2011 on sn-devel-104
2011-10-31 21:40:25 +01:00
David Disseldorp
6c2c189caa s4-torture: smb2 copychunk data integrity checks
Perform simple integrity checks on destination file data following
a successful copychunk request.

Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Mon Oct 31 19:28:20 CET 2011 on sn-devel-104
2011-10-31 19:28:20 +01:00
David Disseldorp
c9d1303734 s4-torture: add smb2 copychunk ioctl tests
test_ioctl_copy_chunk_multi: Issue a copychunk request with multiple
chunk descriptors.
test_ioctl_copy_chunk_over: Issue a copychunk request with overlapping
chunks.
test_ioctl_copy_chunk_append: append data as part of a copy chunk
test_ioctl_copy_chunk_tiny: issue request with sub FS block size chunk
descriptors.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-31 17:55:05 +01:00
David Disseldorp
2dad001e05 s4-torture: split common copychunk ioctl test code into helpers
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-31 17:55:05 +01:00
David Disseldorp
8abaafadde s4-torture: Add tests for the smb2 copychunk ioctl
Add idls for parsing of copychunk ioctl args.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-31 17:55:05 +01:00
Michael Adam
a354758da5 s4:torture:smb2: add durable_open_basic2 test: test durable open against all lease types
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sun Oct 30 20:17:16 CET 2011 on sn-devel-104
2011-10-30 20:17:16 +01:00
Michael Adam
976f9806c9 s4:torture:smb2: add a new durable_open_basic1 test: test open against all oplock types 2011-10-30 18:41:23 +01:00
Michael Adam
f8aeca1018 s4:torture:smb2: check wheter open was durable in existing tests 2011-10-30 18:41:22 +01:00
Michael Adam
de967f22fc s4:torture: test also break semantics between batch-oplocks and leases
This must have been a typo (listing EXCLUSIVE twice).
But BATCH and EXCLUSIVE oplocks apparently share the
same break semantics with respect to leases.
2011-10-30 18:41:20 +01:00
Michael Adam
69ca2bd048 s4:torture:smb2: adapt comment in durable-open.lease test according to current information. 2011-10-30 18:41:20 +01:00
Michael Adam
5975e8a3f4 s4:torture:smb2: fix the durable_open test to succeed against w7 and w2k8r2
When a first client that has a durable open with share read/write/delete
and a read-write-handle lease on the file disconnects, a second
client will succeed in opening the file and the new client will be
given a RWH-lease if requested, not only a RH-lease, as was previously
checked in the test.

This might have been a bug in win7 build 7000, which is what the
comments in the test give as reference.
2011-10-30 13:08:14 +01:00
Andrew Bartlett
7f8f7159af lib/util Rename samba_modules_load -> samba_module_init_fns_for_subsystem
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
0ce09fcf7a lib/util Rename samba_init_module_fns_run -> samba_module_init_fns_run
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
1b7cc4ac7c lib/util Rename samba_init_module_fn -> samba_module_init_fn
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
87354c9a6d lib/util Split samba-modules library into public and private parts
This will allow OpenChange to get at the symbols it needs, without
exposing any more of this as a public API than we must.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
b7b798e15b lib/util Rename load_samba_modules -> samba_modules_load
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
ce0ccc2a2e lib/util Rename run_init_functions -> samba_init_module_fns_run
This is to provide a cleaner namespace in the public samba plugin
functions.

Andrew Bartlett
2011-10-28 13:10:28 +02:00
Andrew Bartlett
1935b7b6c2 lib/util Rename init_module_fn to samba_init_module_fn
This prepares for making the samba_module.h header public again, for OpenChange.

I am keen to avoid too much API namespace pollution if we can.
2011-10-28 13:10:28 +02:00
Michael Adam
ac79427aa0 s4:torture:smb2: avoid leaking tree connects up to the main function from the durable_open test
The tree connects are handed in from the calling wrapper.
Those that are freed and reconnected inside the test function
can not be freed in the wrapper and stick to the torture_context
until this is released in the main function.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Oct 28 02:37:25 CEST 2011 on sn-devel-104
2011-10-28 02:37:25 +02:00
Michael Adam
daf7193c1d s4:torture:smb2: fix a nasty double free error.
This error manifested itself in sporadic "talloc_free with references" error.
2011-10-28 01:00:01 +02:00
Michael Adam
52b87f63e2 s4:torture:smb2: fix a comment 2011-10-28 01:00:01 +02:00
Michael Adam
b343a60ad7 s4:torture:smb2: be leass leaky in wrap_simple_2smb2_test() 2011-10-28 01:00:00 +02:00
Matthias Dieter Wallnöfer
b75396579f s4:torture/ldap/basic.c - fix a typo
Reviewed-by: abartlet
2011-10-27 18:52:28 +02:00
Andreas Schneider
b972bd53d7 s4-torture: Add a user creation check.
This adds a patch which creates a non-privileged user and then tries to
create a new user as the non-privileged user.

Pretty simple test but it found #8509.

Autobuild-User: Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date: Thu Oct 27 18:51:14 CEST 2011 on sn-devel-104
2011-10-27 18:51:14 +02:00
Andreas Schneider
4186ef9560 s4-torture: Add a samr privilege check.
This is the first part which checks if a deleted user is propagated
correctly to all daemons and caches with user information are emtpy.
2011-10-27 17:09:50 +02:00
Andreas Schneider
b411b81642 s4-torture: Add torture_delete_testuser(). 2011-10-27 17:09:50 +02:00
Andreas Schneider
80e942aec9 s4-torture: Add domain_handle to test_join struct. 2011-10-27 17:09:50 +02:00
Andreas Schneider
7b5fb7d9e8 replace: Add don't include unistd.h directly and add uid_wrapper. 2011-10-27 13:32:02 +02:00
Michael Adam
91a999270e s4:torture:smb2: fix broken indentation/formatting in torture_smb2_connection()
this was not readable well
2011-10-26 02:44:03 +02:00
Andrew Bartlett
50e7a8767f torture: Remove unused smbiconv
smbiconv is not used in any test script, and has only had changes
since being introduced by Jelmer to keep it building.

It is also not installed on the system. I have also checked with
Jelmer, who approved the removal.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-25 17:58:33 +02:00
Simo Sorce
8870daeb8d idl: Improve MS-PAC IDL
Change some misleading variable names to reflect the actual function.
Add missing field name/types previously marked as unkown.

Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon Oct 24 19:19:28 CEST 2011 on sn-devel-104
2011-10-24 19:19:28 +02:00
David Disseldorp
5e6c477ef8 s3: remove duplicate fsctl fn definitions
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-19 15:44:29 +02:00
David Disseldorp
281fc93c6b libcli: move ioctl function field defs to smb_constants
Currently there are a lot of duplicate ioctl function field definitions
between source3 and source4.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-19 15:44:29 +02:00
Andrew Bartlett
e7d5f0a357 gensec: move event context from gensec_*_init() to gensec_update()
This avoids keeping the event context around on a the gensec_security
context structure long term.

In the Samba3 server, the event context we either supply is a NULL
pointer as no server-side modules currently use the event context.

Andrew Bartlett

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-18 13:13:33 +11:00
Jeremy Allison
7f655945e4 Fix printf warning. 2011-10-14 13:53:53 -07:00
Andrew Bartlett
01c934c81e lib/util: Add back control of mmap and hash size in tdb for top level build
This passes down a struct loadparm_context to allow these
parameters to be checked.  This may be s3 or s4 context, allowing the
#if _SAMBA_BUILD_ macro to go away safely.

Andrew Bartlett
2011-10-13 14:06:07 +02:00
Stefan Metzmacher
77f739f03a s4:torture/smb2: we only support 64KB reads/writes for now
We don't have multi-credit support yet.

metze
2011-10-13 01:59:05 +02:00
Andrew Bartlett
561d834123 auth: move credentials layer to the top level
This will allow gensec_start.c to move to the top level.  This does not change
what code uses the cli_credentials code, but allows the gensec code to be
more broadly.

Andrew Bartlett
2011-10-11 13:41:36 +11:00
Andrew Bartlett
b21b012756 lib/param move source4 param code to the top level
This is done so that the lpcfg_ functions are available across the whole
build, either with the struct loadparm_context loaded from an smb.conf directly
or as a wrapper around the source3 param code.

This is not the final, merged loadparm, but simply one step to make
it easier to solve other problems while we make our slow progress
on this difficult problem.

Andrew Bartlett
2011-10-11 13:41:34 +11:00
Stefan Metzmacher
b787b6e1bd libcli/cldap: don't pass tevent_context to cldap_socket_init()
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Oct 10 23:23:07 CEST 2011 on sn-devel-104
2011-10-10 23:23:07 +02:00
Stefan Metzmacher
5a7a1b35be libcli/cldap: pass tevent_context to cldap_search_send()
metze
2011-10-10 21:50:26 +02:00
Stefan Metzmacher
2cd76b0931 libcli/cldap: pass tevent_context to cldap_netlogon_send()
metze
2011-10-10 21:50:26 +02:00
Stefan Metzmacher
10fdc9ad68 s4:torture/smb2: avoid '//' comments
The compiler on openindiana doesn't like them.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Oct  8 08:56:10 CEST 2011 on sn-devel-104
2011-10-08 08:56:10 +02:00
Stefan Metzmacher
627f930100 s4:torture/drs: avoid '//' comments
The compiler on openindiana doesn't like them.

metze
2011-10-08 07:24:15 +02:00
Andrew Bartlett
f6b7bd4a01 lib/util: consolidate module loading
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Oct  6 08:52:30 CEST 2011 on sn-devel-104
2011-10-06 08:52:30 +02:00
Andrew Bartlett
7d33ec3dfe lib/util: consolidate module loading into common code
This creates a samba-modules private libary that handles the details.

Andrew Bartlett
2011-10-06 07:18:07 +02:00
Andrew Tridgell
ac581b3374 s4-dsdb: update callers to dsdb_convert_object_ex() 2011-10-04 15:08:56 +11:00
David Disseldorp
08573c2b92 s4: add SMB2_FSCTL opcodes
Also, skip samba4.smb2.ioctl for now. Snapshots are not supported by
default.

Autobuild-User: David Disseldorp <ddiss@samba.org>
Autobuild-Date: Thu Sep 29 14:47:05 CEST 2011 on sn-devel-104
2011-09-29 14:47:05 +02:00
David Disseldorp
392fd0db38 s4-torture: add smb2 ioctl test suite
Currently only covers FSCTL_GET_SHADOW_COPY_DATA.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-09-29 13:14:21 +02:00
David Disseldorp
bd5e9758f8 s4-torture: remove unchecked read from smb2 create
Add a corresponding test case to smb2.read.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-09-29 13:14:21 +02:00
Stefan Metzmacher
4732f5b210 s4:torture/smb2/lock: remove samba4 specific checks for NETWORK_NAME_DELETED/USER_SESSION_DELETED
Most Windows versions have a strange order to
verify the session id, tree id and file id.
(They should be checked in that order, but windows
seems to check the file id before the others).

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Sep 28 21:12:07 CEST 2011 on sn-devel-104
2011-09-28 21:12:07 +02:00
Andrew Bartlett
f9acf770e9 lib/util/charset: remove charset module loading
Now that the 'table' modules are gone, there is no reason for there to
be charset modules at all.  This builds the macosxfs and weird modules
into the binary at the appropriate times, and changes the tests to
test instead the difference between the remaining internal handlers
and iconv().

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Tue Sep 20 06:27:06 CEST 2011 on sn-devel-104
2011-09-20 06:27:06 +02:00
Günther Deschner
bd5445ee4f waf: restore libsmbclient handling.
This is a temporary solution to get libsmbclient installed properly as a library
(including symlinks and proper symbols). I was not able to make the old internal
library name 'libsmb/smbclient' work together with "realname" and/or "link_name".
Maybe one of the waf gurus has more ideas here.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Sep 15 15:31:59 CEST 2011 on sn-devel-104
2011-09-15 15:31:59 +02:00
Andrew Tridgell
ad4ce31e86 torture-drs: fixed NDR tests for DRS blobs
this also adds new tests for trustAuthInOutBlob blobs

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 03:35:27 +02:00
Andrew Tridgell
bf8dd20bdd torture-ndr: fixed NDR tests for NTLMSSP blobs
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 03:35:27 +02:00
Andrew Tridgell
7416da636d torture-ndr: fixed NDR tests for NBT blobs
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 03:35:27 +02:00
Andrew Tridgell
d49f0676d0 torture-ndr: fixed NDR tests for DFS blobs
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 03:35:27 +02:00
Andrew Tridgell
430123e84e torture-ndr: added support for testing push functions
this allows us to check the symmetry of pull/push functions in NDR
tests

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-08 03:35:27 +02:00
Stefan Metzmacher
fce8ef69d3 s4:torture/basic: relax base.trans2 midmight time checking
It's possible that the test runs on a full hour, e.g. Tue Sep  6 03:00:00 2011.

So better check that the a_time is different from the current time.

metze
2011-09-07 10:38:02 +02:00
Andrew Tridgell
cd8dcf6d61 s4-torture: enable password comparison in drsblobs test
I'm not sure why this was commented out, as it does pass

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-05 11:19:25 +02:00
Andrew Tridgell
bee8daf9a8 s4-torture: fixed a ndr string error
the dos charset global changes with the new loadparm context

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-09-05 11:19:25 +02:00
Andrew Bartlett
1afeb4e391 s4-schema consolidate schema handling
It also creates a single routine dsdb_load_ldb_results_into_schema()
to handle cases where the schema is in the form of an ldb_result.

Andrew Bartlett
2011-09-05 11:19:25 +02:00
Günther Deschner
d292bc0710 s4-smbtorture: For now, skip trusted domain auth validation tests against the sambas.
Guenther
2011-08-31 12:55:42 +02:00
Sumit Bose
247851d6be s4-smbtorture: Add trust password to CreateTrust test
Instead of using empty authinfo and authinfo_internal structures a trust
password is added to these structures. After creating the trust the trust
account is used to validate that the trust password is set correctly.

Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31 12:55:23 +02:00
Sumit Bose
34d57058ff s4-smbtorture: Add tests for lsaQueryTrustedDomainInfoByName() and lsaSetTrustedDomainInfoByName()
Signed-off-by: Günther Deschner <gd@samba.org>
2011-08-31 12:55:17 +02:00
Volker Lendecke
be44c45440 smbtorture4: Fix a typo
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Tue Aug 30 09:51:10 CEST 2011 on sn-devel-104
2011-08-30 09:51:10 +02:00
Jeremy Allison
8e5adf72eb Fixed regression test case for Bug 8412 - Microsoft Office 2007 (Microsoft Word) fails to save as on a Samba share with SMB2
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Aug 30 03:26:49 CEST 2011 on sn-devel-104
2011-08-30 03:26:48 +02:00
Jelmer Vernooij
292fe74971 credentials: Rename library to samba-credentials to avoid name clashes.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Thu Aug 18 22:16:38 CEST 2011 on sn-devel-104
2011-08-18 22:16:38 +02:00
Jelmer Vernooij
9ee1e1f0ac cli-raw: Add public libsmbclient-raw library. 2011-08-18 14:19:18 +02:00
Andrew Tridgell
8c52caa83c s4-test: prevent the utable test from crashing 2011-08-18 09:26:59 +10:00
Simo Sorce
b120c5f288 torture: use tevent_ functions names instead of the legacy event_ ones 2011-08-13 09:54:15 -04:00
Andrew Bartlett
35b309fa0c gensec: clarify memory ownership for gensec_session_info() and gensec_session_key()
This is slightly less efficient, because we no longer keep a cache on
the gensec structures, but much clearer in terms of memory ownership.
Both gensec_session_info() and gensec_session_key() now take a mem_ctx
and put the result only on that context.

Some duplication of memory in the callers (who were rightly uncertain
about who was the rightful owner of the returned memory) has been
removed to compensate for the internal copy.

Andrew Bartlett
2011-08-03 18:48:02 +10:00
Andrew Bartlett
d3fe48ba48 gensec: Remove mem_ctx from calls that do not return memory
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:01 +10:00
Andrew Bartlett
16b2118b43 gensec: split GENSEC into mechanism-dependent and runtime functions
The startup and runtime functions that have no dependencies are moved
into the top level.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-08-03 18:48:01 +10:00
Jelmer Vernooij
08785dd73d cli_cldap: Lowercase name. 2011-07-26 13:31:08 +02:00
Jelmer Vernooij
7524413751 cli_raw: Make name lowercase.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sat Jul 23 23:20:51 CEST 2011 on sn-devel-104
2011-07-23 23:20:51 +02:00
Andrew Bartlett
52b28ec813 auth: Split out make_user_info_SamBaseInfo and add authenticated argument
This will allow the source3 auth code to call this without needing to
double-parse the SIDs

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-07-20 09:17:14 +10:00
Günther Deschner
7f52cd3b35 s4-smbtorture: add very basic tests for lsa_CreateTrustedDomainEx.
Guenther
2011-07-15 17:56:41 +02:00
Günther Deschner
3af3e4843f lsa: rename auth info argument in lsa_CreateTrustedDomainEx2
Guenther
2011-07-15 17:55:20 +02:00
Stefan Metzmacher
0b8184d9d4 s4:torture/smb2: s/smb2cli_unlock/test_smb2_unlock
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jul  6 19:07:42 CEST 2011 on sn-devel-104
2011-07-06 19:07:42 +02:00
Stefan Metzmacher
43c865a38e s4:torture/smb2: s/smb2cli_lock/test_smb2_lock
metze
2011-07-06 17:54:47 +02:00
Günther Deschner
0b5e5db218 s4-smbtorture: rework the spoolss notify test a bit.
Guenther
2011-06-21 17:46:37 +02:00
Günther Deschner
834dcdb35d s4-smbtorture: use ipv4 addresses for backchannel spoolss change notify
connections for now.

Guenther
2011-06-21 17:46:37 +02:00
Andrew Bartlett
a6f31f13ec s4-torture Enable libnetapi and libsmbclient tests using combined build
Because we now always build the source3 code, we can link directly
against a private libnetapi and libsmbclient to test the behaviour of
these important APIs.

We use a private libnetapi_net_init(), and by using this interface
rather than the public one, we can ensure that the correct smb.conf is
loaded (as smbtorture4 is a Samba4 semantics binary).

The #include of the source3 includes.h is required to do the manual
lp_load().

Andrew Bartlett
2011-06-21 11:29:35 +10:00
Rusty Russell
ca1936fbb2 tdb_compat: use tdb_open_compat.
This is a helper for the common case of opening a tdb with a logging
function, but it doesn't do all the work, since TDB1 and TDB2's log
functions are different types.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
058c4f8492 tdb_fetch_compat: use instead of tdb_fetch.
This is a noop for tdb1.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02:00
Rusty Russell
0e4c358e27 tdb_compat.h: divert every tdb build and includes to tdb_compat
We change all the headers and wscript files to use tdb_compat; this
means we have one place to decide whether to use TDB1 or TDB2.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:34 +02:00
Matthias Dieter Wallnöfer
75e77f9fa0 s4:ntvfs subsystems - rework it using concrete enum values
This changes commit 260bc987b0 to comply
with metze's plans.
2011-06-16 09:05:31 +02:00
Matthias Dieter Wallnöfer
bf5e625393 s4:torture/ndr/string.c - fix type-punned warning and remove unused variables
Reviewed-by: Jelmer
2011-06-11 16:26:18 +02:00
Matthias Dieter Wallnöfer
260bc987b0 s4:ntvfs subsystem - quiet enum warnings
Simply return "NT_STATUS_INVALID_LEVEL" for unknown types of requests.

Reviewed-by: Tridge
2011-06-09 10:53:36 +02:00
Andrew Bartlett
907cdb5de7 s4-modules Remove lp_ctx from init functions that no longer need it
Now that we don't allow the smb.conf to change the modules dir, many
functions that simply load modules or initialise a subsytem that may
load modules no longer need an lp_ctx.

Andrew Bartlett
2011-06-06 17:37:51 +10:00
Andrew Bartlett
de46ad9084 lib/util use modules_path(), data_path() and shlib_ext() from source3
This brings these helpful utility functions in common, as they are not
based on either loadparm system.

(The 'modules dir' parameter from Samba4 will shortly be removed, so
there is no loss in functionality)

Andrew Bartlett
2011-06-06 17:37:51 +10: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 Tridgell
40dc94a53f s4-ipv6: update callers to load_interface_list() 2011-06-06 12:26:10 +10:00
Sean Finney
08abd1f5e8 librpc/ndr: add new LIBNDR_FLAG_STR_RAW8 for ndr_pull_string
Introduce a new flag, LIBNDR_FLAG_STR_RAW8, which indicates that libndr
should not attempt to convert the corresponding byte sequence, and place
the responsibility on the caller to do so later.

This is needed in cases where the string is known to be 8-bit and either
NULL terminated or of known length, but in an unspecified character set.
For example, when pulling PT_STRING8 properties from an exchange server
via libmapi + libndr, the codepage is neither known nor in the control
of the caller, and is determined by subsequent properties requested from
the server.  Therefore the client would like to fetch all properties in
one large batch, and convert the resulting strings locally.

This commit also includes some (basic) tests of each of the flags'
respective behaviors with the ndr push/pull string functions, in a new
source4 torture test suite ndr.ndr_string.

Signed-off-by: Sean Finney <seanius@seanius.net>
2011-06-01 00:30:40 +02:00
Gregor Beck
de10847973 s4:torture: fix SEGFAULT in raw.acl.dynamic
Signed-off-by: Michael Adam <obnox@samba.org>
2011-05-30 17:42:27 +02:00
Matthias Dieter Wallnöfer
5c4fabb08e s4:torture - always cast correctly when using the "%x" format string argument
Signed-off-by: Metze
2011-05-21 16:21:12 +02:00
Matthieu Patou
a2f4309112 torture-dfs: fix a typo that was causing the test to be flacky
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Fri May 20 09:39:12 CEST 2011 on sn-devel-104
2011-05-20 09:39:12 +02:00
Matthieu Patou
b25f7d4020 torture: desactivate the level 4 tests for DFS referral
Autobuild-User: Matthieu Patou <mat@samba.org>
Autobuild-Date: Wed May 18 13:04:00 CEST 2011 on sn-devel-104
2011-05-18 13:04:00 +02:00
Stefan Metzmacher
a41efe6802 s4:auth/credentials: pass 'self_service' to cli_credentials_set_impersonate_principal()
This also adds a cli_credentials_get_self_service() helper function.

In order to support S4U2Proxy we need to be able to set
the service principal for the S4U2Self step independent of the
target principal.

metze
2011-05-18 07:46:39 +02:00
Matthieu Patou
0d2019dcba s4-torture: Add more tests to DFS referral suite 2011-05-17 00:31:09 +02:00
root
6553940c01 torture: adapt to idl evolution 2011-05-17 00:31:09 +02:00
Günther Deschner
74d82faa78 s4-smbtorture: add test_netremotetod.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Mon May 16 12:45:52 CEST 2011 on sn-devel-104
2011-05-16 12:45:52 +02:00
Kamen Mazdrashki
99df3f6cbb s4/test/getnc_exop: Tune the the test to work against windows
It turns out that sometimes, w2k8-r2 returns objects
even when FSMO extended request has failed.

Also verify that target DC returns source_dsa_guid and
source_dsa_invocation_id correctly

Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Fri May 13 02:26:04 CEST 2011 on sn-devel-104
2011-05-13 02:26:04 +02:00
Kamen Mazdrashki
d4481be95c s4/getnc_exop: Initial implementation of a testsuite for GetNCChanges extended opeartion handling 2011-05-11 21:10:54 +03:00
Andrew Bartlett
22cb631b4f s4-interfaces Rename interfaces code so not to conflict with source3/
The iface_count, iface_n_bcast, and load_interfaces functions
conflicted with functions of the same name in source3, so the source4
functions were renamed.  Hopefully we can actually wrap one around the
other in future.

Andrew Bartlett
2011-05-08 12:57:04 +02:00
Andrew Bartlett
e3b858496f libcli/smb Move cifs posix helper functions and headers in common
unix_perms_to_wire() was a duplicate symbol in the top level build.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Andrew Bartlett
3892112e7b lib/util Rename ms_fnmatch() to ms_fnmatch_protocol() to avoid dup symbol
This verison of the function takes a protcol as argument to determine
matching rules.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Andrew Bartlett
1475013963 lib/util Move source3 tdb_wrap_open() into the common code.
This #if _SAMBA_BUILD == 3 is very unfortunate, as it means that in
the top level build, these options are not available for these
databases.  However, having two different tdb_wrap lists is a worse
fate, so this will do for now.

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Jeremy Allison
1c714850d5 Clean up some const and other compiler warnings.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Thu May  5 00:59:40 CEST 2011 on sn-devel-104
2011-05-05 00:59:40 +02:00
Jeremy Allison
017e0c8d95 Fix simple uses of safe_strcpy -> strlcpy. Easy ones where we just remove -1. 2011-05-04 12:12:13 -07:00
Andrew Bartlett
d01f318179 s4: fix arguments to safe_strcpy()
Found by the s3-derivied safe_strcpy() macro.

Andrew Bartlett
2011-05-03 07:37:07 +02:00
Andrew Bartlett
2742ec0e34 Remove strlower_m() and strupper_m() from source4 and common code.
This function is problematic because a string may expand in size when
changed into upper or lower case.  This will then push characters off
the end of the string in the s3 implementation, or panic in the former
s4 implementation.

Andrew Bartlett
2011-05-03 07:37:07 +02: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
Andrew Bartlett
62931369ee s4-torture Remove unused and uncompleated test 2011-05-03 07:37:07 +02:00
Stefan Metzmacher
b83223476c s4:torture/nbt/winsreplication: ignore incoming broadcast messages
This will hopefully fix the flakey behavior of the
samba4.nbt.winsreplication.owned test.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Apr 30 12:45:01 CEST 2011 on sn-devel-104
2011-04-30 12:45:01 +02:00
Stefan Metzmacher
9d738adcf8 s4:torture/nbt/winsreplication: assert the nbt name before the type
I hope that will make it easier to find problems
with the flakey samba4.nbt.winsreplication.owned test.

metze
2011-04-30 11:43:30 +02:00
Stefan Metzmacher
944929bb69 s4:torture/nbt/winsreplication: use torture macros in order report failures
This makes sure we can ignore this failures with the "knownfail"
file.

metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Apr 30 10:37:16 CEST 2011 on sn-devel-104
2011-04-30 10:37:16 +02:00
Matthias Dieter Wallnöfer
bbf28703a4 s4:"ldb_connect" calls - proof for "!= LDB_SUCCESS"
Reviewed-by: abartlet
2011-04-29 19:05:04 +02:00
Matthias Dieter Wallnöfer
6611f0109b s4:torture/rpc/testjoin.c - use a LDB result constant
Reviewed-by: abartlet
2011-04-29 19:05:04 +02:00
Günther Deschner
c8f9515f19 s4-smbtorture: restructure documentname handling in spoolss test a bit.
Guenther
2011-04-20 17:54:11 +02:00
Andrew Bartlett
f28f5db15a libcli/auth Move PAC parsing and verification in common.
This uses the source3 PAC code (originally from Samba4) with some
small changes to restore functionality needed by the torture tests,
and to have a common API.

Andrew Bartlett
2011-04-20 04:31:07 +02:00
Andrew Bartlett
4fd6ebf544 selftest: Remove duplication between BUILDIR and BINDIR
Just have BINDIR, and have it default to ./bin

Andrew Bartlett
2011-04-16 11:43:04 +02:00
Andrew Tridgell
887fdb7ba1 s4-test: added a test for E_deshash()
this particularly checks the boundary conditions near passwords of
length 14 characters

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Wed Apr 13 07:31:55 CEST 2011 on sn-devel-104
2011-04-13 07:31:55 +02:00
Andrew Bartlett
d335b635c2 lib/util/charset Add many more charset tests
This confirms that the behaviour of the convert_string() API (with the
process-wide iconv handle).

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13 14:47:08 +10:00
Andrew Bartlett
a2c691ab9a lib/util/charset Rename convert_string test to allow a 'non_handle' test
A future commit will test (with a subset of tests) the varient of this
function without _handle.

Andrew Bartlett

Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13 14:47:08 +10:00
Andrew Bartlett
87d2722b84 s4/torture Fix calls to charcnv functions to always supply converted_size
Signed-off-by: Andrew Tridgell <tridge@samba.org>
2011-04-13 14:47:07 +10:00
Günther Deschner
ead6faab27 s4-smbtorture: fix lsa forest trust test.
lsa_lsaRSetForestTrustInformation takes a policy handle obtained from
lsaopenpolicy/lsaopenpolicy2 and not a trusted domain handle
(MS-LSAD 3.1.4.7.16 LsarSetForestTrustInformation (Opnum 74)).

Sumit, please check.

Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Thu Apr  7 14:52:52 CEST 2011 on sn-devel-104
2011-04-07 14:52:51 +02:00
Andrew Tridgell
a8da13cd5c lib: make asn1_util a private library
this prevents symbol duplication of the asn1 symbols in the service
and ntvfs subsystems

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-04-06 08:12:19 +02:00
Jelmer Vernooij
5cb8f6b9f1 Fix compilation without external heimdal.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Sun Apr  3 17:18:56 CEST 2011 on sn-devel-104
2011-04-03 17:18:56 +02:00
Jelmer Vernooij
09289c073c use system heimdal headers if possible, fix missing dependencies on hx509 and krb5 libraries. 2011-04-03 16:33:04 +02:00
Andrew Bartlett
620921b36b lib/util/charset Add tests for strcasecmp_m(), talloc_strupper() et al
This adds tests for:
 strncasecmp_m
 strcasecmp_m
 strupper_talloc_n
 strlower_talloc
 strhaslower
 strhasupper

The tests can certainly be improved with pre-calculated upper and
lower case text, but this at least puts them though their paces.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Thu Mar 31 14:24:22 CEST 2011 on sn-devel-104
2011-03-31 14:24:22 +02:00
Jeremy Allison
c109a70531 Fix convert_string() to take a *converted_size arg. and return a bool.
Makes these interfaces much harder to misuse and easier to ensure error
checking.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Mar 30 23:59:37 CEST 2011 on sn-devel-104
2011-03-30 23:59:37 +02:00
Andrew Bartlett
43e364e61b lib/util/charset Add tests for convert_string_talloc_handle()
Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Wed Mar 30 13:02:47 CEST 2011 on sn-devel-104
2011-03-30 13:02:47 +02:00
Jeremy Allison
0c5214e2eb Ensure convert_string_XXX is always called with a valid converted_size pointer.
Preparation for cleaning up this API.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Mar 29 21:01:49 CEST 2011 on sn-devel-104
2011-03-29 21:01:49 +02:00
Andrew Tridgell
f4d581468c s4-fsmo: samba-tool fsmo takes a URL, not a hostname
better to call the option --url

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
2011-03-29 00:00:22 +02:00
Andrew Bartlett
b5616adc8a lib/util/charset rename iconv_convenience to iconv_handle
This better reflects what this structure is

Andrew Bartlett
2011-03-25 04:37:06 +01:00
Andrew Tridgell
15e84a9a09 charcnv: removed the allow_badcharcnv and allow_bad_conv options to convert_string*()
we shouldn't accept bad multi-byte strings, it just hides problems

Autobuild-User: Andrew Tridgell <tridge@samba.org>
Autobuild-Date: Thu Mar 24 01:47:26 CET 2011 on sn-devel-104
2011-03-24 01:47:26 +01:00
Jelmer Vernooij
fc720be5a2 source4/torture: Fix prototypes for all functions. 2011-03-19 03:20:05 +01:00
Jelmer Vernooij
7628fb2396 source4/torture/ndr: Fix prototypes for all functions. 2011-03-19 03:20:05 +01:00
Jelmer Vernooij
be9f1ca1c6 source4/torture/basic: Fix prototypes for all functions. 2011-03-19 03:20:04 +01:00
Jelmer Vernooij
6dfd88ab0a source4/torture/raw: Fix prototypes for all functions. 2011-03-19 03:20:04 +01:00
Günther Deschner
de5cec48a4 s4-smbtorture: add netsessiongetinfo() test.
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Fri Mar 18 02:11:38 CET 2011 on sn-devel-104
2011-03-18 02:11:38 +01:00