IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
Fix in the same way this was done in SMBC_opendir_ctx() for libsmbclient.
This fix means the admin no longer has to remember to set 'min client protocol ='
when connecting to an SMB2-only server (MacOSX for example) and trying to
list shares.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14152
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
io_uring is the way to go these days, libaio was never really useful
for Samba
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): Fri Oct 4 18:18:41 UTC 2019 on sn-devel-184
This uses the Linux libaio that does not meet Samba's needs. If
someone wanted to add async I/O to ntvfs, the io_uring API is the way
to go. Second option would be to use a pthreads-based API.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
That's all they do now.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Oct 4 10:58:10 UTC 2019 on sn-devel-184
It makes sense to do this in one place in case other headers/footers
are added.
Reindent ctdb_test_begin() while touching this function.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
It makes sense to do this in one place in case other headers/footers
are added.
Simplify ctdb_test_end() accordingly, reindenting because nearly all
lines are modified.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This allows more variables to be set in this function because they are
no longer in a sub-shell.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Only the test file name is ever passed.
Reindent while touching many existing lines.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
These are not used outside this script so they do not need to be
environment variables.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
* ctdb_onnode()
* testprog_onnode()
* function_onnode()
These encapsulate familiar patterns found when running
try_command_on_node(). The new function names are more concise and
encourage more readable tests. Test writers can do less thinking
about the subtleties of running different types of commands on nodes.
For example, these functions ensure that $CTDB and $VALGRIND are used
in the correct contexts.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
There is no point folding this down to 1. Tests should be able to see
the original value, if required.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
The main change is to source cluster.bash instead of integration.bash.
While touching the preamble, the following additional changes are also
made:
* Drop test_info() definition and replace it with a comment
The use of test_info() is pointless.
* Drop call to ctdb_test_check_real_cluster()
cluster.bash now does this.
* Drop call to cluster_is_healthy()
This is a holdover from when the previous test would restart daemons
to get things ready for a test. There was also a bug where going
into recovery during the restart would sometimes cause the cluster
to become unhealthy. If we really need something like this then we
can add it to ctdb_test_init().
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This centralises this logic. Use it in a subset of tests - there are
other cases but these will be cleaned up soon.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This allows standard exit codes for failed and skipped tests, and test
errors.
Skipped tests currently just succeed and a test error is the same as a
failure. These can be easily changed later when run_tests.sh is ready
to handle them.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Use of this tunable was dropped over 5 years ago in commit
16837bc309.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Oct 4 07:07:21 UTC 2019 on sn-devel-184
This occurs rarely but can adversely impact performance, so it is
worth logging it more frequently.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Otherwise it is uninitialised, so...
==22889== Conditional jump or move depends on uninitialised value(s)
==22889== at 0x12257B: ctdb_req_control_data_len (protocol_control.c:39)
==22889== by 0x1228E9: ctdb_req_control_len (protocol_control.c:1786)
==22889== by 0x12A51C: ctdb_client_control_send (client_control.c:101)
==22889== by 0x138BE1: ctdb_tunnel_setup_send (client_tunnel.c:100)
==22889== by 0x10EE4F: tunnel_test_send (tunnel_test.c:135)
==22889== by 0x10EE4F: main (tunnel_test.c:463)
and similar.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This currently skips the last record.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14147
RN: Avoid potential data loss during recovery after vacuuming error
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
For the auth_log tests using rpcclient this means one message less
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 Oct 3 17:59:13 UTC 2019 on sn-devel-184
Pure SAMR allows us to figure out the domain sid, we don't need LSA
for this.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
I can't even properly find why this went in. It's the only user of the
global rpcclient_cli_state, which can go if we remove this.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
[MS-FSA] 2.1.5.1 Server Requests an Open of a File
Windows pathname specific processing.
Always disallow trailing /, and also \\ on FILE_NON_DIRECTORY_FILE.
We need to check this before the generic pathname parser
as the generic pathname parser removes any trailing '/' and '\\'.
Currently this is SMB2 only, but we could also add this
check to the SMB1 NTCreateX calls if ultimately neded.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Oct 2 09:31:40 UTC 2019 on sn-devel-184
[MS-FSA] 2.1.5.1 Server Requests an Open of a File.
Checks how to behave on both files and directories.
Tested against Windows 10 server - passes. Currently smbd fails this.
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This fixes the following flaky test:
UNEXPECTED(failure): samba3.raw.oplock.batch26(nt4_dc)
REASON: Exception: Exception: (../../source4/torture/raw/oplock.c:3718): wrong value for break_info.count got 0x2 - should be 0x1
You can reproduce it with two small msleeps, which means it's a race
condition:
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 20b5a3e294c..126c7fc021d 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1917,6 +1917,14 @@ NTSTATUS send_break_message(struct messaging_context *msg_ctx,
DATA_BLOB blob;
NTSTATUS status;
+ {
+ static bool sent = false;
+ if (sent) {
+ smb_msleep(500);
+ }
+ sent = true;
+ }
+
if (DEBUGLVL(10)) {
struct server_id_buf buf;
DBG_DEBUG("Sending break message to %s\n",
diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c
index b3da84b1269..d9c4dbb9487 100644
--- a/source3/smbd/oplock.c
+++ b/source3/smbd/oplock.c
@@ -858,6 +858,8 @@ static void process_oplock_break_message(struct messaging_context *msg_ctx,
uint16_t break_to;
bool break_needed = true;
+ smb_msleep(100);
+
msg = talloc(talloc_tos(), struct oplock_break_message);
if (msg == NULL) {
DBG_WARNING("talloc failed\n");
15a8af075a introduced a bug where we immediately wake up ourselves
after doing a watch_send, leading to two inter-smbd oplock break
messages for this case. In theory, this should not matter, as in the
oplock break handler in the destination smbd we check
(fsp->sent_oplock_break != NO_BREAK_SENT)
so that the break does not get sent twice. However, with the above two
sleeps the oplock holding client could send out its oplock downgrade
while the second inter-smbd break messages was on its way.
The real fix would be to note in the share mode array that the
inter-smbd message has already been sent, but as other users of
dbwrap_watched_watch_send might also be affected by this bug, this fix
should be sufficient to get rid of this flaky test.
Unfortunately, dbwrap_watch.c is now pretty complex and needs some
serious refactoring to become understandable again. But that's
something for another day, sorry.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Before 15a8af075a we did not have a separately allocated watchers
array and dbwrap_watched_save() could play (too) smart tricks with
dbwrap_record_storev(). Now that we always have watchers talloc'ed, we
can remove those smart tricks from dbwrap_watched_save() in the next
commit.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
This simplifies (and corrects) things in the VFS as there the caller is only
interested in whether a name is pointing to a real named stream most of the times.
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Add a new utility functions that checks whether a struct smb_filename points to
a real named stream, excluding the default stream "::$DATA".
foo -> false
foo::$DATA -> false
foo:bar -> true
foo:bar:$DATA -> true
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14137
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>