summaryrefslogtreecommitdiff
path: root/source3/modules/vfs_onefs.c
diff options
context:
space:
mode:
authorTim Prouty <tprouty@samba.org>2008-12-08 16:57:58 -0800
committerTim Prouty <tprouty@samba.org>2008-12-09 14:51:48 -0800
commite0711ffa526e22e3ffe483319ce5d7725d578647 (patch)
tree7e5bac5563758ff614b8c45c33ee0f1e8467fbca /source3/modules/vfs_onefs.c
parent51e7f79b3b4ae0fa830ac176df5ba8229e14f32d (diff)
downloadsamba-e0711ffa526e22e3ffe483319ce5d7725d578647.tar.gz
samba-e0711ffa526e22e3ffe483319ce5d7725d578647.tar.bz2
samba-e0711ffa526e22e3ffe483319ce5d7725d578647.zip
s3: Add the OneFS SMB_VFS_CREATE_FILE implementation
This is the first pass at extending the onefs vfs module to support the CIFS-specific enhancements available on OneFS. Most of this patch is massaging the sama open path to work with ifs_createfile. ifs_createfile is a CIFS-specific syscall for opening/files and directories. It adds support for: - Full in-kernel access checks using a windows access_mask - Cluster-coherent share mode locks - Cluster-coherent oplocks - Streams - Setting security descriptors at create time - Setting dos_attributes at create time This patch does not implement the samba side of the streams support or oplocks support. Tests that expect oplocks to be granted or streams to be supported will fail. This will be remedied in upcoming patches.
Diffstat (limited to 'source3/modules/vfs_onefs.c')
-rw-r--r--source3/modules/vfs_onefs.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/source3/modules/vfs_onefs.c b/source3/modules/vfs_onefs.c
index 193a986cf6..b51858fbae 100644
--- a/source3/modules/vfs_onefs.c
+++ b/source3/modules/vfs_onefs.c
@@ -1,4 +1,5 @@
/*
+ * Unix SMB/CIFS implementation.
* Support for OneFS
*
* Copyright (C) Tim Prouty, 2008
@@ -18,20 +19,32 @@
*/
#include "includes.h"
+#include "onefs.h"
#undef DBGC_CLASS
#define DBGC_CLASS DBGC_VFS
-NTSTATUS onefs_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
- uint32 security_info, SEC_DESC **ppdesc);
-
-NTSTATUS onefs_get_nt_acl(vfs_handle_struct *handle, const char* name,
- uint32 security_info, SEC_DESC **ppdesc);
+static int onefs_mkdir(vfs_handle_struct *handle, const char *path,
+ mode_t mode)
+{
+ DEBUG(0, ("SMB_VFS_MKDIR should never be called in vfs_onefs"));
+ return SMB_VFS_NEXT_MKDIR(handle, path, mode);
+}
-NTSTATUS onefs_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
- uint32 security_info_sent, SEC_DESC *psd);
+static int onefs_open(vfs_handle_struct *handle, const char *fname,
+ files_struct *fsp, int flags, mode_t mode)
+{
+ DEBUG(0, ("SMB_VFS_OPEN should never be called in vfs_onefs"));
+ return SMB_VFS_NEXT_OPEN(handle, fname, fsp, flags, mode);
+}
static vfs_op_tuple onefs_ops[] = {
+ {SMB_VFS_OP(onefs_mkdir), SMB_VFS_OP_MKDIR,
+ SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(onefs_open), SMB_VFS_OP_OPEN,
+ SMB_VFS_LAYER_OPAQUE},
+ {SMB_VFS_OP(onefs_create_file), SMB_VFS_OP_CREATE_FILE,
+ SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(onefs_fget_nt_acl), SMB_VFS_OP_FGET_NT_ACL,
SMB_VFS_LAYER_OPAQUE},
{SMB_VFS_OP(onefs_get_nt_acl), SMB_VFS_OP_GET_NT_ACL,