From b7930178c35ed1b9e449ead7b8cd03bc4f0ce316 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 13 Jun 2000 06:33:15 +0000 Subject: always use the DN_CREATE mask (NT expects file creation always to cause a notify) (This used to be commit 20a06b7fb7c855e874b79b86251d597e7797b3c0) --- source3/smbd/notify_kernel.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'source3') 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)); } -- cgit