Hello,

I have created a simple patch that standardises the log output for the
kerberos module with other modules.

If it could be included that would be great.

Regards
Allister


--- rlm_krb5.orig       Fri Apr 11 16:26:04 2003
+++ rlm_krb5.c  Sun Apr 13 19:48:31 2003
@@ -156,6 +156,9 @@
        krb5_context context = *(krb5_context *) instance; /* copy data
*/
        const char *user, *pass;

+       VALUE_PAIR *module_fmsg_vp;
+       char module_fmsg[MAX_STRING_LEN];
+
        /*
         *      We can only authenticate user requests which HAVE
         *      a User-Name attribute.
@@ -233,8 +236,11 @@

        if ( (r = krb5_get_in_tkt_with_password(context,
                0, NULL, NULL, NULL, pass, ccache, &kcreds, 0)) ) {
-               radlog(L_AUTH, "rlm_krb5: [%s] krb5_g_i_t_w_p failed:
%s",
+               DEBUG("rlm_krb5: [%s] krb5_g_i_t_w_p failed: %s",
                        user, error_message(r));
+               snprintf(module_fmsg,sizeof(module_fmsg),"rlm_krb5: %s",
error_message(r));
+               module_fmsg_vp = pairmake("Module-Failure-Message",
module_fmsg, T_OP_EQ);
+               pairadd(&request->packet->vps, module_fmsg_vp);
                krb5_free_cred_contents(context, &kcreds);
                krb5_cc_destroy(context, ccache);
                return RLM_MODULE_REJECT;

-
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to