*/
if (query->referral) referral_url = query->referral->referral_url;
- /*
- * Queries can be from parsed URLs, if so point at the relevant
- * parts of the parsed structure
- */
- if (query->ldap_url) {
- query->dn = query->ldap_url->lud_dn;
- memcpy(&query->search.attrs, &query->ldap_url->lud_attrs, sizeof(query->search.attrs));
- query->search.scope = query->ldap_url->lud_scope;
- query->search.filter = query->ldap_url->lud_filter;
-
- /*
- * Parsing LDAP server extensions from the URL is only
- * possible once we know which conneciton the query will be
- * handled by as the conneciton handle is used by the parsing
- * function.
- */
- if (query->ldap_url->lud_exts) {
- LDAPControl *serverctrls[LDAP_MAX_CONTROLS];
- int i;
-
- if (fr_ldap_parse_url_extensions(serverctrls, query->request,
- ldap_conn, query->ldap_url->lud_exts) < 0) {
- error:
- fr_trunk_request_signal_fail(query->treq);
- return;
- }
- for (i = 0; i < LDAP_MAX_CONTROLS; i++) {
- if (!serverctrls[i]) break;
- query->serverctrls[i].control = serverctrls[i];
- query->serverctrls[i].freeit = true;
- }
- }
- }
-
POPULATE_LDAP_CONTROLS(our_serverctrls, query->serverctrls);
POPULATE_LDAP_CONTROLS(our_clientctrls, query->clientctrls);