return -1;
}
-static int skel_chmod(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode)
-{
- errno = ENOSYS;
- return -1;
-}
-
static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp,
mode_t mode)
{
.lstat_fn = skel_lstat,
.get_alloc_size_fn = skel_get_alloc_size,
.unlinkat_fn = skel_unlinkat,
- .chmod_fn = skel_chmod,
.fchmod_fn = skel_fchmod,
.fchown_fn = skel_fchown,
.lchown_fn = skel_lchown,
flags);
}
-static int skel_chmod(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode)
-{
- return SMB_VFS_NEXT_CHMOD(handle, smb_fname, mode);
-}
-
static int skel_fchmod(vfs_handle_struct *handle, files_struct *fsp,
mode_t mode)
{
.lstat_fn = skel_lstat,
.get_alloc_size_fn = skel_get_alloc_size,
.unlinkat_fn = skel_unlinkat,
- .chmod_fn = skel_chmod,
.fchmod_fn = skel_fchmod,
.fchown_fn = skel_fchown,
.lchown_fn = skel_lchown,
* Version 45 - Remove SMB_VFS_SETXATTR
* Version 45 - Remove SMB_VFS_REMOVEXATTR
* Version 45 - Remove SMB_VFS_GET_DOS_ATTRIBUTES()
+ * Version 45 - Remove SMB_VFS_CHMOD
*/
#define SMB_VFS_INTERFACE_VERSION 45
struct files_struct *srcdir_fsp,
const struct smb_filename *smb_fname,
int flags);
- int (*chmod_fn)(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode);
int (*fchmod_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, mode_t mode);
int (*fchown_fn)(struct vfs_handle_struct *handle, struct files_struct *fsp, uid_t uid, gid_t gid);
int (*lchown_fn)(struct vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
int flags);
-int smb_vfs_call_chmod(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode);
int smb_vfs_call_fchmod(struct vfs_handle_struct *handle,
struct files_struct *fsp, mode_t mode);
int smb_vfs_call_fchown(struct vfs_handle_struct *handle,
struct files_struct *dirfsp,
const struct smb_filename *smb_fname,
int flags);
-int vfs_not_implemented_chmod(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode);
int vfs_not_implemented_fchmod(vfs_handle_struct *handle, files_struct *fsp,
mode_t mode);
int vfs_not_implemented_fchown(vfs_handle_struct *handle, files_struct *fsp,
#define SMB_VFS_NEXT_UNLINKAT(handle, dirfsp, path, flags) \
smb_vfs_call_unlinkat((handle)->next, (dirfsp), (path), (flags))
-#define SMB_VFS_CHMOD(conn, smb_fname, mode) \
- smb_vfs_call_chmod((conn)->vfs_handles, (smb_fname), (mode))
-#define SMB_VFS_NEXT_CHMOD(handle, smb_fname, mode) \
- smb_vfs_call_chmod((handle)->next, (smb_fname), (mode))
-
#define SMB_VFS_FCHMOD(fsp, mode) \
smb_vfs_call_fchmod((fsp)->conn->vfs_handles, (fsp), (mode))
#define SMB_VFS_NEXT_FCHMOD(handle, fsp, mode) \
return result;
}
-static int vfswrap_chmod(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode)
-{
- int result;
-
- START_PROFILE(syscall_chmod);
- result = chmod(smb_fname->base_name, mode);
- END_PROFILE(syscall_chmod);
- return result;
-}
-
static int vfswrap_fchmod(vfs_handle_struct *handle, files_struct *fsp, mode_t mode)
{
int result;
.lstat_fn = vfswrap_lstat,
.get_alloc_size_fn = vfswrap_get_alloc_size,
.unlinkat_fn = vfswrap_unlinkat,
- .chmod_fn = vfswrap_chmod,
.fchmod_fn = vfswrap_fchmod,
.fchown_fn = vfswrap_fchown,
.lchown_fn = vfswrap_lchown,
return -1;
}
-int vfs_not_implemented_chmod(vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode)
-{
- errno = ENOSYS;
- return -1;
-}
-
int vfs_not_implemented_fchmod(vfs_handle_struct *handle, files_struct *fsp,
mode_t mode)
{
.lstat_fn = vfs_not_implemented_lstat,
.get_alloc_size_fn = vfs_not_implemented_get_alloc_size,
.unlinkat_fn = vfs_not_implemented_unlinkat,
- .chmod_fn = vfs_not_implemented_chmod,
.fchmod_fn = vfs_not_implemented_fchmod,
.fchown_fn = vfs_not_implemented_fchown,
.lchown_fn = vfs_not_implemented_lchown,
flags);
}
-int smb_vfs_call_chmod(struct vfs_handle_struct *handle,
- const struct smb_filename *smb_fname,
- mode_t mode)
-{
- VFS_FIND(chmod);
- return handle->fns->chmod_fn(handle, smb_fname, mode);
-}
-
int smb_vfs_call_fchmod(struct vfs_handle_struct *handle,
struct files_struct *fsp, mode_t mode)
{