mirror of
https://github.com/samba-team/samba.git
synced 2025-07-30 19:42:05 +03:00
s3: VFS: snapper: Implement SMB_VFS_FNTIMES()
Signed-off-by: Samuel Cabrero <scabrero@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
committed by
Samuel Cabrero
parent
6d9fc8de56
commit
c942e2bd39
@ -2240,6 +2240,28 @@ static int snapper_gmt_ntimes(vfs_handle_struct *handle,
|
||||
return SMB_VFS_NEXT_NTIMES(handle, smb_fname, ft);
|
||||
}
|
||||
|
||||
static int snapper_gmt_fntimes(vfs_handle_struct *handle,
|
||||
files_struct *fsp,
|
||||
struct smb_file_time *ft)
|
||||
{
|
||||
time_t timestamp = 0;
|
||||
|
||||
if (!snapper_gmt_strip_snapshot(talloc_tos(),
|
||||
handle,
|
||||
fsp->fsp_name,
|
||||
×tamp,
|
||||
NULL)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (timestamp != 0) {
|
||||
errno = EROFS;
|
||||
return -1;
|
||||
}
|
||||
|
||||
return SMB_VFS_NEXT_FNTIMES(handle, fsp, ft);
|
||||
}
|
||||
|
||||
static int snapper_gmt_readlinkat(vfs_handle_struct *handle,
|
||||
const struct files_struct *dirfsp,
|
||||
const struct smb_filename *smb_fname,
|
||||
@ -2732,6 +2754,7 @@ static struct vfs_fn_pointers snapper_fns = {
|
||||
.fchmod_fn = snapper_gmt_fchmod,
|
||||
.chdir_fn = snapper_gmt_chdir,
|
||||
.ntimes_fn = snapper_gmt_ntimes,
|
||||
.fntimes_fn = snapper_gmt_fntimes,
|
||||
.readlinkat_fn = snapper_gmt_readlinkat,
|
||||
.mknodat_fn = snapper_gmt_mknodat,
|
||||
.realpath_fn = snapper_gmt_realpath,
|
||||
|
Reference in New Issue
Block a user