Alejandro Galue wrote:
> To reject users:
>
> Reply-Message := 'You can not login now'
> And the exit code is 1
>
> PROBLEM:
>
> BUT, Reply-Message on Access-Reject is not modified.
> The Reject Message does not contain any attributes.
According to me it's a bug and I have been submitted patches several times.
I think it's not being accepted because I don't know how to send text mail
with real tabs :(
Here's my patch that solves this for 1.0.0:
--- src/main/auth.c.orig 2004-08-10 23:13:25.000000000 +0000
+++ src/main/auth.c 2004-08-10 23:14:18.000000000 +0000
@@ -886,18 +886,15 @@
* fork/exec errors, or >0 if the exec'ed program
* had a non-zero exit status.
*/
- if (umsg[0] == '\0') {
- user_msg = "\r\nAccess denied (external check failed).";
- } else {
- user_msg = &umsg[0];
+ if (r < 0) {
+ user_msg = "Access denied (external check failed)";
+ tmp = pairmake("Reply-Message", user_msg, T_OP_SET);
+ pairadd(&request->reply->vps, tmp);
}
request->reply->code = PW_AUTHENTICATION_REJECT;
- tmp = pairmake("Reply-Message", user_msg, T_OP_SET);
-
- pairadd(&request->reply->vps, tmp);
rad_authlog("Login incorrect (external check failed)",
- request, 0);
+ request, 1);
return RLM_MODULE_REJECT;
}
--
Regards,
Thor Spruyt
E: [EMAIL PROTECTED]
W: www.thor-spruyt.com
M: +32 (0)475 67 22 65
-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html