summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2007-01-31 12:42:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:17:33 -0500
commitb0bf3ddb386f3c04b44c6e48867c222ae3a15c2e (patch)
treee4d9dadd25aa399df7d063e46c7b6b0c0f9f5179 /source3
parent9ee97d2f7d4e3c7e14d32825c5ee23b136ce4e07 (diff)
downloadsamba-b0bf3ddb386f3c04b44c6e48867c222ae3a15c2e.tar.gz
samba-b0bf3ddb386f3c04b44c6e48867c222ae3a15c2e.tar.bz2
samba-b0bf3ddb386f3c04b44c6e48867c222ae3a15c2e.zip
r21079: Minimizing diff: Adopt the Samba4 style ChangeNotify flags.
Volker (This used to be commit a3c1069b0c3da914e2ac7337fd9e924b1c811d39)
Diffstat (limited to 'source3')
-rw-r--r--source3/include/messages.h4
-rw-r--r--source3/include/smb.h6
-rw-r--r--source3/smbd/notify_fam.c8
-rw-r--r--source3/smbd/notify_hash.c3
-rw-r--r--source3/smbd/notify_kernel.c2
-rw-r--r--source3/smbd/reply.c4
6 files changed, 16 insertions, 11 deletions
diff --git a/source3/include/messages.h b/source3/include/messages.h
index ead5fb08c2..7cd0e02348 100644
--- a/source3/include/messages.h
+++ b/source3/include/messages.h
@@ -73,6 +73,10 @@
#define MSG_SMB_BLOCKING_LOCK_CANCEL 3013
#define MSG_SMB_NOTIFY 3014
#define MSG_SMB_STAT_CACHE_DELETE 3015
+/*
+ * Samba4 compatibility
+ */
+#define MSG_PVFS_NOTIFY 3016
/* winbind messages */
#define MSG_WINBIND_FINISHED 4001
diff --git a/source3/include/smb.h b/source3/include/smb.h
index 48d0e0cf6f..3af3dd63dc 100644
--- a/source3/include/smb.h
+++ b/source3/include/smb.h
@@ -1379,7 +1379,7 @@ struct bitmap {
#define FILE_READ_ONLY_VOLUME 0x00080000
/* ChangeNotify flags. */
-#define FILE_NOTIFY_CHANGE_FILE 0x001
+#define FILE_NOTIFY_CHANGE_FILE_NAME 0x001
#define FILE_NOTIFY_CHANGE_DIR_NAME 0x002
#define FILE_NOTIFY_CHANGE_ATTRIBUTES 0x004
#define FILE_NOTIFY_CHANGE_SIZE 0x008
@@ -1388,7 +1388,9 @@ struct bitmap {
#define FILE_NOTIFY_CHANGE_CREATION 0x040
#define FILE_NOTIFY_CHANGE_EA 0x080
#define FILE_NOTIFY_CHANGE_SECURITY 0x100
-#define FILE_NOTIFY_CHANGE_FILE_NAME 0x200
+#define FILE_NOTIFY_CHANGE_STREAM_NAME 0x00000200
+#define FILE_NOTIFY_CHANGE_STREAM_SIZE 0x00000400
+#define FILE_NOTIFY_CHANGE_STREAM_WRITE 0x00000800
#define FILE_NOTIFY_CHANGE_NAME \
(FILE_NOTIFY_CHANGE_FILE_NAME|FILE_NOTIFY_CHANGE_DIR_NAME)
diff --git a/source3/smbd/notify_fam.c b/source3/smbd/notify_fam.c
index 306316e49f..aba1f5dcb3 100644
--- a/source3/smbd/notify_fam.c
+++ b/source3/smbd/notify_fam.c
@@ -191,8 +191,8 @@ static void *fam_notify_add(TALLOC_CTX *mem_ctx,
struct fam_notify_ctx *ctx;
pstring fullpath;
- if ((*filter & FILE_NOTIFY_CHANGE_FILE) == 0) {
- DEBUG(10, ("filter = %u, no FILE_NOTIFY_CHANGE_FILE\n",
+ if ((*filter & FILE_NOTIFY_CHANGE_FILE_NAME) == 0) {
+ DEBUG(10, ("filter = %u, no FILE_NOTIFY_CHANGE_FILE_NAME\n",
*filter));
return NULL;
}
@@ -224,7 +224,7 @@ static void *fam_notify_add(TALLOC_CTX *mem_ctx,
* FAMCreated and FAMDeleted events
*/
- ctx->filter = FILE_NOTIFY_CHANGE_FILE;
+ ctx->filter = FILE_NOTIFY_CHANGE_FILE_NAME;
if (!(ctx->path = talloc_strdup(ctx, fullpath))) {
DEBUG(0, ("talloc_strdup failed\n"));
@@ -236,7 +236,7 @@ static void *fam_notify_add(TALLOC_CTX *mem_ctx,
* Leave the rest to smbd itself
*/
- *filter &= ~FILE_NOTIFY_CHANGE_FILE;
+ *filter &= ~FILE_NOTIFY_CHANGE_FILE_NAME;
DLIST_ADD(fam_notify_list, ctx);
talloc_set_destructor(ctx, fam_notify_ctx_destructor);
diff --git a/source3/smbd/notify_hash.c b/source3/smbd/notify_hash.c
index 773a7565c5..5f563419bd 100644
--- a/source3/smbd/notify_hash.c
+++ b/source3/smbd/notify_hash.c
@@ -147,8 +147,7 @@ static BOOL notify_hash(connection_struct *conn, char *path, uint32 flags,
*/
if (flags & (FILE_NOTIFY_CHANGE_DIR_NAME
- |FILE_NOTIFY_CHANGE_FILE_NAME
- |FILE_NOTIFY_CHANGE_FILE)) {
+ |FILE_NOTIFY_CHANGE_FILE_NAME)) {
int i;
unsigned char tmp_hash[16];
mdfour(tmp_hash, (const unsigned char *)fname,
diff --git a/source3/smbd/notify_kernel.c b/source3/smbd/notify_kernel.c
index 0b5784f3d0..f90414dc79 100644
--- a/source3/smbd/notify_kernel.c
+++ b/source3/smbd/notify_kernel.c
@@ -152,7 +152,7 @@ static int kernel_register_notify(connection_struct *conn, char *path,
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_FILE_NAME) kernel_flags |= DN_MODIFY;
if (flags & FILE_NOTIFY_CHANGE_DIR_NAME) kernel_flags
|= DN_RENAME
|DN_DELETE;
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index a1edce935d..b0bddc03f6 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -1867,7 +1867,7 @@ NTSTATUS unlink_internals(connection_struct *conn, uint32 dirtype,
if (SMB_VFS_UNLINK(conn,directory) == 0) {
count++;
notify_fname(conn, directory,
- FILE_NOTIFY_CHANGE_FILE,
+ FILE_NOTIFY_CHANGE_FILE_NAME,
NOTIFY_ACTION_REMOVED);
}
} else {
@@ -1930,7 +1930,7 @@ NTSTATUS unlink_internals(connection_struct *conn, uint32 dirtype,
DEBUG(3,("unlink_internals: succesful unlink "
"[%s]\n",fname));
notify_action(conn, directory, dname,
- FILE_NOTIFY_CHANGE_FILE,
+ FILE_NOTIFY_CHANGE_FILE_NAME,
NOTIFY_ACTION_REMOVED);
}