diff options
author | Jeremy Allison <jra@samba.org> | 2019-09-05 11:08:05 -0700 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2019-09-11 18:24:29 +0000 |
commit | 63132f8b0418c6d0ed7b664d865724d657b8606a (patch) | |
tree | 1f127fb919dace416a8278c1135addfa023c0f51 /source3/modules/vfs_unityed_media.c | |
parent | b691df9c2f8a8158c0892c7461cf7ccdbe9ed1b1 (diff) | |
download | samba-63132f8b0418c6d0ed7b664d865724d657b8606a.tar.gz |
s3: VFS: vfs_unityed_media. Implement mkdirat().
Currently identical to mkdir().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/modules/vfs_unityed_media.c')
-rw-r--r-- | source3/modules/vfs_unityed_media.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source3/modules/vfs_unityed_media.c b/source3/modules/vfs_unityed_media.c index 914b6c3a48d..a05f2ac9a5e 100644 --- a/source3/modules/vfs_unityed_media.c +++ b/source3/modules/vfs_unityed_media.c @@ -815,6 +815,42 @@ err: return status; } +static int um_mkdirat(vfs_handle_struct *handle, + struct files_struct *dirfsp, + const struct smb_filename *smb_fname, + mode_t mode) +{ + int status; + const char *path = smb_fname->base_name; + struct smb_filename *client_fname = NULL; + + DEBUG(10, ("Entering with path '%s'\n", path)); + + if (!is_in_media_files(path) || !is_in_media_dir(path)) { + return SMB_VFS_NEXT_MKDIRAT(handle, + dirfsp, + smb_fname, + mode); + } + + status = alloc_get_client_smb_fname(handle, + talloc_tos(), + smb_fname, + &client_fname); + if (status != 0) { + goto err; + } + + status = SMB_VFS_NEXT_MKDIRAT(handle, + dirfsp, + client_fname, + mode); +err: + TALLOC_FREE(client_fname); + DEBUG(10, ("Leaving with path '%s'\n", path)); + return status; +} + static int um_rmdir(vfs_handle_struct *handle, const struct smb_filename *smb_fname) { @@ -1917,6 +1953,7 @@ static struct vfs_fn_pointers vfs_um_fns = { .telldir_fn = um_telldir, .rewind_dir_fn = um_rewinddir, .mkdir_fn = um_mkdir, + .mkdirat_fn = um_mkdirat, .rmdir_fn = um_rmdir, .closedir_fn = um_closedir, |