mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +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:
parent
6601b35e84
commit
4e9a55536f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user