mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
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>
This commit is contained in:
parent
b691df9c2f
commit
63132f8b04
@ -815,6 +815,42 @@ err:
|
|||||||
return status;
|
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,
|
static int um_rmdir(vfs_handle_struct *handle,
|
||||||
const struct smb_filename *smb_fname)
|
const struct smb_filename *smb_fname)
|
||||||
{
|
{
|
||||||
@ -1917,6 +1953,7 @@ static struct vfs_fn_pointers vfs_um_fns = {
|
|||||||
.telldir_fn = um_telldir,
|
.telldir_fn = um_telldir,
|
||||||
.rewind_dir_fn = um_rewinddir,
|
.rewind_dir_fn = um_rewinddir,
|
||||||
.mkdir_fn = um_mkdir,
|
.mkdir_fn = um_mkdir,
|
||||||
|
.mkdirat_fn = um_mkdirat,
|
||||||
.rmdir_fn = um_rmdir,
|
.rmdir_fn = um_rmdir,
|
||||||
.closedir_fn = um_closedir,
|
.closedir_fn = um_closedir,
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user