diff options
author | Ralph Boehme <rb@sernet.de> | 2014-03-10 17:14:38 +0100 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2014-03-11 13:39:17 +0100 |
commit | 80e5ae1cefd86397200c4e322c93a89efcd6bad8 (patch) | |
tree | 828401f9db5b41e8fd4d7932310d8c7c7f9bd33b /source3/modules | |
parent | e7856ed58d993806dacc121d3af022d213f76af0 (diff) | |
download | samba-80e5ae1cefd86397200c4e322c93a89efcd6bad8.tar.gz samba-80e5ae1cefd86397200c4e322c93a89efcd6bad8.tar.xz samba-80e5ae1cefd86397200c4e322c93a89efcd6bad8.zip |
vfs_catia: add chmod()
Clients using UNIX extensions need chmod() to go through catia.
Signed-off-by: Ralph Boehme <rb@sernet.de>
Reviewed-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Mar 11 13:39:17 CET 2014 on sn-devel-104
Diffstat (limited to 'source3/modules')
-rw-r--r-- | source3/modules/vfs_catia.c | 20 |
1 files changed, 20 insertions, 0 deletions
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, |