mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3: VFS: unityed_media. Add um_get_nt_acl_at().
Not yet used. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
0ae43c3655
commit
91f06daf33
@ -1534,6 +1534,63 @@ err:
|
||||
return status;
|
||||
}
|
||||
|
||||
static NTSTATUS um_get_nt_acl_at(vfs_handle_struct *handle,
|
||||
struct files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
uint32_t security_info,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct security_descriptor **ppdesc)
|
||||
{
|
||||
NTSTATUS status;
|
||||
char *client_path = NULL;
|
||||
struct smb_filename *client_smb_fname = NULL;
|
||||
bool ok;
|
||||
int ret;
|
||||
|
||||
DBG_DEBUG("Entering um_get_nt_acl_at\n");
|
||||
|
||||
ok = is_in_media_files(smb_fname->base_name);
|
||||
if (!ok) {
|
||||
return SMB_VFS_NEXT_GET_NT_ACL_AT(handle,
|
||||
dirfsp,
|
||||
smb_fname,
|
||||
security_info,
|
||||
mem_ctx,
|
||||
ppdesc);
|
||||
}
|
||||
|
||||
ret = alloc_get_client_path(handle,
|
||||
talloc_tos(),
|
||||
smb_fname->base_name,
|
||||
&client_path);
|
||||
if (ret != 0) {
|
||||
status = map_nt_error_from_unix(errno);
|
||||
goto err;
|
||||
}
|
||||
|
||||
client_smb_fname = synthetic_smb_fname(talloc_tos(),
|
||||
client_path,
|
||||
NULL,
|
||||
NULL,
|
||||
smb_fname->twrp,
|
||||
smb_fname->flags);
|
||||
if (client_smb_fname == NULL) {
|
||||
TALLOC_FREE(client_path);
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
status = SMB_VFS_NEXT_GET_NT_ACL_AT(handle,
|
||||
dirfsp,
|
||||
client_smb_fname,
|
||||
security_info,
|
||||
mem_ctx,
|
||||
ppdesc);
|
||||
err:
|
||||
TALLOC_FREE(client_smb_fname);
|
||||
TALLOC_FREE(client_path);
|
||||
return status;
|
||||
}
|
||||
|
||||
static SMB_ACL_T um_sys_acl_get_file(vfs_handle_struct *handle,
|
||||
const struct smb_filename *smb_fname,
|
||||
SMB_ACL_TYPE_T type,
|
||||
@ -1849,6 +1906,7 @@ static struct vfs_fn_pointers vfs_um_fns = {
|
||||
/* NT ACL operations. */
|
||||
|
||||
.get_nt_acl_fn = um_get_nt_acl,
|
||||
.get_nt_acl_at_fn = um_get_nt_acl_at,
|
||||
|
||||
/* POSIX ACL operations. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user