summaryrefslogtreecommitdiffstats
path: root/source/smbd/notify_kernel.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2000-06-13 06:33:15 +0000
committerAndrew Tridgell <tridge@samba.org>2000-06-13 06:33:15 +0000
commit20a06b7fb7c855e874b79b86251d597e7797b3c0 (patch)
tree9111d4d0102850acb184671d398e565fe94ac548 /source/smbd/notify_kernel.c
parent719bc2f130393a55058f5c45ca6fbd30a78de2dc (diff)
downloadsamba-20a06b7fb7c855e874b79b86251d597e7797b3c0.tar.gz
samba-20a06b7fb7c855e874b79b86251d597e7797b3c0.tar.xz
samba-20a06b7fb7c855e874b79b86251d597e7797b3c0.zip
always use the DN_CREATE mask (NT expects file creation always to
cause a notify)
Diffstat (limited to 'source/smbd/notify_kernel.c')
-rw-r--r--source/smbd/notify_kernel.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/smbd/notify_kernel.c b/source/smbd/notify_kernel.c
index f78198f2079..bfa21a6e2c9 100644
--- a/source/smbd/notify_kernel.c
+++ b/source/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));
}