diff options
author | Ralph Boehme <slow@samba.org> | 2015-08-11 16:49:46 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2015-08-31 22:35:22 +0200 |
commit | e1ad5205c3caba4348d3a3548866dfe490978873 (patch) | |
tree | b929c2de9c0518713f35745a16f915c909bee07e | |
parent | 8370cb4c012ab813c7f19c54686c82a81a03da64 (diff) | |
download | samba-e1ad5205c3caba4348d3a3548866dfe490978873.tar.gz |
notify: check for valid notify_ctx in notify_remove
notify_ctx will be NULL when "change notify = no" is set in smb.conf.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=11444
Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
(cherry picked from commit 098b8a5110b4e1b873196032098807b7922e232c)
-rw-r--r-- | source3/smbd/notify_msg.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/smbd/notify_msg.c b/source3/smbd/notify_msg.c index 86419830c99..ea067d0e80e 100644 --- a/source3/smbd/notify_msg.c +++ b/source3/smbd/notify_msg.c @@ -183,6 +183,11 @@ NTSTATUS notify_remove(struct notify_context *ctx, void *private_data) struct iovec iov[2]; NTSTATUS status; + /* see if change notify is enabled at all */ + if (ctx == NULL) { + return NT_STATUS_NOT_IMPLEMENTED; + } + for (listel = ctx->list; listel != NULL; listel = listel->next) { if (listel->private_data == private_data) { DLIST_REMOVE(ctx->list, listel); |