2 * Store Windows ACLs in data store - common functions.
4 * Copyright (C) Volker Lendecke, 2008
5 * Copyright (C) Jeremy Allison, 2009
6 * Copyright (C) Ralph Böhme, 2016
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
22 #ifndef __VFS_ACL_COMMON_H__
23 #define __VFS_ACL_COMMON_H__
25 #include "smbd/proto.h"
27 struct acl_common_config
{
28 bool ignore_system_acls
;
29 enum default_acl_style default_acl_style
;
32 bool init_acl_common_config(vfs_handle_struct
*handle
,
33 const char *module_name
);
35 int rmdir_acl_common(struct vfs_handle_struct
*handle
,
36 const struct smb_filename
*smb_fname
);
37 int unlink_acl_common(struct vfs_handle_struct
*handle
,
38 const struct smb_filename
*smb_fname
);
39 int chmod_acl_module_common(struct vfs_handle_struct
*handle
,
40 const struct smb_filename
*smb_fname
,
42 int fchmod_acl_module_common(struct vfs_handle_struct
*handle
,
43 struct files_struct
*fsp
, mode_t mode
);
44 int chmod_acl_acl_module_common(struct vfs_handle_struct
*handle
,
45 const struct smb_filename
*smb_fname
,
47 NTSTATUS
get_nt_acl_common(
48 NTSTATUS (*get_acl_blob_fn
)(TALLOC_CTX
*ctx
,
49 vfs_handle_struct
*handle
,
51 const struct smb_filename
*smb_fname
,
53 vfs_handle_struct
*handle
,
55 const struct smb_filename
*smb_fname_in
,
56 uint32_t security_info
,
58 struct security_descriptor
**ppdesc
);
60 NTSTATUS
fset_nt_acl_common(
61 NTSTATUS (*get_acl_blob_fn
)(TALLOC_CTX
*ctx
,
62 vfs_handle_struct
*handle
,
64 const struct smb_filename
*smb_fname
,
66 NTSTATUS (*store_acl_blob_fsp_fn
)(vfs_handle_struct
*handle
,
69 const char *module_name
,
70 vfs_handle_struct
*handle
, files_struct
*fsp
,
71 uint32_t security_info_sent
,
72 const struct security_descriptor
*orig_psd
);