mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
s3: VFS: ceph_snapshots. Add ceph_snap_gmt_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
22c3541e00
commit
0ebce107dc
@ -1156,6 +1156,60 @@ static NTSTATUS ceph_snap_gmt_get_nt_acl(vfs_handle_struct *handle,
|
||||
return status;
|
||||
}
|
||||
|
||||
static NTSTATUS ceph_snap_gmt_get_nt_acl_at(vfs_handle_struct *handle,
|
||||
struct files_struct *dirfsp,
|
||||
const struct smb_filename *csmb_fname,
|
||||
uint32_t security_info,
|
||||
TALLOC_CTX *mem_ctx,
|
||||
struct security_descriptor **ppdesc)
|
||||
{
|
||||
time_t timestamp = 0;
|
||||
char stripped[PATH_MAX + 1];
|
||||
char conv[PATH_MAX + 1];
|
||||
int ret;
|
||||
NTSTATUS status;
|
||||
struct smb_filename *new_fname;
|
||||
int saved_errno;
|
||||
|
||||
SMB_ASSERT(dirfsp == handle->conn->cwd_fsp);
|
||||
|
||||
ret = ceph_snap_gmt_strip_snapshot(handle,
|
||||
csmb_fname,
|
||||
×tamp, stripped, sizeof(stripped));
|
||||
if (ret < 0) {
|
||||
return map_nt_error_from_unix(-ret);
|
||||
}
|
||||
if (timestamp == 0) {
|
||||
return SMB_VFS_NEXT_GET_NT_ACL_AT(handle,
|
||||
dirfsp,
|
||||
csmb_fname,
|
||||
security_info,
|
||||
mem_ctx,
|
||||
ppdesc);
|
||||
}
|
||||
ret = ceph_snap_gmt_convert(handle, stripped,
|
||||
timestamp, conv, sizeof(conv));
|
||||
if (ret < 0) {
|
||||
return map_nt_error_from_unix(-ret);
|
||||
}
|
||||
new_fname = cp_smb_filename(talloc_tos(), csmb_fname);
|
||||
if (new_fname == NULL) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
new_fname->base_name = conv;
|
||||
|
||||
status = SMB_VFS_NEXT_GET_NT_ACL_AT(handle,
|
||||
dirfsp,
|
||||
new_fname,
|
||||
security_info,
|
||||
mem_ctx,
|
||||
ppdesc);
|
||||
saved_errno = errno;
|
||||
TALLOC_FREE(new_fname);
|
||||
errno = saved_errno;
|
||||
return status;
|
||||
}
|
||||
|
||||
static int ceph_snap_gmt_mkdirat(vfs_handle_struct *handle,
|
||||
struct files_struct *dirfsp,
|
||||
const struct smb_filename *csmb_fname,
|
||||
@ -1475,6 +1529,7 @@ static struct vfs_fn_pointers ceph_snap_fns = {
|
||||
.mknodat_fn = ceph_snap_gmt_mknodat,
|
||||
.realpath_fn = ceph_snap_gmt_realpath,
|
||||
.get_nt_acl_fn = ceph_snap_gmt_get_nt_acl,
|
||||
.get_nt_acl_at_fn = ceph_snap_gmt_get_nt_acl_at,
|
||||
.mkdirat_fn = ceph_snap_gmt_mkdirat,
|
||||
.getxattr_fn = ceph_snap_gmt_getxattr,
|
||||
.getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
|
||||
|
Loading…
x
Reference in New Issue
Block a user