mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
smbd: Avoid sending 0-sized keys to dbwrap
Start the notification one level below /. Sharing and notifying / for changes is broken at this moment anyway. When sharing / and someone wants to get notified for changes under /usr, we store "//usr" as the notify_index key. So this patch does not break anything that is not broken today, and it avoids a bogus call to dbwrap_parse_records. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
bbb4068c93
commit
d4ebeeb788
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user