2 * Unix SMB/CIFS implementation.
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/>.
26 #include <sys/isi_acl.h>
28 /* OneFS Module smb.conf parameters and defaults */
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,
56 uint32_t create_file_flags,
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,
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);
83 NTSTATUS onefs_samba_sd_to_sd(uint32 security_info_sent, SEC_DESC *psd,
84 struct ifs_security_descriptor *sd);
89 int onefs_sys_create_file(connection_struct *conn,
93 uint32_t open_access_mask,
94 uint32_t share_access,
95 uint32_t create_options,
100 struct security_descriptor *sd,
102 int *granted_oplock);
106 #endif /* _ONEFS_H */