summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorRichard Sharpe <sharpe@samba.org>2004-05-14 20:58:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:51:36 -0500
commit80f72a63009eac05a91877893a802cf1a8a62d98 (patch)
tree4e14a37fb606cca8c39693289612815129fdb0ad /source3
parente476cc59030cf538eee140a92dee024dc5c79d82 (diff)
downloadsamba-80f72a63009eac05a91877893a802cf1a8a62d98.tar.gz
samba-80f72a63009eac05a91877893a802cf1a8a62d98.tar.bz2
samba-80f72a63009eac05a91877893a802cf1a8a62d98.zip
r740: Fix Bug #1301. Return NT_STATUS_SHARING_VIOLATION when share mode locking
requests fail. (This used to be commit 5082eb30d0d7c3a4c79b7578457682523a4e80a3)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/open.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 8ab5dab6ac..235a455f30 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -990,6 +990,13 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n",
if (fsp_open)
fd_close(conn, fsp);
file_free(fsp);
+ /*
+ * We have detected a sharing violation here
+ * so return the correct error code
+ */
+ unix_ERR_class = ERRDOS;
+ unix_ERR_code = ERRbadshare;
+ unix_ERR_ntstatus = NT_STATUS_SHARING_VIOLATION;
return NULL;
}
@@ -1057,6 +1064,13 @@ flags=0x%X flags2=0x%X mode=0%o returned %d\n",
unlock_share_entry_fsp(fsp);
fd_close(conn,fsp);
file_free(fsp);
+ /*
+ * We have detected a sharing violation here, so
+ * return the correct code.
+ */
+ unix_ERR_class = ERRDOS;
+ unix_ERR_code = ERRbadshare;
+ unix_ERR_ntstatus = NT_STATUS_SHARING_VIOLATION;
return NULL;
}