const SMB_STRUCT_STAT *psbuf)
{
struct timespec ts[2];
+ time_t create_time;
if (total_data < 12) {
return NT_STATUS_INVALID_PARAMETER;
/* write time */
ts[1] = convert_time_t_to_timespec(srv_make_unix_date2(pdata+l1_fdateLastWrite));
+ /* create time */
+ /* XXX: this code should be in smb_set_file_time() -- jpeach */
+ create_time = srv_make_unix_date2(pdata+l1_fdateCreation);
+ /* They want to set the create time and the share is writable */
+ if ((!null_mtime(create_time)) && (CAN_WRITE(conn)) && !fsp) {
+ SMB_VFS_SET_CREATE_TIME(conn, fname, create_time);
+ }
+
DEBUG(10,("smb_set_info_standard: file %s\n",
fname ? fname : fsp->fsp_name ));
const char *fname,
SMB_STRUCT_STAT *psbuf)
{
+ time_t create_time;
/* Patch to do this correctly from Paul Eggert <eggert@twinsun.com>. */
struct timespec write_time;
struct timespec changed_time;
return status;
}
- /* Ignore create time at offset pdata. */
+ /* create time */
+ create_time = convert_timespec_to_time_t(interpret_long_date(pdata+0));
+ /* They want to set the create time and the share is writable */
+ if ((!null_mtime(create_time)) && (CAN_WRITE(conn)) && !fsp) {
+ SMB_VFS_SET_CREATE_TIME(conn, fname, create_time);
+ }
/* access time */
ts[0] = interpret_long_date(pdata+8);
const char *fname,
SMB_STRUCT_STAT *psbuf)
{
+ time_t create_time;
NTSTATUS status;
uint32 smb_fflags;
uint32 smb_fmask;
return status;
}
+ create_time = convert_timespec_to_time_t(interpret_long_date(pdata+100)); /* create_time */
+ /* They want to set the create time and the share is writable */
+ if ((!null_mtime(create_time)) && (CAN_WRITE(conn)) && !fsp) {
+ SMB_VFS_SET_CREATE_TIME(conn, fname, create_time);
+ }
+
smb_fflags = IVAL(pdata, 108);
smb_fmask = IVAL(pdata, 112);