summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/lib/g_lock.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/lib/g_lock.c b/source3/lib/g_lock.c
index 40687f47526..3c27a63d8d5 100644
--- a/source3/lib/g_lock.c
+++ b/source3/lib/g_lock.c
@@ -1292,6 +1292,10 @@ NTSTATUS g_lock_lock(struct g_lock_ctx *ctx, TDB_DATA key,
return state.status;
}
+ if (timeval_is_zero(&timeout)) {
+ return NT_STATUS_LOCK_NOT_GRANTED;
+ }
+
/*
* Fall back to the full g_lock_trylock logic,
* g_lock_lock_simple_fn() called above only covers