mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
r14938: add smbcli_fsetatr() as a convenient interface to a setfileinfo for
torture testing. Used by RAW-NOTIFY.
This commit is contained in:
parent
85d70f1c15
commit
517db1b1b0
@ -588,6 +588,29 @@ NTSTATUS smbcli_setatr(struct smbcli_tree *tree, const char *fname, uint16_t mod
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
Do a setfileinfo basic_info call.
|
||||||
|
****************************************************************************/
|
||||||
|
NTSTATUS smbcli_fsetatr(struct smbcli_tree *tree, int fnum, uint16_t mode,
|
||||||
|
NTTIME create_time, NTTIME access_time,
|
||||||
|
NTTIME write_time, NTTIME change_time)
|
||||||
|
{
|
||||||
|
union smb_setfileinfo parms;
|
||||||
|
NTSTATUS status;
|
||||||
|
|
||||||
|
parms.basic_info.level = RAW_SFILEINFO_BASIC_INFO;
|
||||||
|
parms.basic_info.in.file.fnum = fnum;
|
||||||
|
parms.basic_info.in.attrib = mode;
|
||||||
|
parms.basic_info.in.create_time = create_time;
|
||||||
|
parms.basic_info.in.access_time = access_time;
|
||||||
|
parms.basic_info.in.write_time = write_time;
|
||||||
|
parms.basic_info.in.change_time = change_time;
|
||||||
|
|
||||||
|
status = smb_raw_setfileinfo(tree, &parms);
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
Check for existence of a dir.
|
Check for existence of a dir.
|
||||||
|
Loading…
Reference in New Issue
Block a user