char *auth_name(char *buf, size_t buflen, REQUEST *request, bool do_cli);
int rad_authenticate (REQUEST *);
int rad_postauth(REQUEST *);
-int rad_virtual_server(REQUEST *);
+int rad_virtual_server(REQUEST *, bool check_username);
/* exec.c */
pid_t radius_start_program(char const *cmd, REQUEST *request, bool exec_wait,
* Run a virtual server auth and postauth
*
*/
-int rad_virtual_server(REQUEST *request)
+int rad_virtual_server(REQUEST *request, bool check_username)
{
VALUE_PAIR *vp;
int result;
/*
* Complain about possible issues related to tunnels.
*/
- if (request->parent && request->parent->username && request->username) {
+ if (request->parent && request->parent->username && request->username && check_username) {
/*
* Look at the full User-Name with realm.
*/
fclose(fp);
}
- rad_virtual_server(request);
+ rad_virtual_server(request, true);
if (!output_file || (strcmp(output_file, "-") == 0)) {
fp = stdout;
fake->server = "channel_bindings";
fake->packet->code = PW_CODE_ACCESS_REQUEST;
- switch (rad_virtual_server(fake)) {
+ switch (rad_virtual_server(fake, true)) {
/* If rad_authenticate succeeded, build a reply */
case RLM_MODULE_OK:
case RLM_MODULE_HANDLED:
{ NULL, 0}
};
-int rad_virtual_server(REQUEST UNUSED *request)
+int rad_virtual_server(REQUEST UNUSED *request, bool UNUSED check_username)
{
/*We're not the server so we cannot do this*/
abort();
rad_assert(!reply->vps);
}
break;
-
+
default:
break;
}
* Call authentication recursively, which will
* do PAP, CHAP, MS-CHAP, etc.
*/
- rad_virtual_server(fake);
+ rad_virtual_server(fake, true);
/*
* Decide what to do with the reply.
fake->reply = NULL;
request->proxy->dst_port = 0; /* hacks for state.c lookups */
-
+
/*
* And we're done with this request.
*/
fake->server = t->soh_virtual_server;
}
RDEBUG("Sending SoH request to server %s", fake->server ? fake->server : "NULL");
- rad_virtual_server(fake);
+ rad_virtual_server(fake, true);
if (fake->reply->code != PW_CODE_ACCESS_ACCEPT) {
RDEBUG2("SoH was rejected");
* Call authentication recursively, which will
* do PAP, CHAP, MS-CHAP, etc.
*/
- rad_virtual_server(fake);
+ rad_virtual_server(fake, true);
/*
* Note that we don't do *anything* with the reply
* Call authentication recursively, which will
* do PAP, CHAP, MS-CHAP, etc.
*/
- rad_virtual_server(fake);
+ rad_virtual_server(fake, true);
/*
* Decide what to do with the reply.
}
RDEBUG2("Validating certificate");
- rad_virtual_server(fake);
+ rad_virtual_server(fake, false);
/* copy the reply vps back to our reply */
fr_pair_list_mcopy_by_num(request->reply, &request->reply->vps,
* Call authentication recursively, which will
* do PAP, CHAP, MS-CHAP, etc.
*/
- rad_virtual_server(fake);
+ rad_virtual_server(fake, true);
/*
* Decide what to do with the reply.