summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/notify_internal.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source3/smbd/notify_internal.c b/source3/smbd/notify_internal.c
index eaf51e7648..f5a8584b2e 100644
--- a/source3/smbd/notify_internal.c
+++ b/source3/smbd/notify_internal.c
@@ -608,11 +608,18 @@ void notify_trigger(struct notify_context *notify,
return;
}
+ if (path[0] != '/') {
+ /*
+ * The rest of this routine assumes an absolute path.
+ */
+ return;
+ }
+
idx_state.mem_ctx = talloc_tos();
idx_state.vnns = NULL;
idx_state.my_vnn = get_my_vnn();
- for (p = path; p != NULL; p = next_p) {
+ for (p = strchr(path+1, '/'); p != NULL; p = next_p) {
ptrdiff_t path_len = p - path;
bool recursive;