summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/notify.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index e360af9ef5..8ceeaf5f55 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -372,13 +372,26 @@ static void notify_fsp(files_struct *fsp, uint32 action, const char *name)
if ((fsp->notify->num_changes > 1000) || (name == NULL)) {
/*
* The real number depends on the client buf, just provide a
- * guard against a DoS here.
+ * guard against a DoS here. If name == NULL the CN backend is
+ * alerting us to a problem. Possibly dropped events. Clear
+ * queued changes and send the catch-all response to the client
+ * if a request is pending.
*/
TALLOC_FREE(fsp->notify->changes);
fsp->notify->num_changes = -1;
+ if (fsp->notify->requests != NULL) {
+ change_notify_reply(fsp->conn,
+ fsp->notify->requests->req,
+ fsp->notify->requests->max_param,
+ fsp->notify);
+ change_notify_remove_request(fsp->notify->requests);
+ }
return;
}
+ /* If we've exceeded the server side queue or received a NULL name
+ * from the underlying CN implementation, don't queue up any more
+ * requests until we can send a catch-all response to the client */
if (fsp->notify->num_changes == -1) {
return;
}