return pvfs_map_errno(pvfs, errno);
}
+ notify_trigger(pvfs->notify_context,
+ NOTIFY_ACTION_MODIFIED,
+ FILE_NOTIFY_CHANGE_FILE_NAME,
+ name->full_name);
+
name->full_name = talloc_steal(name, name2->full_name);
name->original_name = talloc_steal(name, name2->original_name);
return status;
}
+ notify_trigger(pvfs->notify_context,
+ NOTIFY_ACTION_MODIFIED,
+ FILE_NOTIFY_CHANGE_EA,
+ name->full_name);
+
name->dos.ea_size = 4;
for (i=0;i<ealist->num_eas;i++) {
name->dos.ea_size += 4 + strlen(ealist->eas[i].name)+1 +
struct pvfs_filename newstats;
NTSTATUS status;
uint32_t access_needed;
+ uint32_t change_mask = 0;
f = pvfs_find_fd(pvfs, req, info->generic.in.file.fnum);
if (!f) {
case RAW_SFILEINFO_STANDARD:
if (!null_time(info->setattre.in.create_time)) {
unix_to_nt_time(&newstats.dos.create_time, info->setattre.in.create_time);
+ change_mask |= FILE_NOTIFY_CHANGE_CREATION;
}
if (!null_time(info->setattre.in.access_time)) {
unix_to_nt_time(&newstats.dos.access_time, info->setattre.in.access_time);
case RAW_SFILEINFO_BASIC_INFORMATION:
if (!null_nttime(info->basic_info.in.create_time)) {
newstats.dos.create_time = info->basic_info.in.create_time;
+ change_mask |= FILE_NOTIFY_CHANGE_CREATION;
}
if (!null_nttime(info->basic_info.in.access_time)) {
newstats.dos.access_time = info->basic_info.in.access_time;
info);
case RAW_SFILEINFO_SEC_DESC:
+ notify_trigger(pvfs->notify_context,
+ NOTIFY_ACTION_MODIFIED,
+ FILE_NOTIFY_CHANGE_SECURITY,
+ h->name->full_name);
return pvfs_acl_set(pvfs, req, h->name, h->fd, f->access_mask, info);
default:
if (!NT_STATUS_IS_OK(status)) {
return status;
}
+
+ change_mask |= FILE_NOTIFY_CHANGE_STREAM_SIZE;
} else {
int ret;
if (f->access_mask &
if (ret == -1) {
return pvfs_map_errno(pvfs, errno);
}
+ change_mask |= FILE_NOTIFY_CHANGE_SIZE;
}
}
ZERO_STRUCT(unix_times);
if (newstats.dos.access_time != h->name->dos.access_time) {
unix_times.actime = nt_time_to_unix(newstats.dos.access_time);
+ change_mask |= FILE_NOTIFY_CHANGE_LAST_ACCESS;
}
if (newstats.dos.write_time != h->name->dos.write_time) {
unix_times.modtime = nt_time_to_unix(newstats.dos.write_time);
+ change_mask |= FILE_NOTIFY_CHANGE_LAST_WRITE;
}
if (unix_times.actime != 0 || unix_times.modtime != 0) {
if (utime(h->name->full_name, &unix_times) == -1) {
return pvfs_map_errno(pvfs, errno);
}
}
+ change_mask |= FILE_NOTIFY_CHANGE_ATTRIBUTES;
}
*h->name = newstats;
+ notify_trigger(pvfs->notify_context,
+ NOTIFY_ACTION_MODIFIED,
+ change_mask,
+ h->name->full_name);
+
return pvfs_dosattrib_save(pvfs, h->name, h->fd);
}
NTSTATUS status;
struct utimbuf unix_times;
uint32_t access_needed;
+ uint32_t change_mask = 0;
/* resolve the cifs name to a posix name */
status = pvfs_resolve_name(pvfs, req, info->generic.in.file.path,
case RAW_SFILEINFO_STANDARD:
if (!null_time(info->setattre.in.create_time)) {
unix_to_nt_time(&newstats.dos.create_time, info->setattre.in.create_time);
+ change_mask |= FILE_NOTIFY_CHANGE_CREATION;
}
if (!null_time(info->setattre.in.access_time)) {
unix_to_nt_time(&newstats.dos.access_time, info->setattre.in.access_time);
case RAW_SFILEINFO_BASIC_INFORMATION:
if (!null_nttime(info->basic_info.in.create_time)) {
newstats.dos.create_time = info->basic_info.in.create_time;
+ change_mask |= FILE_NOTIFY_CHANGE_CREATION;
}
if (!null_nttime(info->basic_info.in.access_time)) {
newstats.dos.access_time = info->basic_info.in.access_time;
*name = newstats;
+ notify_trigger(pvfs->notify_context,
+ NOTIFY_ACTION_MODIFIED,
+ change_mask,
+ name->full_name);
+
return pvfs_dosattrib_save(pvfs, name, -1);
}