projects
/
freeradius.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
feedda8
)
Add message from ntlm_auth to Module-Failure-Message
author
Alan T. DeKok
<aland@freeradius.org>
Fri, 10 Sep 2010 14:40:18 +0000
(16:40 +0200)
committer
Alan T. DeKok
<aland@freeradius.org>
Tue, 14 Sep 2010 00:33:30 +0000
(
02:33
+0200)
src/modules/rlm_mschap/rlm_mschap.c
patch
|
blob
|
history
diff --git
a/src/modules/rlm_mschap/rlm_mschap.c
b/src/modules/rlm_mschap/rlm_mschap.c
index
7cd9874
..
584f0a0
100644
(file)
--- a/
src/modules/rlm_mschap/rlm_mschap.c
+++ b/
src/modules/rlm_mschap/rlm_mschap.c
@@
-704,7
+704,24
@@
static int do_mschap(rlm_mschap_t *inst,
buffer, sizeof(buffer),
NULL, NULL, 1);
if (result != 0) {
buffer, sizeof(buffer),
NULL, NULL, 1);
if (result != 0) {
+ char *p;
+ VALUE_PAIR *vp = NULL;
+
RDEBUG2("External script failed.");
RDEBUG2("External script failed.");
+
+ vp = pairmake("Module-Failure-Message", "", T_OP_EQ);
+ if (!vp) {
+ radlog_request(L_ERR, 0, request, "No memory to allocate Module-Failure-Message");
+ return RLM_MODULE_FAIL;
+ }
+
+ p = strchr(buffer, '\n');
+ if (p) *p = '\0';
+ snprintf(vp->vp_strvalue, sizeof(vp->vp_strvalue),
+ "%s: External script says %s",
+ inst->xlat_name, buffer);
+ vp->length = strlen(vp->vp_strvalue);
+ pairadd(&request->reply->vps, vp);
return -1;
}
return -1;
}