On Tuesday, 12 September 2017 18:38:29 CEST Richard Sharpe via samba-technical
> Hi folks,
> In order to write some nice unit tests for things I would like a
> settimes command in smbclient.
> The difficulty seems to be that there is no cli_sfileinfo API
> available and I imagine that while I could use smb_raw_setpathinfo
> from source4 but that might cause linking issues.
> Has anyone written anything like this before?
libsmbclient has smbc_utimes which calls cli_setpathinfo_basic() to set
create_time, access_time, write_time and change_time. It falls back to
cli_setatrE() and cli_setatr().
Look into SMBC_setatr() in source3/libsmb/libsmb_file.c
If there is no such function in smblclient yet you should call it utimes.
Hope that helps,
Andreas Schneider GPG-ID: CC014E3D
Samba Team [hidden email] www.samba.org