s4:dsdb: add dsdb_notification module
authorStefan Metzmacher <metze@samba.org>
Thu, 23 Jul 2015 10:09:45 +0000 (12:09 +0200)
committerGarming Sam <garming@samba.org>
Wed, 17 Feb 2016 02:43:23 +0000 (03:43 +0100)
commit46243e4d80b7a1df8920d80af70c7ecca380b5a5
treedbd8d9e00c23ec2cb03ef56dfec78c70b2c1c975
parent3f0fbfa7b2eac8e54ce165564cf6f33dd1821644
s4:dsdb: add dsdb_notification module

This adds a simple implementation of LDB_CONTROL_NOTIFICATION_OID.
It requires caller (the ldap server task) to retry the request peridically,
using the same ldb_control structure in order to get some progress and
the never ending search behaviour an LDAP client expects.

For now we remember the known_usn in a cookie stored
in the otherwise unused ldb_control->data fielf
and we do a simple search using (uSNChanged>=${known_usn}+1).

In future we may do things based on the uSNChanged value.

for (i = old_highest + 1; i <= current_highest; i) {
search for (uSNChanged=i)
}

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/dsdb/samdb/ldb_modules/dsdb_notification.c [new file with mode: 0644]
source4/dsdb/samdb/ldb_modules/wscript_build_server