1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

notifyd: Don't trust remote pointers

Not a security hole IMO: Only root can send us messages, that's at least our
assumption.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Volker Lendecke 2016-09-08 15:18:39 +02:00
parent 6601b35e84
commit 4e9a55536f

View File

@ -1202,6 +1202,13 @@ static int notifyd_add_proxy_syswatches(struct db_record *rec,
uint32_t subdir_filter = instance->instance.subdir_filter;
int ret;
/*
* This is a remote database. Pointers that we were
* given don't make sense locally. Initialize to NULL
* in case sys_notify_watch fails.
*/
instances[i].sys_watch = NULL;
ret = state->sys_notify_watch(
db, state->sys_notify_ctx, path,
&filter, &subdir_filter,