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

1302 Commits

Author SHA1 Message Date
Volker Lendecke
9959fc9d72 torture3: Fix a typo
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
2015-01-06 00:33:09 +01:00
Volker Lendecke
3a6a6f1941 messaging3: Avoid self-send complexity
With the notify code I've hit another case where self-sends caused
a problem.  This time messages were lost because we tried to do
multiple dispatch_rec calls from within a single inotify callback.
Only the first one was being taken care of, the others did not find
receivers.

This patch makes self-sends go through the kernel as well, the
kernel queues everything nicely for us. With dgram messaging this
should be pretty fast. If it turns out to be a performance problem,
we can solve it later by doing proper queueing in user space. We
need to completely decouple any processing from callbacks.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-09 04:12:07 +01:00
Volker Lendecke
0013001e70 lib: Split out write_data[_iov]
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-12-07 00:12:07 +01:00
Stefan Metzmacher
c55a4e0b81 s3:torture: avoid nesting of macros and function calls in torture_cli_session_setup2()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-11-25 07:25:45 +01:00
Amitay Isaacs
e67c4b977a build: Remove configure checks for ctdb headers
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-10-28 05:42:04 +01:00
Stefan Metzmacher
40bc651f95 s3:torture: avoid unused cli_set_username()
Change-Id: Ia774b256093aff5f2b3338e7827e2d798fb06a96
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-10-17 12:57:07 +02:00
Stefan Metzmacher
50cf2c3543 s3:torture: add PROTOCOL_SMB3_10 handling
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-10-07 22:47:04 +02:00
Stefan Metzmacher
d11b0c4222 s3:libsmb: remove unused smb2cli.h
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-30 23:35:08 +02:00
Stefan Metzmacher
b77bb5a2e3 libcli/smb: move smb2cli_tcon.c to the toplevel
removing use of cli_state from the code.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-30 23:35:08 +02:00
Michael Adam
ba3342616c s3:torture: transfer 1M message with fds in LOCAL-MESSAGING-FDPASS2 test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Sep 30 19:01:30 CEST 2014 on sn-devel-104
2014-09-30 19:01:30 +02:00
Michael Adam
d4bf2be62f s3:torture: wait in tevent-loop for child to confirm receive in FDPASS2 msg test
This is the only way to correctly transfer bigger messages.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-09-30 16:36:10 +02:00
Michael Adam
3628102938 s3:torture: fix a message in LOCAL-MESSAGING-FDPASS2 test
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-09-30 16:36:10 +02:00
Michael Adam
f16dd644aa s3:torture: add LOCAL-MESSAGING-READ4 - send 1MB message
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-09-30 16:36:10 +02:00
Michael Adam
e3a796f3eb s3:torture: in LOCAL-MESSAGING-FDPASS2, close fds after passing them
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Sep 27 12:44:55 CEST 2014 on sn-devel-104
2014-09-27 12:44:55 +02:00
Michael Adam
5d22bcf160 s3:torture: in LOCAL-MESSAGING-READ3, print some messages to child
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Sep 24 11:09:43 CEST 2014 on sn-devel-104
2014-09-24 11:09:43 +02:00
Michael Adam
db384efa40 s3:torture: in LOCAL-MESSAGING-READ3, tell child to exit and wait
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-24 08:44:12 +02:00
Michael Adam
5ed8be7b2e s3:torture: work on LOCAL-MESSAGING-FDPASS2
- parent: fork
- parent: create up and down pipes,
- parent: pass read end of up pipe and write end of down pipe to child
- parent: write to up pipe
- child:  read from up pipe
- child:  write to down pipe
- parent: read from down pipe

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-24 08:44:12 +02:00
Michael Adam
db809c5eb4 s3:torture: add test LOCAL-MESSAGING-FDPASS1
Verify that a process can not pass an fd to itself.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-09-24 08:44:12 +02:00
Michael Adam
6148c948d1 s3:smbtorture: align explanations for parameters
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Sep 22 10:31:55 CEST 2014 on sn-devel-104
2014-09-22 10:31:55 +02:00
Michael Adam
48c12a2ce0 s3:smbtorture: mention "-e" in the help text
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
2014-09-22 08:09:10 +02:00
Stefan Metzmacher
fe670be5c4 s3:torture: use cli_state_client_guid in run_smb2_multi_channel()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Sep 19 11:40:15 CEST 2014 on sn-devel-104
2014-09-19 11:40:14 +02:00
Stefan Metzmacher
3a26bd1a3d s3:smbd: pass smbXsrv_connection to smb1_parse_chain()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-09-19 09:15:11 +02:00
Christof Schmitt
67aa2c4a14 torture3: Allow padding byte for LARGE_READX responses
Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-30 00:27:13 +02:00
Volker Lendecke
4288c5496b messaging3: Add msg_sink/source -- perftest
With this pair of programs I did some performance tests of the messaging
system. Guess what -- I found two bugs :-)

See the subsequent patches.

With 1500 msg_source processes I can generate message overload: A

Intel(R) Xeon(R) CPU           L5640  @ 2.27GHz

can receive roughly 100k messages per second. When using
messaging_read_send/recv user/system time is roughly even, a bit more
work done in user space. When using messaging_register, due to less
malloc activity, user space chews a lot less.

By the way: 1.500 helper threads in a blocking sendto() against a single
datagram socket reading as fast as it can (with epoll_wait in between)
only drove the loadavg to 12 on a 24-core machine. So I guess unix domain
datagram sockets are pretty well protected against overload. No thundering
herd or so. Interestingly "top" showed msg_sink at less than 90% CPU,
although it was clearly the bottleneck. But that must be a "top" artifact.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-23 00:24:18 +02:00
Volker Lendecke
0ddfdb83e8 torture: Fix cleanup2 to utilize on-demand cleanup
Now we check the cleanup when conflicts happen, not when we first open
the file. This means we don't have to re-open the connection to make
cleanup happen.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-23 00:24:18 +02:00
Volker Lendecke
513584a3b1 torture: Run the cleanup2 test against 2 nodes
This enables testing the brlock cleanup across ctdb

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-08-23 00:24:18 +02:00
Stefan Metzmacher
45807028d4 lib/util: move memcache.[ch] to the toplevel 'samba-util' library
This is generic enough that it could be used in all code.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Fri Jul 18 15:43:33 CEST 2014 on sn-devel-104
2014-07-18 15:43:33 +02:00
Garming Sam
6608402527 torture: test_ntlm_auth.py now has a require-membership-of argument
Change-Id: I90c2172af792a082fbf49ee0ab7d6eedf5471440
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Kamen Mazdrashki <kamenim@samba.org>
2014-07-15 13:33:57 +02:00
Volker Lendecke
4126f9716b torture3: Fix bug 10687
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Jul  3 19:07:15 CEST 2014 on sn-devel-104
2014-07-03 19:07:15 +02:00
Volker Lendecke
9a27ed9c86 torture3: Add some brlock entries in cleanup2
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-30 22:28:15 +02:00
Volker Lendecke
9f3e894468 libcli: Make smb2cli_create return blobs
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-06-30 22:28:14 +02:00
Volker Lendecke
cad1d0b048 torture3: Reproducer for bug 10593
We panic if we get an oplock break response for a cancelled create request

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Jun 21 23:05:47 CEST 2014 on sn-devel-104
2014-06-21 23:05:47 +02:00
Jeremy Allison
66a04ba7c1 s3: libsmb : Move users of cli_dskattr to a 64-bit interface cli_disk_free().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <Volker.Lendecke@SerNet.DE>
2014-06-07 03:15:14 +02:00
Volker Lendecke
a448699b7d torture3: Add a little gencache_parse load test
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sat May 24 16:16:43 CEST 2014 on sn-devel-104
2014-05-24 16:16:43 +02:00
Jeremy Allison
69e24b4e8b s3: client : Add extra return parameter to all client open calls.
Add a return parameter of struct smb_create_returns *cr to
cli_ntcreate()
cli_ntcreate_recv()
cli_nttrans_create()
cli_nttrans_create_recv()

Always pass in NULL for now. This fixes the create
API to always fully return the data the server has
given back to us on the open file to the caller.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-05-09 23:10:07 +02:00
Volker Lendecke
50a66d588a torture3: local-messaging-read3
This is a testcase for the rpc-style messaging nested event context. We have to
fork here: The nested event context does not reply to the PING message, it only
listens for the PONG response. But that's the point of the patches: Correctly
pick just one message in a nested event context. I think this is the best we
can do with nested event contexts.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu May  8 11:32:44 CEST 2014 on sn-devel-104
2014-05-08 11:32:44 +02:00
Volker Lendecke
c0f6ab92f7 messaging3: Push down the self-send callback
In the messaging_read receivers we already defer the callback: We need to
reply on potentially different tevent contexts, thus the defer_callback.

The callback case in messaging_dispatch_rec was direct before this
patch. This changes messaging_dispatch_rec to also defer the callback
in the self-send case.

Now we need only two roundtrips in local-messaging-read1 :-)

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-08 09:10:12 +02:00
Volker Lendecke
80365e030d torture3: Fix local-messaging-read1
Now that we defer requests in dispatch_rec, we need 3 rounds to finish
the requests

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-05-08 09:10:12 +02:00
Volker Lendecke
042f94b560 torture3: Add a test deleting a different req
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Apr 30 17:09:59 CEST 2014 on sn-devel-104
2014-04-30 17:09:59 +02:00
Volker Lendecke
54118d24a7 torture3: Add local-messaging-read1
This covers deleting and re-adding a request in a callback

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-30 14:52:08 +02:00
Volker Lendecke
3af130ea93 torture3: Add a bit more coverage to messaging_read
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-04-30 14:52:08 +02:00
Jeremy Allison
ea27382ef4 s3: torture - Fix racy assumption in original messaging test.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Apr 24 00:50:55 CEST 2014 on sn-devel-104
2014-04-24 00:50:55 +02:00
Jeremy Allison
4fa1235cda s3: torture - Add required talloc frame for msgtest.c
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: "Stefan (metze) Metzmacher" <metze@samba.org>
2014-04-23 22:33:09 +02:00
Andreas Schneider
2522bb8090 selftest: Rename WINBINDD_SOCKET_DIR environment variable.
It is very confusing if the env var uses the same name as the define in
the source code. So prefix it with SELFTEST.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andreas Schneider
c29fb2e615 wbclient: Check with nss_wrapper_enabled().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-04-17 14:56:06 +02:00
Andrew Bartlett
4d50c75159 s3-auth: Finally change make_user_info_*() use a parent talloc context
Change-Id: Iedf516e8c24e0d18064aeedd8e287ed692d3c5b4
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: David Disseldorp <ddiss@samba.org>
2014-04-02 11:05:46 +02:00
Stefan Metzmacher
9e971068d0 s3:torture: avoid compiler warnings in vfstest.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:43 +02:00
Stefan Metzmacher
5686c80966 s3:torture: check the result of cli_nt_delete_on_close_recv() in test_notify.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:43 +02:00
Stefan Metzmacher
70b7ef9573 s3:torture: remove unused variables in test_buffersize.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:43 +02:00
Stefan Metzmacher
88d0ff74a0 s3:torture: avoid explicit casting and compiler warnings in pdbtest.c
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-04-02 09:03:43 +02:00
Volker Lendecke
c5d07df6ab pthreadpool: Allow multiple jobs to be received
This can avoid syscalls when multiple jobs are finished simultaneously

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-27 06:06:11 +01:00
Volker Lendecke
17a60b98db pthreadpool: Add a simple benchmark
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-27 06:06:11 +01:00
Stefan Metzmacher
2103c373b4 auth/gensec: remove tevent_context argument from gensec_update()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-03-27 00:36:32 +01:00
Stefan Metzmacher
e93b85dbd8 s3:wscript: only build ctdb_dummy.c if we have no cluster support
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-03-24 17:09:11 +01:00
Stefan Metzmacher
24054b5f8b s3:param: move lp_ctdbd_socket() to ctdbd_conn.c
This allows us to use CTDB_PATH only in ctdbd_conn.c

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-03-24 17:09:10 +01:00
Stefan Metzmacher
b2c9921622 s3:lib: move all ctdb related dummy functions to ctdb_dummy.c
This gets all dummy functions for the build without CLUSTER_SUPPORT.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2014-03-24 17:09:10 +01:00
Stefan Metzmacher
05e821b220 s3:torture: use CLI_BUFFER_SIZE instead of BUFFER_SIZE
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-03-05 10:06:24 -08:00
Volker Lendecke
fb35d17e43 vfstext: Use just one messaging_context in vfstest
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-19 16:38:30 -08:00
Andreas Schneider
4d792db03f s3-auth: Pass mem_ctx to auth_check_ntlm_password().
Coverity-Id: 1168009
BUG: https://bugzilla.samba.org/show_bug.cgi?id=8598

Signed-off-by: Andreas Schneider <asn@samba.org>

Change-Id: Ie01674561a6a75239a13918d3190c2f21c3efc7a
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2014-02-19 11:29:29 +13:00
Garming Sam
f548585051 param: rename lp function and variable from "cli_maxprotocol" to "client_max_protocol"
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-02-07 16:19:15 -08:00
Michael Adam
6def1c3f6e dbwrap: add a dbwrap_flags argument to db_open_ctdb()
This is in preparation of directly supporting ctdb read only
record copies when opening a ctdb database from samba.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-02-07 16:06:06 +01:00
Michael Adam
cf0cb0add9 dbwrap: add a dbwrap_flags argument to db_open()
This is in preparation to support handing flags to backends,
in particular activating read only record support for ctdb
databases. For a start, this does nothing but adding the
parameter, and all databases use DBWRAP_FLAG_NONE.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2014-02-07 16:06:06 +01:00
Volker Lendecke
9801072ce2 messaging3: remove msg_channel
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2014-01-21 08:11:08 +01:00
Simo Sorce
ac7de80210 Compare the correct values
Reported by herwin <samba@herwinw.nl>
Resolves: https://bugzilla.samba.org/show_bug.cgi?id=10349

Signed-off-by: Simo Sorce <idra@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Fri Dec 27 20:39:54 CET 2013 on sn-devel-104
2013-12-27 20:39:54 +01:00
Volker Lendecke
92f9aac828 torture3: Do not depend on epoll
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-12-14 10:04:08 +01:00
Andreas Schneider
30231b256d s3-torture: Call cli_flush().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Dec  6 03:07:32 CET 2013 on sn-devel-104
2013-12-06 03:07:32 +01:00
Andreas Schneider
143907025b s3-torture: Make sure status is used initialized.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
Andreas Schneider
1d7b909bd2 s3-torture: Fix several memory leaks in delete_fn().
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-12-06 01:14:09 +01:00
Volker Lendecke
ebc157961a torture3: Reproducer for bug 10284
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Nov 26 22:53:04 CET 2013 on sn-devel-104
2013-11-26 22:53:04 +01:00
Andreas Schneider
6366ebb79b s3-lib: Add grpname to talloc_sub_specified().
BUG: https://bugzilla.samba.org/show_bug.cgi?id=2191

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-21 15:00:44 -08:00
Volker Lendecke
2bb0954567 torture3: Use tevent_req_nterror properly
Might be minor, but the less example of wrong API use we have the better
it is.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Nov 19 04:05:08 CET 2013 on sn-devel-104
2013-11-19 04:05:08 +01:00
David Disseldorp
c7aab6e520 vfstest: fix uninitialised variable usage in open
The vfstest open command currently fails intermittently due to a read of
a potentially uninitialised status variable.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-11-08 09:40:37 -08:00
Stefan Metzmacher
4912378402 s3:torture: add PROTOCOL_SMB3_02 handling
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-17 04:00:41 +02:00
Volker Lendecke
d3c689fc5c lib: Use "mem_ctx" arg in gencache_get
Signed-off-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Sep  5 20:09:21 CEST 2013 on sn-devel-104
2013-09-05 20:09:21 +02:00
Volker Lendecke
8a7246ac2c lib: Add a "mem_ctx" arg to gencache_get (unused so far)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-05 09:16:23 -07:00
Volker Lendecke
aaa6a688cf torture3: Test getting a blob as a string
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-05 09:16:22 -07:00
Volker Lendecke
1173fed916 lib: Add "mem_ctx" to gencache_get_data_blob
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-05 09:16:22 -07:00
Volker Lendecke
46131cb802 torture3: Fix a const warning
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-09-05 09:16:22 -07:00
Volker Lendecke
ade8477f98 torture3: Trigger a nasty cleanup bug in smbd
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Tue Sep  3 19:13:14 CEST 2013 on sn-devel-104
2013-09-03 19:13:14 +02:00
Volker Lendecke
e1843cd332 torture3: add clipathinfo-bufsize
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-28 23:37:08 +02:00
Jeremy Allison
1229881df6 libcli/smb: Change smb2cli_create() and smb2cli_create_recv() to return a parameter blob of the newly opened/created file.
Will use in the smb2 client code.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:06 +02:00
Jeremy Allison
00f784ec91 libcli/smb: Fix smb2cli_write_recv() and smb2cli_write() to return the bytes written.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-08-15 09:07:05 +02:00
Stefan Metzmacher
2c3c8caa0c s3:torture: avoid interpret_protocol()
lp_set_cmdline("client max protocol",...) and
lp_cli_maxprotocol() are the more generic solution.

https://bugzilla.samba.org/show_bug.cgi?id=9514

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15 09:07:05 +02:00
Günther Deschner
5c5cff0a72 s3-rpc_cli: pass down ndr_interface_table to rpc_pipe_open_tcp().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Günther Deschner
9813fe2b04 s3-rpc_cli: pass down ndr_interface_table to cli_rpc_pipe_open_noauth().
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2013-08-05 10:30:00 +02:00
Jeff Layton
63db0694c4 torture: add LOCAL-sid_to_string testcase
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-07-31 15:16:18 -07:00
Jeff Layton
1a21bc0483 torture: add more string_to_sid torture testcases
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-07-31 15:16:15 -07:00
Volker Lendecke
d67e614a07 lib: Add before/after hooks to async_connect
This will facilitiate [un]become_root for smbd to connect safely to ctdbd.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2013-05-17 11:22:45 +02:00
Volker Lendecke
1cd20441a7 torture: Remove some unused code
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
2013-05-14 14:34:20 +02:00
Volker Lendecke
2b97eb13ff vfstest: Convert cmd_set_nt_acl to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:50:03 -07:00
Volker Lendecke
6f7d9b24d0 vfstest: Convert cmd_utime to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:50:03 -07:00
Volker Lendecke
6624095d67 vfstest: Convert cmd_lstat to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:50:03 -07:00
Volker Lendecke
7d5403037a vfstest: Convert cmd_stat to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:50:03 -07:00
Volker Lendecke
a6985e6e67 vfstest: Convert cmd_rename to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:50:03 -07:00
Volker Lendecke
434885a4ac vfstest: Convert cmd_pathfunc to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:50:02 -07:00
Volker Lendecke
1f6b0af7e7 vfstest: Convert cmd_open to synthetic_smb_fname
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
2013-04-17 14:50:02 -07:00
Jeremy Allison
d9afb2b14d s3:torture: Add new LARGE_READX test to investigate large SMBreadX behavior.
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-03-20 09:32:26 -07:00
Guenter Kukkukk
e10c81553b vfs_catia: write a testcase - add a translate command to vfstest
first approach

Signed-off-by: Guenter Kukkukk <kukks@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
2013-03-11 21:44:43 -07:00
Guenter Kukkukk
b40c4b069a vfstest: fix the "-c" multiple-command option
Signed-off-by: Guenter Kukkukk <kukks@samba.org>
Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com>
2013-03-11 21:40:23 -07:00
Andreas Schneider
d5a210a26f s3-torture: Don't leak memory.
Reviewed-by: Alexander Bokovoy <ab@samba.org>
2013-02-22 16:36:14 +01:00
Stefan Metzmacher
f3aa372bcb s3:torture: call fault_setup() to get usage backtraces
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:48:05 +01:00
Stefan Metzmacher
5c72385f3d s3:torture: s/struct event_context/struct tevent_context
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:51 +01:00
Stefan Metzmacher
60fa4c7305 s3:torture: make use of samba_tevent_context_init()
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2013-02-19 23:47:48 +01:00
Volker Lendecke
dc2e47508d torture: We use transactions for CLEAR_IF_FIRST db
This does not work in the ctdb case

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2013-02-08 12:58:12 +01:00
Christian Ambach
940b7ec78c s3:torture/vfstest add memreport option
this will run a talloc_report_full on the talloc stackframe after each command

Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04 12:19:30 +01:00
Christian Ambach
8e571fd385 s3:torture/vfstest implement sys_acl_blob_get_fd
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04 12:19:30 +01:00
Christian Ambach
de676555ab s3:torture/vfstest implement sys_acl_blob_get_file
Signed-off-by: Christian Ambach <ambi@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-02-04 12:19:30 +01:00
Jeremy Allison
e104e5a819 Regression test for bug #9571 - Unlink after open causes smbd to panic
Replicates the protocol activity that triggers the crash.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Jan 28 15:33:17 CET 2013 on sn-devel-104
2013-01-28 15:33:17 +01:00
Volker Lendecke
a8fe624948 smbtorture: Satisfy a linker dependency
Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-18 09:16:58 -08:00
Jeremy Allison
5bffdac4ed torture/vfstest.c: Always use create_conn_struct(). Don't hand create connection structs.
Signed-off-by: Jeremy Allison <jra@samba.org>

Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2013-01-09 14:54:31 +11:00
Günther Deschner
f2d9589b17 s3-auth: remove crypto from serverinfo_to_SamInfoX calls.
All crypto is dealt with within the netlogon samlogon server now.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2012-12-09 19:39:08 +01:00
Andreas Schneider
1ded99cd14 torture: Use new samba_getpass() in masktest.
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2012-12-03 14:35:09 +01:00
Andreas Schneider
531af0af1a torture: Use new samba_getpass() in smbtorture3.
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2012-12-03 14:35:09 +01:00
Andreas Schneider
17bcdb5200 torture: Use new samba_getpass() in locktest2.
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2012-12-03 14:35:09 +01:00
Volker Lendecke
24c36e7484 s3: test dbwrap_ctdb
Reviewed-by: Michael Adam <obnox@samba.org>
2012-11-29 17:41:15 +01:00
Günther Deschner
b11ba24883 s3-rpc_client: try to use socket_addr if available in rpc_pipe_open_tcp() (bug #9426)
Guenther

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

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Nov 26 17:36:20 CET 2012 on sn-devel-104
2012-11-26 17:36:19 +01:00
Andrew Bartlett
ef195a18aa torture: remove source3 locktest and masktest
We now just build these in waf, using the source4/torture code.

The source4 versions of these are tested in make test.

Andrew Bartlett

Reviewed-by: Andreas Schneider <asn@samba.org>
2012-11-22 10:21:16 +01:00
Andrew Bartlett
dc05ab8e19 Ensure we Correctly set fsp->is_directory before dealing with ACLs.
Reviewed by: Jeremy Allison <jra@samba.org>
2012-11-13 22:48:19 +01:00
Björn Baumbach
5f1b5404b8 s3-torture:test_ctdbconn: fix the build against older ctdb versions
by checking if we have the ctdb_protocol.h and including ctdb_private.h otherwise.

Signed-off-by: Björn Baumbach <bb@sernet.de>
Reviewed-by: Michael Adam <obnox@samba.org>
2012-11-02 13:47:35 +01:00
Andrew Bartlett
cb50e85a5a vfstest: set umask(0) in vfstest
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Oct 26 10:07:03 CEST 2012 on sn-devel-104
2012-10-26 10:07:01 +02:00
Stefan Metzmacher
8a1c7a0a66 s3:smbd: add exit_server to the smbd_shim hooks
This is in preparation of moving sessionid_tdb and conn_tdb
to smbd exclusively.

metze

Signed-off-by: Michael Adam <obnox@samba.org>
2012-10-19 12:14:58 +02:00
Andrew Bartlett
c8ade07760 smbd: Add mem_ctx to {f,}get_nt_acl VFS call
This makes it clear which context the returned SD is allocated on, as
a number of callers do not want it on talloc_tos().

As the ACL transformation allocates and then no longer needs a great
deal of memory, a talloc_stackframe() call is used to contain the
memory that is not returned further up the stack.

Andrew Bartlett
2012-10-11 12:25:11 +11:00
Andrew Bartlett
9158974540 smbd: Add mem_ctx to sys_acl_init() and all callers
This changes from allocation on NULL to allocation on the supplied
memory context.

Currently that supplied context is talloc_tos() at the the final consumer of
the ACL.

Andrew Bartlett
2012-10-11 12:25:11 +11:00
Volker Lendecke
9fc42daf75 s3: Add two tests a CLEAR_IF_FIRST crash
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Sat Oct  6 17:16:39 CEST 2012 on sn-devel-104
2012-10-06 17:16:39 +02:00
Andrew Bartlett
6b7a99107d s3-torture: Allow vfstest to set ACLs on a directory
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Aug 17 02:35:49 CEST 2012 on sn-devel-104
2012-08-17 02:35:49 +02:00
Andrew Bartlett
df8e9c1287 s3-selftest: Add a seperate test for ACL tests using vfstest
This does not check for consistency or correctness yet, that will be
done with python unit tests.  The purpose of this test is to ensure
that the vfstest wrapper doesn't crash.

Andrew Bartlett

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Aug 16 09:32:25 CEST 2012 on sn-devel-104
2012-08-16 09:32:25 +02:00
Andrew Bartlett
05885a84f9 s3-torture: Add ACL commands to vfstest
This will allow easier investigation of our ACL layer.

Andrew Bartlett
2012-08-16 15:25:40 +10:00
Andrew Bartlett
345b980c3e s3-torture: Use talloc more in vfstest
This matches the rest of Samba, which allocates many of these structures with talloc.

Andrew Bartlett
2012-08-16 15:25:40 +10:00
Andrew Bartlett
43255a1d18 s3-torture: Initialise fsp fully in vfstest open 2012-08-16 15:25:40 +10:00
Jeremy Allison
b70f23c2b5 Correctly check for errors in strlower_m() returns. 2012-08-09 12:08:18 -07:00
Jeremy Allison
526e875cec Check error returns from strupper_m() (in all reasonable places). 2012-08-09 12:06:54 -07:00
Michael Adam
523602863a s3:torture:delete: add a 12th subtest to the delete-on-close tests
test whether second open is possible with initial delete on close
and how setting and unsetting delete on close on the handle affects
the initial delete on close (it does not...)
2012-08-09 16:22:53 +02:00
Michael Adam
db160bf510 s3:torture:delete: fix 11th test to work against windows 2012-08-09 16:22:50 +02:00
Michael Adam
2e53fb109f s3:torture:delete: simplify return code handling, fixing a couple of return codes in error cases 2012-08-09 15:29:51 +02:00
Michael Adam
49a2c68011 s3:torture:delete: reduce indentation 2012-08-09 15:29:50 +02:00
Michael Adam
54e5810638 s3:torture:delete: add a comment 2012-08-09 15:29:49 +02:00
Michael Adam
c228b7abee s3:torture:delete: add a comment 2012-08-09 15:29:47 +02:00
Michael Adam
7a7b86d3c7 s3:torture:delete: add a comment 2012-08-09 15:29:46 +02:00
Michael Adam
5b1afa6307 s3:torture:delete: move the success message for a subtest to the correct place 2012-08-09 15:29:45 +02:00
Michael Adam
2f7a371b92 s3:torture:delete: remove an else, reducing indentation 2012-08-09 15:29:44 +02:00
Michael Adam
3668a4c94c s3:torture:delete: remove an else, reducing indentation 2012-08-09 15:29:42 +02:00
Michael Adam
777c7a965b s3:torture:delete: remove an else, reducing indentation 2012-08-09 15:29:41 +02:00
Michael Adam
c36deaf3af s3:torture:delete: remove an else, reducing indentation 2012-08-09 15:29:40 +02:00
Michael Adam
e833141622 s3:torture:delete: really fail the test in a failure case 2012-08-09 15:29:39 +02:00
Michael Adam
9058288d6a s3:torture:delete: fix a comment 2012-08-09 15:29:38 +02:00
Michael Adam
bf492d1ffb s3:torture:delete: fix a message 2012-08-09 15:29:37 +02:00
Michael Adam
ff5e6e33fd s3:torture:delete: fix a message 2012-08-09 15:29:36 +02:00
Michael Adam
4aac6d00a9 s3:torture:delete: fix a message 2012-08-09 15:29:35 +02:00
Michael Adam
595845ca30 s3:torture:delete: fix a message (counting the opens) 2012-08-09 15:29:33 +02:00
Michael Adam
2aded6aebd s3:torture:delete: untangle function call from result check 2012-08-09 15:29:32 +02:00
Michael Adam
ef3684739a s3:torture:delete: untangle function call from result check 2012-08-09 15:29:26 +02:00
Michael Adam
4e75b0c717 s3:torture:delete: untangle function call from result check 2012-08-09 15:27:16 +02:00
Michael Adam
ccb25831e2 s3:torture:delete: untanlge function call from result check 2012-08-09 15:27:15 +02:00
Michael Adam
8a92ae23fe s3:torture:delete: untangle function call from result check 2012-08-09 15:26:09 +02:00
Michael Adam
02b092533a s3:torture:delete: untangle function call from result check 2012-08-09 15:26:08 +02:00
Michael Adam
5138eb50a3 s3:torture:delete: untangle function call from result check 2012-08-09 15:26:07 +02:00
Michael Adam
5bc7c77cd8 s3:torture:delete: untangle function call from result check 2012-08-09 15:26:06 +02:00
Michael Adam
b5e9378e28 s3:torture:delete: untangle function call from result check 2012-08-09 15:25:19 +02:00
Michael Adam
361429d02f s3:torture:delete: untangle function call from result check 2012-08-09 15:25:18 +02:00
Michael Adam
8684506478 s3:torture:delete: untangle function call from result check 2012-08-09 15:25:17 +02:00
Michael Adam
1db70c0b8b s3:torture:delete: untangle function call from result check 2012-08-09 15:25:16 +02:00
Michael Adam
a70a4ad731 s3:torture:delete: untangle function call from result check 2012-08-09 15:13:33 +02:00
Andrew Bartlett
b7b4879350 s3-torture: Extend pdbtest to also run an authentication unit-test
This tests both the builtin auth_sam against passdb directly and the
configured auth module.

Andrew Bartlett
2012-08-08 08:03:21 +02:00
Stefan Metzmacher
0aac3c09f1 libcli/smb: pass smbXcli_session to smb2cli_tcon_set_values()
metze
2012-07-25 14:48:50 +02:00
Stefan Metzmacher
bb6761c127 s3:libsmb: remove unused cli_state->smb2.pid
metze
2012-07-25 12:15:05 +02:00
Stefan Metzmacher
d2ba9c36f3 s3:libsmb: remove cli_state->smb2.tid
metze
2012-07-25 12:15:03 +02:00
Stefan Metzmacher
b0f1921bd7 s3:torture: remove unused shm_setup()
metze
2012-07-25 12:15:02 +02:00
Stefan Metzmacher
e0bc165080 s3:torture: replace shm_setup() with anonymous_shared_allocate()
metze
2012-07-25 12:15:01 +02:00
Stefan Metzmacher
79ccb96cd3 s3:torture/test_smb2: make a copy of smbXcli_tcon
metze

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Wed Jul 25 00:10:47 CEST 2012 on sn-devel-104
2012-07-25 00:10:47 +02:00
Stefan Metzmacher
51af8b9600 libcli/smb: pass smbXcli_tcon to smb2cli_query_directory*()
metze
2012-07-24 22:20:06 +02:00
Stefan Metzmacher
370e7140bb libcli/smb: pass smbXcli_tcon to smb2cli_query_info*()
metze
2012-07-24 22:20:06 +02:00
Stefan Metzmacher
6dc701c958 libcli/smb: pass smbXcli_tcon to smb2cli_set_info*()
metze
2012-07-24 22:20:06 +02:00
Stefan Metzmacher
6612c831a3 libcli/smb: pass smbXcli_tcon to smb2cli_flush*()
metze
2012-07-24 22:20:06 +02:00
Stefan Metzmacher
86a5ab731b libcli/smb: pass smbXcli_tcon to smb2cli_write*()
metze
2012-07-24 22:20:06 +02:00
Stefan Metzmacher
697b82a619 libcli/smb: pass smbXcli_tcon to smb2cli_read*()
metze
2012-07-24 22:20:06 +02:00
Stefan Metzmacher
74f9b52e65 libcli/smb: pass smbXcli_tcon to smb2cli_close*()
metze
2012-07-24 22:20:06 +02:00
Stefan Metzmacher
32b33999db libcli/smb: pass smbXcli_tcon to smb2cli_create*()
metze
2012-07-24 22:20:06 +02:00
Stefan Metzmacher
a41a1d176f s3:test_smb2: copy the session_channel from the primary channel.
metze
2012-07-23 18:19:36 +02:00
Rusty Russell
51ec59db10 source3/torture/pdbtest: allocate talloc_stackframe()
Avoid talloc_tos() without a stackframe.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:28 +09:30
Rusty Russell
fe72740e82 loadparm: make the source3/ lp_ functions take an explicit TALLOC_CTX *.
They use talloc_tos() internally: hoist that up to the callers, some
of whom don't want to us talloc_tos().

A simple patch, but hits a lot of files.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-07-18 15:07:23 +09:30
Andrew Bartlett
0b57d36ae3 s3-pdbtest: Initialise more elements for testing
If these were left as defaults, they cause issues when the backend (pdb_samba4)
returns the internal defaults from the directory, not the defaults from samu_new()

Andrew Bartlett
2012-06-27 11:29:17 +02:00
Andrew Bartlett
6acd2f2b1a s3-pdbtest: show mis-matching times 2012-06-27 11:29:16 +02:00
Andrew Bartlett
290e7de47a s3-pdbtest: Fix pdbtest to compare the same fields
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Tue Jun 26 16:09:28 CEST 2012 on sn-devel-104
2012-06-26 16:09:28 +02:00
Andrew Bartlett
a7f26d5c6d s3-pdbtest: Report and handle errors in pdb->getsampwnam() 2012-06-26 14:10:17 +02:00
Michael Adam
51b30c61f4 s3:torture:smb2: pass smb2-session-reconnect test (add generosity in error case)
samba checks tree before file, so we get a
STATUS_NETWORK_NAME_DELETED instead STATUS_FILE_CLOSED
when operating on a file handle on a invalid tree id.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-06-22 17:28:18 +02:00
Volker Lendecke
8f94ecbb90 dbwrap: dbwrap_store_uint32->dbwrap_store_uint32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Volker Lendecke
7f19a5ab52 dbwrap: dbwrap_fetch_uint32->dbwrap_fetch_uint32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:28 +02:00
Volker Lendecke
749314fcf9 dbwrap: dbwrap_store_int32->dbwrap_store_int32_bystring
Signed-off-by: Michael Adam <obnox@samba.org>
2012-06-15 12:14:27 +02:00
Michael Adam
72a92b8c4c s3:torture: fix use of non-existent word (existant) 2012-06-12 07:21:44 +02:00
Stefan Metzmacher
f454765b37 s3:torture: use smbd/smbd.h instead of just smbd/proto.h in vfstest_chain.c
This fixes compiler warnings regarding incomplete types.

metze
2012-06-06 10:18:39 +02:00
Jeremy Allison
07fc59f78d Tests for bug #8972 - Add permission checks to run_simple_posix_open_test().
This requires a share with :

	create mask = 0777
	force create mode = 0
	directory mask = 0777
	force directory mode = 0

set so we don't mess with requested permissions.

Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue Jun  5 08:20:03 CEST 2012 on sn-devel-104
2012-06-05 08:20:03 +02:00
Luk Claes
aea996dba6 s3:libsmb: get rid of cli_smb_req_*,cli_smb_wct_ofs,cli_smb_chain_send
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sun Jun  3 23:37:02 CEST 2012 on sn-devel-104
2012-06-03 23:37:02 +02:00
Luk Claes
4688107800 s3:libsmb: get rid of cli_ucs2
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon May 28 16:58:03 CEST 2012 on sn-devel-104
2012-05-28 16:58:03 +02:00
Luk Claes
764b5e5610 s3:libsmb: get rid of cli_negprot
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:49 +02:00
Luk Claes
82895ab22f s3:libsmb: get rid of cli_state_disconnect
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:49 +02:00
Luk Claes
3c9c06ac05 s3:libsmb: get rid of cli_state_capabilities
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:46 +02:00
Luk Claes
d8c0646a5d s3:libsmb: get rid of cli_state_protocol
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:45 +02:00
Luk Claes
8e24e7f6b8 s3:libsmb: get rid of cli_sockopt
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-28 14:49:44 +02:00
Volker Lendecke
68d03f2ef5 s3: Test whether get_share_mode_lock cleans up stale processes
Signed-off-by: Jeremy Allison <jra@samba.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-25 09:19:39 -07:00
Jeremy Allison
c531aac27c Added torture test for bug #8910. Test remove_duplicate_addrs2().
Autobuild-User: Jeremy Allison <jra@samba.org>
Autobuild-Date: Tue May 22 01:31:17 CEST 2012 on sn-devel-104
2012-05-22 01:31:17 +02:00
Volker Lendecke
f5ca3f11e4 s3: Revert the serverid changes, they need more work
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Fri May 18 13:12:14 CEST 2012 on sn-devel-104
2012-05-18 13:12:14 +02:00
Volker Lendecke
e34b7306fc s3: Test whether get_share_mode_lock cleans up stale processes
Signed-off-by: Jeremy Allison <jra@samba.org>
2012-05-17 13:17:22 -07:00
Stefan Metzmacher
23887fa87e s3:torture: add #include "lib/util/tevent_ntstatus.h" to test_addrchange.c
metze
2012-05-14 15:12:34 +02:00
Luk Claes
c140c5e459 s3/libsmb: Generalise cli_state in smb2 logoff calls
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-12 01:01:33 +02:00
Luk Claes
c7a1292628 s3/libsmb: Generalise cli_state in smb2 write calls
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-12 01:01:31 +02:00
Luk Claes
50d88c96bc s3/libsmb: Generalise cli_state in smb2 query_directory calls
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-12 00:46:30 +02:00
Luk Claes
473363a807 s3/libsmb: Generalise cli_state in smb2 flush calls
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-12 00:45:53 +02:00
Luk Claes
87d890fdd9 s3/libsmb: Generalise cli_state in smb2 create calls
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-12 00:45:21 +02:00
Luk Claes
f6db3d7bef s3/libsmb: Generalise cli_state in smb2 close calls
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-12 00:44:41 +02:00
Luk Claes
14473f37f5 s3-libsmb: Generalise cli_state in smb2 read calls
Signed-off-by: Luk Claes <luk@debian.org>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-05-12 00:43:53 +02:00
Stefan Metzmacher
5252ddf74e s3:torture/test_smb2: add support for PROTOCOL_SMB3_00
metze
2012-05-06 14:50:39 +02:00
Stefan Metzmacher
6aa601b151 s3:torture: do some query_info and set_info calls in SMB2-SESSION-REAUTH
metze
2012-05-06 14:50:39 +02:00
Christian Ambach
d7f3c00b85 s3:torture fix flakey testcase
don't put database into /tmp, use lp_private_dir() to put
it into the selftest prefix

Autobuild-User: Christian Ambach <ambi@samba.org>
Autobuild-Date: Wed May  2 00:57:05 CEST 2012 on sn-devel-104
2012-05-02 00:57:04 +02:00
Christian Ambach
55870b0bf9 s3:torture: add idmap_tdb_common test code 2012-05-01 09:32:11 +02:00
Volker Lendecke
99fa29ae09 s3-dbwrap: Add dbwrap_record_watch_send/recv
With this API you can asynchronously wait for a record to be modified
2012-04-19 22:24:18 +02:00
Andrew Bartlett
4471778d78 s3-passdb: Remove unused sampass->pass_must_change_time
There is no need to call pdb_set_pass_must_change_time() because
nothing ever consults that value.  It is always calculated from the
domain policy.

Also, this means we no longer store the value in LDAP.  The value
would only ever be set when migrating from tdbsam or smbpasswd, not on
password changes, so would become incorrect over time.

Andrew Bartlett
2012-04-19 12:34:33 +02:00
Volker Lendecke
ae691cd9cc s3: Add two notify benchmark tests 2012-04-17 10:21:02 +02:00
Volker Lendecke
842b86c45f s3: Make torture_nprocs globally available 2012-04-17 10:21:02 +02:00
Volker Lendecke
74baae782f s3: Add msg_channel
This is a tevent_based variant of messaging_register
2012-04-17 10:21:01 +02:00
Volker Lendecke
48a485b639 s3: Add a second ctdb connect library
The existing one is not async at all.
2012-04-17 10:21:01 +02:00
Andrew Bartlett
6aa12fcb30 build: Remove SMB_OFF_T, replace with off_t
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr  6 01:47:43 CEST 2012 on sn-devel-104
2012-04-06 01:47:43 +02:00
Andrew Bartlett
2320b2144f build: Remove SMB_STRUCT_DIRENT define 2012-04-05 02:39:09 +02:00
Jeremy Allison
d497434434 Who would have guessed - checking returns from strlcat found a memory overwrite bug :-). 2012-03-30 21:26:07 +02:00
Jeremy Allison
959516d61b More strlcat/strlcpy truncate checks. 2012-03-30 21:26:07 +02:00
Jelmer Vernooij
32fd6d639a lib/util: Remove dummy wrapper for getgrgid(). 2012-03-24 15:26:36 +01:00
Jelmer Vernooij
43f275008f lib/util: Remove dummy wrapper for getpwuid(). 2012-03-24 15:25:05 +01:00
Stefan Metzmacher
100b92b2cc s3:torture: fix segfault in LOCAL-TALLOC-DICT
talloc_dict_set() expects a pointer to an talloc'ed pointer.

metze
2012-03-13 08:26:35 +01:00
Stefan Metzmacher
57ddd38c1a s3:torture: talloc_dict_traverse() returns the number of entries
metze
2012-03-13 08:26:35 +01:00
Volker Lendecke
c9870a62f5 s3: Add a new set of andx chain handling routines
This is in preparation of getting rid of chain_reply.
2012-03-10 15:34:11 +01:00
Andrew Bartlett
cfa33c4567 s3-selftest: Add tests for ntlm_auth gss-spnego client and server
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Mar  2 07:05:44 CET 2012 on sn-devel-104
2012-03-02 07:05:44 +01:00
Andrew Bartlett
8ea795672d s3-selftest: make ntlm_auth test more robust to bad input
If we do not know the helper protocol, make sure to error.

Andrew Bartlett
2012-03-01 22:04:46 +11:00
Andrew Bartlett
eca3a14870 s3-selftest: Add more tests for ntlm_auth 2012-03-01 22:04:46 +11:00
Stefan Metzmacher
65d42ab727 s3:torture/test_smb2: test path based calls during reauth in SMB2-MULTI-CHANNEL
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Wed Feb 29 07:23:14 CET 2012 on sn-devel-104
2012-02-29 07:23:14 +01:00
Stefan Metzmacher
300ab04a07 s3:torture/test_smb2: test handle based calls during reauth in SMB2-MULTI-CHANNEL
metze
2012-02-29 05:49:11 +01:00
Stefan Metzmacher
2fced53cfe s3:torture/test_smb2: do a reauth over multiple channels in SMB2-MULTI-CHANNEL
metze
2012-02-29 05:49:11 +01:00
Stefan Metzmacher
670ea3e3a3 s3:torture/test_smb2: add a 3rd channel to SMB2-MULTI-CHANNEL
metze
2012-02-29 05:49:10 +01:00
Stefan Metzmacher
c0dac92b42 s3:torture/test_smb2: expect FILE_CLOSED on invalid handles in SMB2-MULTI-CHANNEL
metze
2012-02-29 05:49:10 +01:00
Volker Lendecke
c5c67cacd9 s3: Add a test that makes a chained open break an oplock
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Wed Feb 29 01:13:03 CET 2012 on sn-devel-104
2012-02-29 01:13:01 +01:00
Stefan Metzmacher
43dd033618 s3:torture/test_smb2: test a tree_connect during reauth
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue Feb 28 06:58:44 CET 2012 on sn-devel-104
2012-02-28 06:58:44 +01:00
Stefan Metzmacher
c64a85ee19 s3:torture/test_smb2: check directory listing during reauth
metze
2012-02-28 05:22:50 +01:00
Michael Adam
727f3ee6ac s3:libsmb:smb2: pass previous session ID to session setup, not previous session
We only need the session, and under some circumstances, it might complicate
things for the caller to have to cope with the whole structure (talloc...).
2012-02-28 00:08:52 +01:00
Stefan Metzmacher
b8407c22d9 s3:torture/test_smb2: show that a session is not valid for path based calls during reauth
metze

Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Feb 27 16:29:02 CET 2012 on sn-devel-104
2012-02-27 16:29:02 +01:00
Stefan Metzmacher
f8cd6e8b59 s3:torture/test_smb2: show that a session is valid during a multi-leg reauth
metze
2012-02-27 14:55:15 +01:00
Stefan Metzmacher
1444d4900f s3:torture/test_smb2: fix missleading file name in reauth test
metze
2012-02-27 14:55:15 +01:00
Stefan Metzmacher
aa4331be9e libcli/smb/smbXcli: maintain smb2 channel_signing_key separate from the signing_key
The signing_key is fix across all channels and is used for session setups
on a channel binding.

Note:
 - the last session setup response is signed with the new channel signing key.
 - the reauth session setups are signed with the channel signing key.

It's also not needed to remember the main session key.

metze
2012-02-27 12:51:33 +01:00
Stefan Metzmacher
18cd0b789e s3:torture/test_smb2: remove explicit smb2_signing_check_pdu()
smb2cli_session_set_session_key() already checks the signature
and that function really knows the signing key.

metze
2012-02-27 12:51:33 +01:00
Stefan Metzmacher
c45cb3353b s3:torture/test_smb2: a reauth doesn't update the session/signing key
metze
2012-02-27 12:51:33 +01:00
Andrew Bartlett
f14dffa815 s3-selftest: Verify GK and GF flag behaviour
At least this ensures that the helper has not crashed, it will require
a little more to ensure that the values are correct.

Andrew Bartlett

Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Feb 24 03:53:38 CET 2012 on sn-devel-104
2012-02-24 03:53:38 +01:00
Andrew Bartlett
b947d84c88 s3-selftest: run ntlm_auth against winbindd in make test 2012-02-24 12:12:48 +11:00
Volker Lendecke
e673afada1 s3-vfstest: Return an error code if cmd failed
Autobuild-User: Volker Lendecke <vl@samba.org>
Autobuild-Date: Wed Feb 22 23:56:18 CET 2012 on sn-devel-104
2012-02-22 23:56:17 +01:00