summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/libcli/raw/smb_signing.c2
-rw-r--r--source4/torture/torture.c13
2 files changed, 14 insertions, 1 deletions
diff --git a/source4/libcli/raw/smb_signing.c b/source4/libcli/raw/smb_signing.c
index c82946ac53..a39f33c290 100644
--- a/source4/libcli/raw/smb_signing.c
+++ b/source4/libcli/raw/smb_signing.c
@@ -188,7 +188,7 @@ static BOOL cli_request_simple_check_incoming_message(struct cli_request *req)
}
if (good && i != 1) {
- DEBUG(0,("SIGNING OFFSET %d\n", i));
+ DEBUG(0,("SIGNING OFFSET %d (should be %d)\n", i, req->seq_num+1));
}
if (!good) {
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index 4da9592479..4d8fbd0a69 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -1777,13 +1777,26 @@ static BOOL run_deferopen(struct cli_state *cli, int dummy)
while (i < 4) {
int fnum = -1;
+
do {
+ struct timeval tv_start, tv_end;
+ GetTimeOfDay(&tv_start);
fnum = cli_nt_create_full(cli->tree, fname, 0, GENERIC_RIGHTS_FILE_ALL_ACCESS,
FILE_ATTRIBUTE_NORMAL, NTCREATEX_SHARE_ACCESS_NONE,
NTCREATEX_DISP_OPEN_IF, 0, 0);
if (fnum != -1) {
break;
}
+ GetTimeOfDay(&tv_end);
+ if (NT_STATUS_EQUAL(cli_nt_error(cli->tree),NT_STATUS_SHARING_VIOLATION)) {
+ /* Sharing violation errors need to be 1 second apart. */
+ long long tdif = usec_time_diff(&tv_end, &tv_start);
+ if (tdif < 500000 || tdif > 1500000) {
+ fprintf(stderr,"Timing incorrect %lld.%lld for share violation\n",
+ tdif / (long long)1000000,
+ tdif % (long long)1000000);
+ }
+ }
} while (NT_STATUS_EQUAL(cli_nt_error(cli->tree),NT_STATUS_SHARING_VIOLATION));
if (fnum == -1) {