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

818 Commits

Author SHA1 Message Date
Stefan Metzmacher
a4d79a3799 s3:torture: make use of cli_state_capabilities()
metze
2011-08-02 04:54:28 +02:00
Michael Adam
0b5c4a601a s3:dbwrap: move all .c and .h files of dbwrap to lib/dbwrap/
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Jul 29 13:34:22 CEST 2011 on sn-devel-104
2011-07-29 13:34:22 +02:00
Michael Adam
1abdd9b2bb s3:dbwrap: move db_open() to a file dbwrap_open.c of its own.
Also start new folder lib/dbwrap/ where dbwrap_open.c is stored and
make the fallbacke implementation functoins non-static and create a
dbwrap_private.h header file that contains their prototypes.
2011-07-29 12:23:13 +02:00
Volker Lendecke
553124a663 s3: In the async echo test, write 65k
This leads to the writev from echo responder child to parent to only deliver a
partial blob and thus excercises the retry code.

Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jul 28 15:07:40 CEST 2011 on sn-devel-104
2011-07-28 15:07:40 +02:00
Michael Adam
7b7c6c85f1 s3:torture: use lp_load_global() in pdbtest - this does not need shares nor IPC$ 2011-07-28 11:17:42 +02:00
Michael Adam
ae752ec3a5 s3:smbtorture: use the lp_load_global() wrapper of lp_load() 2011-07-28 11:17:35 +02:00
Michael Adam
c32479f584 s3:torture: use lp_load_global() in the strstr test 2011-07-28 11:17:34 +02:00
Michael Adam
ecc487e026 s3:torture: use lp_load_global in the strcmp test 2011-07-28 11:17:34 +02:00
Michael Adam
426ae350ee s3:torture: use lp_load_global() in the push_ucs2 test 2011-07-28 11:17:33 +02:00
Michael Adam
bfde6fa535 s3:torture: use lp_load_global() in the msgtest 2011-07-28 11:17:33 +02:00
Michael Adam
d6b4c693be s3:torture: use lp_load_global() in the masktest 2011-07-28 11:17:33 +02:00
Michael Adam
ee495ab5c3 s3:torture: use lp_load_global() in locktest2 2011-07-28 11:17:32 +02:00
Michael Adam
407a514f8b s3:torture: use lp_load_global() in the locktest 2011-07-28 11:17:32 +02:00
Volker Lendecke
94a2328367 s3: Avoid calls to cli_dos/nt_error in torture
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jul 27 23:07:51 CEST 2011 on sn-devel-104
2011-07-27 23:07:50 +02:00
Volker Lendecke
a7f8d9e798 s3: Fix formatting in check_error() 2011-07-27 21:55:21 +02:00
Stefan Metzmacher
34faeb8bba s3:test_async_echo: unsure the desired smb message sequence
We want to start sending echo requests once the rpc related
smb operation arrived the smb layer.

metze
2011-07-27 21:55:21 +02:00
Volker Lendecke
61d420e0d8 s3: cli_close_done->write_andx_done in test_async_echo
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Wed Jul 27 02:03:49 CEST 2011 on sn-devel-104
2011-07-27 02:03:49 +02:00
Volker Lendecke
cdae9ef267 s3: Fix a debug message 2011-07-27 00:47:45 +02:00
Volker Lendecke
45ec7d6f24 s3: Fix formatting 2011-07-27 00:47:45 +02:00
Volker Lendecke
9f66e302b8 s3: Fix an error message 2011-07-27 00:47:45 +02:00
Björn Baumbach
6911b04606 s3-torture: run_nttrans_create(): replace cli_query_secdesc_old()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:57 +02:00
Björn Baumbach
768646c9a2 s3-libsmb: rename cli_query_secdesc() to cli_query_secdesc_old()
Will introduce new cli_query_secdesc() function

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:56 +02:00
Björn Baumbach
473b16dcbf s3-torture/nbio.c: replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:55 +02:00
Björn Baumbach
78333531de s3-torture/utable.c: replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:55 +02:00
Björn Baumbach
4b76c108ba s3-torture/denytest.c: replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:27 +02:00
Björn Baumbach
6d695749c7 s3-torture: run_oplock2(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:25 +02:00
Björn Baumbach
963aa9856c s3-torture: run_fdsesstest(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:25 +02:00
Björn Baumbach
995978ae96 s3-torture: run_fdpasstest(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:24 +02:00
Stefan Metzmacher
cfec548aa0 s3-torture: run_locktest7(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:18:20 +02:00
Stefan Metzmacher
4971a0a2bc s3-torture: run_locktest7(): goto fail on read error
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-23 09:10:09 +02:00
Björn Baumbach
a560b793ca s3-torture: run_locktest4(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-22 17:06:09 +02:00
Björn Baumbach
0986b0bed7 s3-torture: introduce test_cli_read()
test_cli_read calls cli_read and returns success or failure

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-22 17:06:08 +02:00
Stefan Metzmacher
cd71c5746b s3:torture: use cli_state_disconnect() to close the socket on SIGALRM
metze
2011-07-22 17:06:07 +02:00
Stefan Metzmacher
25447a528a s3:libsmb: move cli->vuid to cli->smb1.uid and hide it behind cli_state_[g|s]et_uid()
metze
2011-07-21 22:08:52 +02:00
Björn Baumbach
d622cadd34 s3-torture: run_simple_posix_open_test(): replace cli_read_old() with
cli_read()

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

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Jul 20 23:22:09 CEST 2011 on sn-devel-104
2011-07-20 23:22:09 +02:00
Björn Baumbach
c53e2ad4de s3-torture: rw_torture2(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:26 +02:00
Björn Baumbach
ea4c4480b4 s3-torture: rw_torture3(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:26 +02:00
Björn Baumbach
b10fa4bbcd s3-torture: rw_torture(): replace cli_read_old() with cli_read()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:26 +02:00
Björn Baumbach
9b168e128a s3-libsmb: replace cli_read() with cli_read_old()
Will introduce new cli_read() function.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-20 22:09:25 +02:00
Stefan Metzmacher
8f41e54d53 s3:libsmb: move cli->cnum to cli->smb1.tid and hide it behind cli_state_[g|s]et_tid()
metze
2011-07-20 15:56:27 +02:00
Stefan Metzmacher
1e3822115c s3:libsmb: move cli->pid to cli->smb1.pid and hide it behind cli_[g|s]etpid()
metze
2011-07-20 15:55:08 +02:00
Björn Baumbach
d29f8491bd s3-torture: run_locktest5(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-18 23:27:55 +02:00
Björn Baumbach
8f7b7d7aa2 s3-torture: run_locktest4(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-18 23:27:54 +02:00
Björn Baumbach
69ed3a780e s3-torture: run_oplock2(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-18 23:27:54 +02:00
Björn Baumbach
4dbdaa6608 s3-torture: run_locktest9(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-18 23:27:53 +02:00
Björn Baumbach
ae92edc46b s3-torture: run_locktest8(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-18 23:27:53 +02:00
Björn Baumbach
a5d5308073 s3-torture: run_locktest7(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-18 23:27:53 +02:00
Björn Baumbach
b0faf0bd26 s3-torture: run_locktest3(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-18 23:27:52 +02:00
Björn Baumbach
50e2785f5e s3-torture: run_locktest2(): replace check_error() with check_both_error()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 16:35:11 +02:00
Björn Baumbach
e14e6747ae s3-torture: run_locktest2(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 16:35:11 +02:00
Björn Baumbach
c9f604543b s3-torture: run_locktest1(): replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 16:35:10 +02:00
Björn Baumbach
23b417b4c0 s3-torture: locktest2: replace cli_lock() with cli_lock32()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 16:35:10 +02:00
Björn Baumbach
b6e9866c54 s3-torture: let wait_lock() use cli_lock32() instead of cli_lock()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-11 16:35:10 +02:00
Björn Baumbach
f2c5a0afd2 s3-libsmb: let cli_lock64 return NTSTATUS instead of bool
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jul 11 12:48:38 CEST 2011 on sn-devel-104
2011-07-11 12:48:38 +02:00
Stefan Metzmacher
0342b69f36 s3:torture: use cli_is_nt/dos_error() in run_error_map_extract()
Callers should avoid using cli->inbuf directly!

metze
2011-07-08 14:09:09 +02:00
Stefan Metzmacher
67ac266ae8 s3:torture: add SMB2-BASIC
Based on the initial patch from Volker Lendecke <vl@samba.org>.

metze
2011-07-08 01:22:22 +02:00
Björn Baumbach
98e0f9d1ed s3-torture: run_shortname_test: Remove uses of cli_errstr()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-07 19:16:28 +02:00
Björn Baumbach
684095b0a2 s3-torture: run_simple_posix_open_test: Remove uses of cli_errstr()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
840a1c7445 s3-torture: use nt_errstr() for cli_unlink() error handling
Use nt_errstr() instead of cli_errstr() for error handling on
cli_unlink() calls.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-07 19:16:28 +02:00
Björn Baumbach
60873a9e48 s3-torture: introduce check_both_error()
Check if the server produced the expected dos or nt error code like
check_error(), but without a cli_state struct.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
fc992e7029 s3:torture/scanner: use trans2_bytes_push_str() in scan_nttrans()
metze
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
02171ee0f0 s3:torture/scanner: use trans2_bytes_push_str() in scan_trans2()
metze
2011-07-07 19:16:28 +02:00
Stefan Metzmacher
d921200e75 s3:libsmb: use clistr_pull_talloc() for short_name in interpret_long_filename()
metze
2011-07-07 19:16:27 +02:00
Volker Lendecke
eba5d0b641 s3: Remove a use of cli_errstr
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu Jul  7 18:04:26 CEST 2011 on sn-devel-104
2011-07-07 18:04:26 +02:00
Stefan Metzmacher
8a2290667c s3:libsmb: use clistr_pull_talloc() in cli_qfilename()
metze
2011-07-06 17:18:14 +02:00
Stefan Metzmacher
a1df729f7b s3:libsmb: let cli_qfileinfo[_recv]() return recv_flags2
metze
2011-07-06 17:18:13 +02:00
Volker Lendecke
f0ff6f390a Use tevent_req_oom
This fixes a few Coverity errors
2011-06-20 12:33:24 +02:00
Rusty Russell
d925b327f4 tdb_compat: Higher level API fixes.
My previous patches fixed up all direct TDB callers, but there are a
few utility functions and the db_context functions which are still
using the old -1 / 0 return codes.

It's clearer to fix up all the callers of these too, so everywhere is
consistent: non-zero means an error.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-06-20 11:18:35 +02: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
Volker Lendecke
763941f245 s3: Test nttrans_create
This is a test for the share security descriptor exception for nttrans_create
2011-06-19 11:30:02 +02:00
Sumit Bose
d5661467e1 s3-passdb: Implement new pdb trust calls for the default backend
Signed-off-by: Simo Sorce <idra@samba.org>

Autobuild-User: Simo Sorce <idra@samba.org>
Autobuild-Date: Sun Jun 12 06:45:25 CEST 2011 on sn-devel-104
2011-06-12 06:45:25 +02:00
Andrew Bartlett
74eed8f3ed s3-param Remove special case for global_myname(), rename to lp_netbios_name()
There is no reason this can't be a normal constant string in the
loadparm system, now that we have lp_set_cmdline() to handle overrides
correctly.

Andrew Bartlett
2011-06-09 12:40:09 +02:00
Andrew Bartlett
ad0a07c531 s3-talloc Change TALLOC_ZERO_P() to talloc_zero()
Using the standard macro makes it easier to move code into common, as
TALLOC_ZERO_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
d5e6a47f06 s3-talloc Change TALLOC_P() to talloc()
Using the standard macro makes it easier to move code into common, as
TALLOC_P isn't standard talloc.
2011-06-09 12:40:08 +02:00
Andrew Bartlett
3d15137653 s3-talloc Change TALLOC_ARRAY() to talloc_array()
Using the standard macro makes it easier to move code into common, as
TALLOC_ARRAY isn't standard talloc.
2011-06-09 12:40:08 +02:00
Jeremy Allison
c7d2f6d35a Remove the char * argument from the SMB_VFS_GETWD() call. Now always
returns malloc'ed memory.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Wed Jun  1 04:06:12 CEST 2011 on sn-devel-104
2011-06-01 04:06:12 +02:00
Andrew Bartlett
e5dd03d199 s3-globals Remove smbd_event_context() (use server_event_context())
This has been a wrapper around server_event_context() for some time
now, and removing this from dummmysmbd.c assists with library
dependencies.

Andrew Bartlett
2011-05-31 00:32:07 +02:00
Volker Lendecke
ef0260ddbc s3: Fix cli_bad_session_request
We expect a negative session response with a 0x82 error (called name not
present), not a 0x82 message
2011-05-29 21:10:26 +02:00
Volker Lendecke
97dcdcd5c2 s3: Simplify run_bad_nbt_session 2011-05-29 21:10:26 +02:00
Volker Lendecke
18a54fe4eb s3: Simplify cli_bad_session_request
For this purpose we don't need the full cli_state
2011-05-29 21:10:26 +02:00
Volker Lendecke
8a3199e00d s3: Use cli_connect_nb in smbtorture open_nbt_connection 2011-05-28 23:04:02 +02:00
Volker Lendecke
57ae32794f s3: Add called name_type param to cli_connect_nb 2011-05-28 20:50:09 +02:00
Volker Lendecke
649873bcf3 s3: Use cli_connect_nb in masktest 2011-05-28 20:50:09 +02:00
Volker Lendecke
1173a4f83d s3: Fix some nonemtpy blank lines 2011-05-28 20:50:09 +02:00
Volker Lendecke
5df87913d7 s3: Use cli_connect_nb in locktest
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Sat May 28 18:06:49 CEST 2011 on sn-devel-104
2011-05-28 18:06:49 +02:00
Volker Lendecke
ce9d63d161 s3: Remove the smbtorture3 OPLOCK3 test
This is the last user of cli_receive_smb. Oplocks are nowadays tested
in smbtorture4, this mainly has historic value
2011-05-22 21:07:40 +02:00
Volker Lendecke
9a787bbad1 s3: Convert the OPEN4 test to async oplock handling
This removes a caller of cli_receive_smb
2011-05-22 21:07:40 +02:00
Volker Lendecke
58b77f2267 s3: Remove a use of cli_send_smb
Autobuild-User: Volker Lendecke <vlendec@samba.org>
Autobuild-Date: Thu May 19 20:11:33 CEST 2011 on sn-devel-104
2011-05-19 20:11:33 +02:00
Andrew Bartlett
c615ebed6e s3-lib Replace StrCaseCmp() with strcasecmp_m()
strcasecmp_m() never needs to call to talloc, and via next_codepoint()
still has an ASCII fast-path bypassing iconv() calls.

Andrew Bartlett
2011-05-18 16:12:08 +02:00
Günther Deschner
d97faae7db s3-smbtorture: fix build warning (shadowed NTSTATUS variable).
Guenther

Autobuild-User: Günther Deschner <gd@samba.org>
Autobuild-Date: Wed May 18 14:17:13 CEST 2011 on sn-devel-104
2011-05-18 14:17:13 +02:00
Björn Baumbach
23e23d0836 s3-torture/nbio.c: Fix cli_errstr() usage (part of bug #7864)
Convert cli_errstr() to nt_errstr()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-05-18 10:55:52 +02:00
Björn Baumbach
310502a15a s3-torture/mangle_test.c: Fix cli_errstr() usage (part of bug #7864)
Convert cli_errstr() to nt_errstr()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-05-18 10:50:34 +02:00
Björn Baumbach
6fd0e062d3 s3-torture: torture.c: Fix cli_errstr() usage (part of bug #7864)
Convert cli_errstr() to nt_errstr()

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-05-18 10:49:41 +02:00
Günther Deschner
675573d54b s3-includes: finally only include client.h when libsmb is used.
Guenther
2011-05-06 16:37:22 +02:00
Günther Deschner
27022587e3 s3-libsmb: move protos to libsmb/proto.h
Guenther
2011-05-06 16:37:18 +02:00
Günther Deschner
d8cfca3a9b s3: only include tdb headers where needed.
Guenther
2011-05-06 10:48:10 +02:00
Andrew Bartlett
344eb08ee4 nterr: Add mem_ctx for return string from get_nt_error_c_code()
It is clearer to avoid the implicit return on talloc_tos()

Andrew Bartlett
2011-05-06 07:51:24 +02:00
Jeremy Allison
153a091d9c Fix const in smbtorture.
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Fri May  6 02:45:00 CEST 2011 on sn-devel-104
2011-05-06 02:45:00 +02:00
Jeremy Allison
7d6ebe0de7 More const fixes. Remove CONST_DISCARD. 2011-05-06 01:44:07 +02:00
Jeremy Allison
8380835fc6 Fix warning messages caused by addition of null check in fstrcpy macro. 2011-05-04 12:12:15 -07:00