Use vfs_cifs as a basis for vfs_proxy
[Samba/vfs_proxy.git] / source3 / modules / onefs.h
blob8d0f45abdb28a6d5ead9cacfbbe3f2c0a6b14bfb
1 /*
2 * Unix SMB/CIFS implementation.
3 * Support for OneFS
5 * Copyright (C) Steven Danneman, 2008
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 3 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef _ONEFS_H
22 #define _ONEFS_H
24 #include "includes.h"
26 #include <sys/isi_acl.h>
28 /* OneFS Module smb.conf parameters and defaults */
30 /**
31 * Specifies when ACLs presented to Windows should be canonicalized
32 * into the ordering which Explorer expects.
34 enum onefs_acl_wire_format
36 ACL_FORMAT_RAW, /**< Never canonicalize */
37 ACL_FORMAT_WINDOWS_SD, /**< Only canonicalize synthetic ACLs */
38 ACL_FORMAT_ALWAYS /**< Always canonicalize */
41 #define PARM_ONEFS_TYPE "onefs"
42 #define PARM_ACL_WIRE_FORMAT "acl wire format"
43 #define PARM_ACL_WIRE_FORMAT_DEFAULT ACL_FORMAT_WINDOWS_SD
44 #define PARM_SIMPLE_FILE_SHARING_COMPATIBILITY_MODE "simple file sharing compatibility mode"
45 #define PARM_SIMPLE_FILE_SHARING_COMPATIBILITY_MODE_DEFAULT false
46 #define PARM_CREATOR_OWNER_GETS_FULL_CONTROL "creator owner gets full control"
47 #define PARM_CREATOR_OWNER_GETS_FULL_CONTROL_DEFAULT true
50 * vfs interface handlers
52 NTSTATUS onefs_create_file(vfs_handle_struct *handle,
53 struct smb_request *req,
54 uint16_t root_dir_fid,
55 const char *fname,
56 uint32_t create_file_flags,
57 uint32_t access_mask,
58 uint32_t share_access,
59 uint32_t create_disposition,
60 uint32_t create_options,
61 uint32_t file_attributes,
62 uint32_t oplock_request,
63 uint64_t allocation_size,
64 struct security_descriptor *sd,
65 struct ea_list *ea_list,
66 files_struct **result,
67 int *pinfo,
68 SMB_STRUCT_STAT *psbuf);
70 NTSTATUS onefs_fget_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
71 uint32 security_info, SEC_DESC **ppdesc);
73 NTSTATUS onefs_get_nt_acl(vfs_handle_struct *handle, const char* name,
74 uint32 security_info, SEC_DESC **ppdesc);
76 NTSTATUS onefs_fset_nt_acl(vfs_handle_struct *handle, files_struct *fsp,
77 uint32 security_info_sent, SEC_DESC *psd);
81 * Utility functions
83 NTSTATUS onefs_setup_sd(uint32 security_info_sent, SEC_DESC *psd,
84 struct ifs_security_descriptor *sd);
87 * System Interfaces
89 int onefs_sys_create_file(connection_struct *conn,
90 int base_fd,
91 const char *path,
92 uint32_t access_mask,
93 uint32_t open_access_mask,
94 uint32_t share_access,
95 uint32_t create_options,
96 int flags,
97 mode_t mode,
98 int oplock_request,
99 uint64_t id,
100 struct security_descriptor *sd,
101 uint32_t ntfs_flags,
102 int *granted_oplock);
106 #endif /* _ONEFS_H */