summaryrefslogtreecommitdiff
path: root/source3/smbd/dosmode.c
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-17 16:23:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:13 -0500
commit940192ddcc9d23e3bec806b4419d5845eeac0fd0 (patch)
tree60d01078e1fd8f017e5245179d99a7b1bc8b6a12 /source3/smbd/dosmode.c
parentb385a40f592ae7e9962f4034e9cbe66352681e2c (diff)
downloadsamba-940192ddcc9d23e3bec806b4419d5845eeac0fd0.tar.gz
samba-940192ddcc9d23e3bec806b4419d5845eeac0fd0.tar.bz2
samba-940192ddcc9d23e3bec806b4419d5845eeac0fd0.zip
r20854: Ok, now I think we're at a point where looking at notify starts to make sense
again :-) Volker (This used to be commit 5533cdeec1b0cdee39b1d89e2320587dc9281ee6)
Diffstat (limited to 'source3/smbd/dosmode.c')
-rw-r--r--source3/smbd/dosmode.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source3/smbd/dosmode.c b/source3/smbd/dosmode.c
index ff4291c08c..44e637a0ee 100644
--- a/source3/smbd/dosmode.c
+++ b/source3/smbd/dosmode.c
@@ -491,8 +491,11 @@ int file_set_dosmode(connection_struct *conn, const char *fname,
unixmode |= (st->st_mode & (S_IWUSR|S_IWGRP|S_IWOTH));
}
- if ((ret = SMB_VFS_CHMOD(conn,fname,unixmode)) == 0)
+ if ((ret = SMB_VFS_CHMOD(conn,fname,unixmode)) == 0) {
+ notify_fname(conn, fname, FILE_NOTIFY_CHANGE_ATTRIBUTES,
+ NOTIFY_ACTION_MODIFIED);
return 0;
+ }
if((errno != EPERM) && (errno != EACCES))
return -1;
@@ -521,6 +524,8 @@ int file_set_dosmode(connection_struct *conn, const char *fname,
ret = SMB_VFS_FCHMOD(fsp, fsp->fh->fd, unixmode);
unbecome_root();
close_file_fchmod(fsp);
+ notify_fname(conn, fname, FILE_NOTIFY_CHANGE_ATTRIBUTES,
+ NOTIFY_ACTION_MODIFIED);
}
return( ret );
@@ -593,6 +598,9 @@ BOOL set_filetime(connection_struct *conn, const char *fname, time_t mtime)
DEBUG(4,("set_filetime(%s) failed: %s\n",fname,strerror(errno)));
return False;
}
+
+ notify_fname(conn, fname, FILE_NOTIFY_CHANGE_LAST_WRITE,
+ NOTIFY_ACTION_MODIFIED);
return(True);
}