diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-06-13 09:31:43 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-06-13 09:31:43 +0000 |
commit | 9f542484d11b7b908d3170b702b3bad82ba71525 (patch) | |
tree | 6c21c127855f68831bad3ecdbffc1ffd52fdd8b4 | |
parent | 17d3c3a14885a42889d69459e7b3af7040a45499 (diff) | |
download | samba-9f542484d11b7b908d3170b702b3bad82ba71525.tar.gz samba-9f542484d11b7b908d3170b702b3bad82ba71525.tar.xz samba-9f542484d11b7b908d3170b702b3bad82ba71525.zip |
use DN_ATTRIB kernel change notify attribute
-rw-r--r-- | source/smbd/notify_kernel.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/smbd/notify_kernel.c b/source/smbd/notify_kernel.c index bfa21a6e2c9..c7fb5ca0dd8 100644 --- a/source/smbd/notify_kernel.c +++ b/source/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")); |