summaryrefslogtreecommitdiff
path: root/source3/smbd/open.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/open.c')
-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 e6c749fab9..2f82f04b63 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -1599,6 +1599,20 @@ files_struct *open_file_ntcreate(connection_struct *conn,
* deny mode is compatible with all current opens.
*/
+ if (lp_gpfs_share(SNUM(fsp->conn)) &&
+ !set_gpfs_sharemode(fsp, access_mask, share_access)) {
+
+ /* GPFS does have share mode support, so the comment above wrt
+ * NFS being wrong is not correct here. */
+
+ set_saved_error_triple(ERRDOS, ERRbadshare,
+ NT_STATUS_SHARING_VIOLATION);
+ talloc_free(lck);
+ fd_close(conn, fsp);
+ file_free(fsp);
+ return NULL;
+ }
+
/*
* If requested, truncate the file.
*/