uint32 action =
FILE_NOTIFY_CHANGE_LAST_ACCESS
|FILE_NOTIFY_CHANGE_LAST_WRITE;
+ bool set_createtime = false;
+ bool set_ctime = false;
NTSTATUS status;
if (!VALID_STAT(smb_fname->st)) {
}
/* get some defaults (no modifications) if any info is zero or -1. */
+ if (null_timespec(ft->create_time)) {
+ ft->create_time = smb_fname->st.st_ex_btime;
+ } else {
+ set_createtime = true;
+ }
+
+ if (!null_timespec(ft->ctime)) {
+ set_ctime = true;
+ }
+
if (null_timespec(ft->atime)) {
ft->atime= smb_fname->st.st_ex_atime;
action &= ~FILE_NOTIFY_CHANGE_LAST_ACCESS;
struct timespec ats = smb_fname->st.st_ex_atime;
if ((timespec_compare(&ft->atime, &ats) == 0) &&
(timespec_compare(&ft->mtime, &mts) == 0)) {
+ if (set_createtime || set_ctime) {
+ notify_fname(conn, NOTIFY_ACTION_MODIFIED, action,
+ smb_fname->base_name);
+ }
return NT_STATUS_OK;
}
}