summaryrefslogtreecommitdiff
path: root/source3/modules/onefs.h
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/onefs.h
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/onefs.h')
-rw-r--r--source3/modules/onefs.h68
1 files changed, 61 insertions, 7 deletions
diff --git a/source3/modules/onefs.h b/source3/modules/onefs.h
index 965f39509a..8d0f45abdb 100644
--- a/source3/modules/onefs.h
+++ b/source3/modules/onefs.h
@@ -21,6 +21,10 @@
#ifndef _ONEFS_H
#define _ONEFS_H
+#include "includes.h"
+
+#include <sys/isi_acl.h>
+
/* OneFS Module smb.conf parameters and defaults */
/**
@@ -34,13 +38,6 @@ enum onefs_acl_wire_format
ACL_FORMAT_ALWAYS /**< Always canonicalize */
};
-const struct enum_list enum_onefs_acl_wire_format[] = {
- {ACL_FORMAT_RAW, "No Format"},
- {ACL_FORMAT_WINDOWS_SD, "Format Windows SD"},
- {ACL_FORMAT_ALWAYS, "Always Format SD"},
- {-1, NULL}
-};
-
#define PARM_ONEFS_TYPE "onefs"
#define PARM_ACL_WIRE_FORMAT "acl wire format"
#define PARM_ACL_WIRE_FORMAT_DEFAULT ACL_FORMAT_WINDOWS_SD
@@ -49,4 +46,61 @@ const struct enum_list enum_onefs_acl_wire_format[] = {
#define PARM_CREATOR_OWNER_GETS_FULL_CONTROL "creator owner gets full control"
#define PARM_CREATOR_OWNER_GETS_FULL_CONTROL_DEFAULT true
+/*
+ * vfs interface handlers
+ */
+NTSTATUS onefs_create_file(vfs_handle_struct *handle,
+ struct smb_request *req,
+ uint16_t root_dir_fid,
+ const char *fname,
+ uint32_t create_file_flags,
+ uint32_t access_mask,
+ uint32_t share_access,
+ uint32_t create_disposition,
+ uint32_t create_options,
+ uint32_t file_attributes,
+ uint32_t oplock_request,
+ uint64_t allocation_size,
+ struct security_descriptor *sd,
+ struct ea_list *ea_list,
+ files_struct **result,
+ int *pinfo,
+ SMB_STRUCT_STAT *psbuf);
+
+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);
+
+NTSTATUS onefs_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
+ uint32 security_info_sent, SEC_DESC *psd);
+
+
+/*
+ * Utility functions
+ */
+NTSTATUS onefs_setup_sd(uint32 security_info_sent, SEC_DESC *psd,
+ struct ifs_security_descriptor *sd);
+
+/*
+ * System Interfaces
+ */
+int onefs_sys_create_file(connection_struct *conn,
+ int base_fd,
+ const char *path,
+ uint32_t access_mask,
+ uint32_t open_access_mask,
+ uint32_t share_access,
+ uint32_t create_options,
+ int flags,
+ mode_t mode,
+ int oplock_request,
+ uint64_t id,
+ struct security_descriptor *sd,
+ uint32_t ntfs_flags,
+ int *granted_oplock);
+
+
+
#endif /* _ONEFS_H */