summaryrefslogtreecommitdiffstats
path: root/source3/utils/torture.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-05-04 21:57:28 +0000
committerJeremy Allison <jra@samba.org>2000-05-04 21:57:28 +0000
commit045469493c2870cb1d63c964b18afc5e2210dcd5 (patch)
tree5faf23220fe5a8cfc136689e49951ddbbf2690ff /source3/utils/torture.c
parentfffeaf527d82b3535938cb89da7f4aa5ab8edc48 (diff)
downloadsamba-045469493c2870cb1d63c964b18afc5e2210dcd5.tar.gz
samba-045469493c2870cb1d63c964b18afc5e2210dcd5.tar.xz
samba-045469493c2870cb1d63c964b18afc5e2210dcd5.zip
rpc_server/srv_lsa.c: Bring into sync with 2.0.x.
rpc_server/srv_pipe_hnd.c: Bring into sync with 2.0.x. smbd/blocking.c: Improve blocking debug reporting. utils/torture.c: Added check for NT locking bug. Jeremy. (This used to be commit e8ff6d3fb5537c39611a5784bf7216ae812acd27)
Diffstat (limited to 'source3/utils/torture.c')
-rw-r--r--source3/utils/torture.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/source3/utils/torture.c b/source3/utils/torture.c
index 40920f79c30..e74106609d2 100644
--- a/source3/utils/torture.c
+++ b/source3/utils/torture.c
@@ -998,8 +998,20 @@ static void run_locktest5(int dummy)
goto fail;
}
+ /* Check for NT bug... */
+ ret = cli_lock(&cli1, fnum1, 0, 8, 0, READ_LOCK) &&
+ cli_lock(&cli1, fnum3, 0, 1, 0, READ_LOCK);
+ cli_close(&cli1, fnum1);
+ fnum1 = cli_open(&cli1, fname, O_RDWR, DENY_NONE);
+ ret = cli_lock(&cli1, fnum1, 7, 1, 0, WRITE_LOCK);
+ EXPECTED(ret, True);
+ printf("this server %s the NT locking bug\n", ret ? "doesn't have" : "has");
+ cli_close(&cli1, fnum1);
+ fnum1 = cli_open(&cli1, fname, O_RDWR, DENY_NONE);
+ cli_unlock(&cli1, fnum3, 0, 1);
+
ret = cli_lock(&cli1, fnum1, 0, 4, 0, WRITE_LOCK) &&
- cli_lock(&cli1, fnum1, 0, 4, 0, READ_LOCK);
+ cli_lock(&cli1, fnum1, 1, 1, 0, READ_LOCK);
EXPECTED(ret, True);
printf("the same process %s overlay a write with a read lock\n", ret?"can":"cannot");
@@ -1040,7 +1052,7 @@ static void run_locktest5(int dummy)
/* We should have 3 stacked locks here. Ensure we need to do 3 unlocks. */
- ret = cli_unlock(&cli1, fnum1, 0, 4) &&
+ ret = cli_unlock(&cli1, fnum1, 1, 1) &&
cli_unlock(&cli1, fnum1, 0, 4) &&
cli_unlock(&cli1, fnum1, 0, 4);