The FreeRADIUS server
$Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
|
Go to the source code of this file.
Functions | |
int | rfc4533_sync_init (fr_ldap_connection_t *conn, size_t sync_no, proto_ldap_sync_t const *inst, uint8_t const *cookie) |
Allocate and initialise RFC 4533 sync queries. More... | |
int | rfc4533_sync_intermediate (sync_state_t *sync, LDAPMessage *msg, LDAPControl **ctrls) |
int | rfc4533_sync_refresh_required (sync_state_t *sync, LDAPMessage *msg, LDAPControl **ctrls) |
Handle result code of e-syncRefreshRequired. More... | |
int | rfc4533_sync_search_entry (sync_state_t *sync, LDAPMessage *msg, LDAPControl **ctrls) |
Handle a SearchResultEntry or SearchResultReference response from an RFC 4533 server. More... | |
int | rfc4533_sync_search_result (sync_state_t *sync, LDAPMessage *msg, LDAPControl **ctrls) |
int rfc4533_sync_init | ( | fr_ldap_connection_t * | conn, |
size_t | sync_no, | ||
proto_ldap_sync_t const * | inst, | ||
uint8_t const * | cookie | ||
) |
Allocate and initialise RFC 4533 sync queries.
The Sync Request Control is an LDAP Control [RFC4511] where the controlType is the object identifier 1.3.6.1.4.1.4203.1.9.1.1 and the controlValue, an OCTET STRING, contains a BER-encoded syncRequestValue.
syncRequestValue ::= SEQUENCE { mode ENUMERATED { – 0 unused refreshOnly (1), – 2 reserved refreshAndPersist (3) }, cookie syncCookie OPTIONAL, reloadHint BOOLEAN DEFAULT FALSE }
reloadHint specifies whether we prefer a complete directory load or an eSyncRefreshRequired response when the provided cookie does not give the server a point in its change log from which it can send suitable changes to bring the client into sync. We always send 'false' since we handle eSyncRefreshRequired.
The Sync Request Control is only applicable to the SearchRequest Message.
Definition at line 74 of file rfc4533.c.
int rfc4533_sync_intermediate | ( | sync_state_t * | sync, |
LDAPMessage * | msg, | ||
LDAPControl ** | ctrls | ||
) |
int rfc4533_sync_refresh_required | ( | sync_state_t * | sync, |
LDAPMessage * | msg, | ||
LDAPControl ** | ctrls | ||
) |
Handle result code of e-syncRefreshRequired.
If the server wishes to indicate that a refresh is required, it sends a searchResultDone message with the result code e-syncRefreshRequired result code. Any cookie provided should be used on a query to re-start the sync. If no cookie is provided, the new query should be performed without a cookie to get a full refresh.
[in] | sync | message was associated with. |
[in] | msg | requesting the refresh. |
[in] | ctrls | associated with the msg. |
Definition at line 717 of file rfc4533.c.
int rfc4533_sync_search_entry | ( | sync_state_t * | sync, |
LDAPMessage * | msg, | ||
LDAPControl ** | ctrls | ||
) |
Handle a SearchResultEntry or SearchResultReference response from an RFC 4533 server.
Upon receipt of a search request containing the syncControl the server provides the initial content using zero or more SearchResultEntries followed by a SearchResultdone.
Each SearchResultEntry includes a Sync State control with state set to add, an entryUUID containing the entry's UUID, and no cookie.
For refreshAndPersist operations SearchResultEntries are also used after the refresh phase to inform clients of changes to entries within the scope of the search request.
The Sync State Control is an LDAP Control where the controlType is the object identifier 1.3.6.1.4.1.4203.1.9.1.2 and the controlValue, an OCTET STRING. It contains a BER-encoded syncStateValue.
syncStateValue ::= SEQUENCE { state ENUMERATED { present (0), add (1), modify (2), delete (3) }, entryUUID syncUUID, cookie syncCookie OPTIONAL }
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 260 of file rfc4533.c.
int rfc4533_sync_search_result | ( | sync_state_t * | sync, |
LDAPMessage * | msg, | ||
LDAPControl ** | ctrls | ||
) |