The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Go to the source code of this file.
Functions | |
int | persistent_sync_search_entry (sync_state_t *sync, LDAPMessage *msg, LDAPControl **ctrls) |
Handle a SearchResultEntry response from Persistent Search LDAP servers. More... | |
int | persistent_sync_state_init (fr_ldap_connection_t *conn, size_t sync_no, proto_ldap_sync_t const *inst, UNUSED uint8_t const *cookie) |
Allocate and initialise sync queries for persistent searches. More... | |
int persistent_sync_search_entry | ( | sync_state_t * | sync, |
LDAPMessage * | msg, | ||
LDAPControl ** | ctrls | ||
) |
Handle a SearchResultEntry response from Persistent Search LDAP servers.
Upon receipt of a search request containing the PersistentSearch control, if changesOnly is false, the server provides the initial content using zero or more SearchResultEntries without EntryChangeNotification controls.
Changes subsequent to the initial search request, result in SearchResultEntry or SearchResultReference with the EntryChangeNotification control which indicates what type of change is being reported.
The Entry Change Notification is an LDAP Control where the controlType is the object identifier 2.16.840.1.113730.3.4.3 and the controlValue, an OCTET STRING. It contains a BER-encoded syncStateValue.
EntryChangeNotification ::= SEQUENCE { changeType ENUMERATED { add (1), delete (2) modify (4), modDN (8) }, previousDN LDAPDN OPTIONAL, – only when the changeType is modDN changeNumber INTEGER OPTIONAL – if supported, the changeNumber from the change log. }
The Sync State Control is only included in SearchResultEntry and SearchResultReference Messages.
[in] | sync | message was associated with. |
[in] | msg | containing an entry to process. |
[in] | ctrls | associated with the msg. |
Definition at line 178 of file persistent_search.c.
int persistent_sync_state_init | ( | fr_ldap_connection_t * | conn, |
size_t | sync_no, | ||
proto_ldap_sync_t const * | inst, | ||
UNUSED uint8_t const * | cookie | ||
) |
Allocate and initialise sync queries for persistent searches.
Servers implementing https://tools.ietf.org/id/draft-ietf-ldapext-psearch-03.txt
The persisntent search control is defined as
PersistentSearch ::= SEQUENCE { changeTypes INTEGER, changesOnly BOOLEAN returnECs BOOLEAN }
The sync structure is parented off the conn. When the sync is no longer needed, or an error has occurred, it should be freed with talloc_free(), which will result in an ldap_abandon message to the server to tell it to cancel the search.
[in] | conn | Connection to issue the search request on. |
[in] | sync_no | number of the sync in the array of configs. |
[in] | inst | instance of ldap_sync this query relates to. |
[in] | cookie | not applicable to persistent search LDAP servers. |
Definition at line 53 of file persistent_search.c.