]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
If we've got a cookie, send it back
authorNick Porter <nick@portercomputing.co.uk>
Fri, 8 Dec 2023 14:02:40 +0000 (14:02 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 8 Dec 2023 14:32:50 +0000 (14:32 +0000)
Relying on the rcode does not match any other encoders.  If we need to
make the cookie return optional, it should be based on
request->reply->code

src/listen/ldap_sync/proto_ldap_sync.c

index 6917ebbacf07c5c05c296a9f6521050aef4b0090..c814e043d34e1c7d02b4630e175cdedecfd779ed 100644 (file)
@@ -216,11 +216,6 @@ static ssize_t mod_encode(UNUSED void const *instance, request_t *request, uint8
         */
        if (request->reply->code != FR_LDAP_SYNC_CODE_COOKIE_LOAD_RESPONSE) goto send;
 
-       /*
-        *      We only return the cookie if the section exited "ok" or "updated"
-        */
-       if ((request->rcode != RLM_MODULE_OK) && (request->rcode != RLM_MODULE_UPDATED)) goto send;
-
        vp = fr_pair_find_by_da_nested(&request->reply_pairs, NULL, attr_ldap_sync_cookie);
        if ((vp) && (vp->data.vb_length > 0)) {
                fr_pair_remove(&request->reply_pairs, vp);