summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-06-13 09:31:43 +0000
committerAndrew Tridgell <tridge@samba.org>2000-06-13 09:31:43 +0000
commitbf575bf2839fe795af59ddd24b1ab3451aea5699 (patch)
tree067e920f958adf01448dfede359445171859210f /source3
parentb821b0c7dd1438271f0e1bb5b9cbd3da7e24cec4 (diff)
downloadsamba-bf575bf2839fe795af59ddd24b1ab3451aea5699.tar.gz
samba-bf575bf2839fe795af59ddd24b1ab3451aea5699.tar.bz2
samba-bf575bf2839fe795af59ddd24b1ab3451aea5699.zip
use DN_ATTRIB kernel change notify attribute
(This used to be commit 9f542484d11b7b908d3170b702b3bad82ba71525)
Diffstat (limited to 'source3')
-rw-r--r--source3/smbd/notify_kernel.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/smbd/notify_kernel.c b/source3/smbd/notify_kernel.c
index bfa21a6e2c..c7fb5ca0dd 100644
--- a/source3/smbd/notify_kernel.c
+++ b/source3/smbd/notify_kernel.c
@@ -35,6 +35,7 @@ static unsigned signals_processed;
#define DN_CREATE 0x00000004 /* File created in directory */
#define DN_DELETE 0x00000008 /* File removed from directory */
#define DN_RENAME 0x00000010 /* File renamed in directory */
+#define DN_ATTRIB 0x00000020 /* File changed attribute */
#define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
#endif
@@ -131,14 +132,17 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32
return NULL;
}
- kernel_flags = DN_CREATE; /* always notify on file creation */
- if (flags & FILE_NOTIFY_CHANGE_FILE_NAME) kernel_flags |= DN_RENAME|DN_DELETE;
+ kernel_flags = DN_CREATE|DN_DELETE|DN_RENAME; /* creation/deletion changes everything! */
+ if (flags & FILE_NOTIFY_CHANGE_FILE) kernel_flags |= DN_MODIFY;
if (flags & FILE_NOTIFY_CHANGE_DIR_NAME) kernel_flags |= DN_RENAME|DN_DELETE;
- if (flags & FILE_NOTIFY_CHANGE_ATTRIBUTES) kernel_flags |= DN_MODIFY;
+ if (flags & FILE_NOTIFY_CHANGE_ATTRIBUTES) kernel_flags |= DN_ATTRIB;
if (flags & FILE_NOTIFY_CHANGE_SIZE) kernel_flags |= DN_MODIFY;
if (flags & FILE_NOTIFY_CHANGE_LAST_WRITE) kernel_flags |= DN_MODIFY;
if (flags & FILE_NOTIFY_CHANGE_LAST_ACCESS) kernel_flags |= DN_ACCESS;
if (flags & FILE_NOTIFY_CHANGE_CREATION) kernel_flags |= DN_CREATE;
+ if (flags & FILE_NOTIFY_CHANGE_SECURITY) kernel_flags |= DN_ATTRIB;
+ if (flags & FILE_NOTIFY_CHANGE_EA) kernel_flags |= DN_ATTRIB;
+ if (flags & FILE_NOTIFY_CHANGE_FILE_NAME) kernel_flags |= DN_RENAME|DN_DELETE;
if (fcntl(fd, F_NOTIFY, kernel_flags) == -1) {
DEBUG(3,("Failed to set async flag for change notify\n"));