diff options
author | Volker Lendecke <vlendec@samba.org> | 2006-01-05 11:35:29 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:06:01 -0500 |
commit | a189257c15725e36e68970ed723f3365d4496792 (patch) | |
tree | 9b02968535257705af636aa43830fba00b68b82f /source3/smbd/open.c | |
parent | c3a2101da021abf52d06842598325a6cef6bbc83 (diff) | |
download | samba-a189257c15725e36e68970ed723f3365d4496792.tar.gz samba-a189257c15725e36e68970ed723f3365d4496792.tar.xz samba-a189257c15725e36e68970ed723f3365d4496792.zip |
r12721: GPFS 2.4 on Linux will contain some windows semantics, ie share modes and
oplocks across the cluster. Adapt Samba to it.
The gpfs API is called via libgpfs.so. This code is written with dlopen(), so
that you can compile on a system with gpfs installed and later on run on
systems without gpfs available.
So to actually make Samba call gpfs share mode calls you need to compile with
gpfs.h and libgpfs.so around and set 'gpfs share = yes' on the shares you
export from GPFS.
Volker
(This used to be commit 2253b17a1a88555291b59d52c826c81c2b8f7e7f)
Diffstat (limited to 'source3/smbd/open.c')
-rw-r--r-- | source3/smbd/open.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c index e6c749fab9c..2f82f04b639 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. */ |