From 80e5ae1cefd86397200c4e322c93a89efcd6bad8 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 10 Mar 2014 17:14:38 +0100 Subject: vfs_catia: add chmod() Clients using UNIX extensions need chmod() to go through catia. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison Reviewed-by: Volker Lendecke Autobuild-User(master): Volker Lendecke Autobuild-Date(master): Tue Mar 11 13:39:17 CET 2014 on sn-devel-104 --- source3/modules/vfs_catia.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'source3/modules') diff --git a/source3/modules/vfs_catia.c b/source3/modules/vfs_catia.c index 1a37dd2363..6743dfe996 100644 --- a/source3/modules/vfs_catia.c +++ b/source3/modules/vfs_catia.c @@ -549,6 +549,25 @@ static int catia_lchown(vfs_handle_struct *handle, return ret; } +static int catia_chmod(vfs_handle_struct *handle, const char *path, mode_t mode) +{ + char *name = NULL; + NTSTATUS status; + int ret; + + status = catia_string_replace_allocate(handle->conn, path, + &name, vfs_translate_to_unix); + if (!NT_STATUS_IS_OK(status)) { + errno = map_errno_from_nt_status(status); + return -1; + } + + ret = SMB_VFS_NEXT_CHMOD(handle, name, mode); + TALLOC_FREE(name); + + return ret; +} + static int catia_rmdir(vfs_handle_struct *handle, const char *path) { @@ -917,6 +936,7 @@ static struct vfs_fn_pointers vfs_catia_fns = { .unlink_fn = catia_unlink, .chown_fn = catia_chown, .lchown_fn = catia_lchown, + .chmod_fn = catia_chmod, .chdir_fn = catia_chdir, .ntimes_fn = catia_ntimes, .realpath_fn = catia_realpath, -- cgit