summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--librpc/idl/notify.idl1
-rw-r--r--source3/smbd/notify_inotify.c2
-rw-r--r--source3/smbd/notify_internal.c10
-rw-r--r--source4/ntvfs/common/notify.c1
-rw-r--r--source4/ntvfs/sysdep/inotify.c2
5 files changed, 13 insertions, 3 deletions
diff --git a/librpc/idl/notify.idl b/librpc/idl/notify.idl
index ec81e8c64ac..66422ec9f9e 100644
--- a/librpc/idl/notify.idl
+++ b/librpc/idl/notify.idl
@@ -65,6 +65,7 @@ interface notify
/* structure sent between servers in notify messages */
typedef [public] struct {
uint32 action;
+ utf8string dir;
utf8string path;
pointer private_data;
} notify_event;
diff --git a/source3/smbd/notify_inotify.c b/source3/smbd/notify_inotify.c
index ad670affcde..a3c30f1431e 100644
--- a/source3/smbd/notify_inotify.c
+++ b/source3/smbd/notify_inotify.c
@@ -165,6 +165,7 @@ static void inotify_dispatch(struct inotify_private *in,
for (w=in->watches;w;w=next) {
next = w->next;
if (w->wd == e->wd && filter_match(w, e)) {
+ ne.dir = w->path;
w->callback(in->ctx, w->private_data, &ne);
}
}
@@ -184,6 +185,7 @@ static void inotify_dispatch(struct inotify_private *in,
next = w->next;
if (w->wd == e->wd && filter_match(w, e) &&
!(w->filter & FILE_NOTIFY_CHANGE_CREATION)) {
+ ne.dir = w->path;
w->callback(in->ctx, w->private_data, &ne);
}
}
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index 9d548911528..9c0b1901f8c 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -831,9 +831,13 @@ static void notify_handler(struct messaging_context *msg_ctx,
}
m = (struct notify_msg *)data->data;
- e.action = m->action;
- e.path = m->path;
- e.private_data = m->private_data;
+
+ e = (struct notify_event) {
+ .action = m->action,
+ .path = m->path,
+ .private_data = m->private_data,
+ .dir = discard_const_p(char, "")
+ };
for (listel=notify->list;listel;listel=listel->next) {
if (listel->private_data == m->private_data) {
diff --git a/source4/ntvfs/common/notify.c b/source4/ntvfs/common/notify.c
index 57142c7f38c..61da0b8291d 100644
--- a/source4/ntvfs/common/notify.c
+++ b/source4/ntvfs/common/notify.c
@@ -550,6 +550,7 @@ static void notify_send(struct notify_context *notify, struct notify_entry *e,
TALLOC_CTX *tmp_ctx;
ev.action = action;
+ ev.dir = discard_const_p(char, "");
ev.path = path;
ev.private_data = e->private_data;
diff --git a/source4/ntvfs/sysdep/inotify.c b/source4/ntvfs/sysdep/inotify.c
index 0680b4b52bf..091ca1da283 100644
--- a/source4/ntvfs/sysdep/inotify.c
+++ b/source4/ntvfs/sysdep/inotify.c
@@ -144,6 +144,7 @@ static void inotify_dispatch(struct inotify_private *in,
for (w=in->watches;w;w=next) {
next = w->next;
if (w->wd == e->wd && filter_match(w, e)) {
+ ne.dir = w->path;
w->callback(in->ctx, w->private_data, &ne);
}
}
@@ -163,6 +164,7 @@ static void inotify_dispatch(struct inotify_private *in,
next = w->next;
if (w->wd == e->wd && filter_match(w, e) &&
!(w->filter & FILE_NOTIFY_CHANGE_CREATION)) {
+ ne.dir = w->path;
w->callback(in->ctx, w->private_data, &ne);
}
}