diff options
author | Andrew Tridgell <tridge@samba.org> | 2000-06-13 06:33:15 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2000-06-13 06:33:15 +0000 |
commit | b7930178c35ed1b9e449ead7b8cd03bc4f0ce316 (patch) | |
tree | f19cf59881bd3371d2e93c88479ec1aeb36a3c58 /source3/smbd | |
parent | 5dc618460deed8c9d4abf3196963b434627a52a7 (diff) | |
download | samba-b7930178c35ed1b9e449ead7b8cd03bc4f0ce316.tar.gz samba-b7930178c35ed1b9e449ead7b8cd03bc4f0ce316.tar.bz2 samba-b7930178c35ed1b9e449ead7b8cd03bc4f0ce316.zip |
always use the DN_CREATE mask (NT expects file creation always to
cause a notify)
(This used to be commit 20a06b7fb7c855e874b79b86251d597e7797b3c0)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/notify_kernel.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/source3/smbd/notify_kernel.c b/source3/smbd/notify_kernel.c index f78198f207..bfa21a6e2c 100644 --- a/source3/smbd/notify_kernel.c +++ b/source3/smbd/notify_kernel.c @@ -131,7 +131,7 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32 return NULL; } - kernel_flags = 0; + kernel_flags = DN_CREATE; /* always notify on file creation */ if (flags & FILE_NOTIFY_CHANGE_FILE_NAME) kernel_flags |= DN_RENAME|DN_DELETE; if (flags & FILE_NOTIFY_CHANGE_DIR_NAME) kernel_flags |= DN_RENAME|DN_DELETE; if (flags & FILE_NOTIFY_CHANGE_ATTRIBUTES) kernel_flags |= DN_MODIFY; @@ -145,15 +145,10 @@ static void *kernel_register_notify(connection_struct *conn, char *path, uint32 return NULL; } - if (fcntl(fd, F_SETOWN, sys_getpid()) == -1) { - DEBUG(3,("Failed to set owner for change notify\n")); - return NULL; - } - data.directory_handle = fd; - DEBUG(3,("kernel change notify on %s (flags=0x%x) fd=%d\n", - path, (int)kernel_flags, fd)); + DEBUG(3,("kernel change notify on %s (ntflags=0x%x flags=0x%x) fd=%d\n", + path, (int)flags, (int)kernel_flags, fd)); return (void *)memdup(&data, sizeof(data)); } |