smb_fname->base_name,
false);
}
+
+static int chmod_acl_module_common(struct vfs_handle_struct *handle,
+ const char *path, mode_t mode)
+{
+ if (lp_posix_pathnames()) {
+ /* Only allow this on POSIX pathnames. */
+ return SMB_VFS_NEXT_CHMOD(handle, path, mode);
+ }
+ return 0;
+}
+
+static int fchmod_acl_module_common(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, mode_t mode)
+{
+ if (fsp->posix_open) {
+ /* Only allow this on POSIX opens. */
+ return SMB_VFS_NEXT_FCHMOD(handle, fsp, mode);
+ }
+ return 0;
+}
+
+static int chmod_acl_acl_module_common(struct vfs_handle_struct *handle,
+ const char *name, mode_t mode)
+{
+ if (lp_posix_pathnames()) {
+ /* Only allow this on POSIX pathnames. */
+ return SMB_VFS_NEXT_CHMOD_ACL(handle, name, mode);
+ }
+ return 0;
+}
+
+static int fchmod_acl_acl_module_common(struct vfs_handle_struct *handle,
+ struct files_struct *fsp, mode_t mode)
+{
+ if (fsp->posix_open) {
+ /* Only allow this on POSIX opens. */
+ return SMB_VFS_NEXT_FCHMOD_ACL(handle, fsp, mode);
+ }
+ return 0;
+}
.disconnect = disconnect_acl_tdb,
.opendir = opendir_acl_common,
.mkdir = mkdir_acl_common,
+ .rmdir = rmdir_acl_tdb,
.open = open_acl_common,
.create_file = create_file_acl_common,
.unlink = unlink_acl_tdb,
- .rmdir = rmdir_acl_tdb,
+ .chmod = chmod_acl_module_common,
+ .fchmod = fchmod_acl_module_common,
.fget_nt_acl = fget_nt_acl_common,
.get_nt_acl = get_nt_acl_common,
.fset_nt_acl = fset_nt_acl_common,
+ .chmod_acl = chmod_acl_acl_module_common,
+ .fchmod_acl = fchmod_acl_acl_module_common,
.sys_acl_set_file = sys_acl_set_file_tdb,
.sys_acl_set_fd = sys_acl_set_fd_tdb
};
.open = open_acl_common,
.create_file = create_file_acl_common,
.unlink = unlink_acl_common,
+ .chmod = chmod_acl_module_common,
+ .fchmod = fchmod_acl_module_common,
.fget_nt_acl = fget_nt_acl_common,
.get_nt_acl = get_nt_acl_common,
.fset_nt_acl = fset_nt_acl_common,
+ .chmod_acl = chmod_acl_acl_module_common,
+ .fchmod_acl = fchmod_acl_acl_module_common,
.sys_acl_set_file = sys_acl_set_file_xattr,
.sys_acl_set_fd = sys_acl_set_fd_xattr
};