summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-05-14 17:51:19 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:52:25 -0500
commit0543c06d2598ccd476bcb78e7701e50e6a85e51f (patch)
tree14e9fdf62fab2bd0c8580b38b977554f17a64088
parent5151068d5a98a143dd77bddeb3af2a4775cb959d (diff)
downloadsamba-0543c06d2598ccd476bcb78e7701e50e6a85e51f.tar.gz
samba-0543c06d2598ccd476bcb78e7701e50e6a85e51f.tar.bz2
samba-0543c06d2598ccd476bcb78e7701e50e6a85e51f.zip
r22863: in SMB2 mode we always need to return NT_STATUS_LOCK_NOT_GRANTED
metze (This used to be commit 83a61a2892539b2bcfbdaac7ca169c99f2b4503a)
-rw-r--r--source4/cluster/ctdb/brlock_ctdb.c6
-rw-r--r--source4/ntvfs/common/brlock_tdb.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/source4/cluster/ctdb/brlock_ctdb.c b/source4/cluster/ctdb/brlock_ctdb.c
index 2773827b59..66342a8ac4 100644
--- a/source4/cluster/ctdb/brlock_ctdb.c
+++ b/source4/cluster/ctdb/brlock_ctdb.c
@@ -28,6 +28,7 @@
#include "lib/messaging/irpc.h"
#include "libcli/libcli.h"
#include "cluster/cluster.h"
+#include "ntvfs/ntvfs.h"
#include "ntvfs/common/brlock.h"
#include "include/ctdb.h"
@@ -242,6 +243,11 @@ static NTSTATUS brl_ctdb_lock_failed(struct brl_handle *brlh, struct lock_struct
* this function is only called for non pending lock!
*/
+ /* in SMB2 mode always return NT_STATUS_LOCK_NOT_GRANTED! */
+ if (lock->ntvfs->ctx->protocol == PROTOCOL_SMB2) {
+ return NT_STATUS_LOCK_NOT_GRANTED;
+ }
+
/*
* if the notify_ptr is non NULL,
* it means that we're at the end of a pending lock
diff --git a/source4/ntvfs/common/brlock_tdb.c b/source4/ntvfs/common/brlock_tdb.c
index 6fe8cefd34..d5eb7d82fb 100644
--- a/source4/ntvfs/common/brlock_tdb.c
+++ b/source4/ntvfs/common/brlock_tdb.c
@@ -34,6 +34,7 @@
#include "libcli/libcli.h"
#include "cluster/cluster.h"
#include "ntvfs/common/brlock.h"
+#include "ntvfs/ntvfs.h"
/*
in this module a "DATA_BLOB *file_key" is a blob that uniquely identifies
@@ -220,6 +221,11 @@ static NTSTATUS brl_tdb_lock_failed(struct brl_handle *brlh, struct lock_struct
* this function is only called for non pending lock!
*/
+ /* in SMB2 mode always return NT_STATUS_LOCK_NOT_GRANTED! */
+ if (lock->ntvfs->ctx->protocol == PROTOCOL_SMB2) {
+ return NT_STATUS_LOCK_NOT_GRANTED;
+ }
+
/*
* if the notify_ptr is non NULL,
* it means that we're at the end of a pending lock