summaryrefslogtreecommitdiff
path: root/source4/ntvfs/common
diff options
context:
space:
mode:
Diffstat (limited to 'source4/ntvfs/common')
-rw-r--r--source4/ntvfs/common/brlock_tdb.c6
1 files changed, 6 insertions, 0 deletions
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