log virtual server (patch)
Hi, I attached a patch which appends the name of the virtual-server to the auth-logging entries. Any chance to get this commited? thanx, bye, Michi --- auth.c.orig 2008-06-02 10:52:53.000000000 +0200 +++ auth.c 2008-06-02 12:02:03.000000000 +0200 @@ -117,19 +117,21 @@ } if (goodpass) { - radlog(L_AUTH, "%s: [%s%s%s] (%s)", + radlog(L_AUTH, "%s: [%s%s%s] (%s) (server=%s)", msg, clean_username, request->root->log_auth_goodpass ? "/" : "", request->root->log_auth_goodpass ? clean_password : "", - auth_name(buf, sizeof(buf), request, 1)); + auth_name(buf, sizeof(buf), request, 1), + request->client->server ? request->client->server : ""); } else { - radlog(L_AUTH, "%s: [%s%s%s] (%s)", + radlog(L_AUTH, "%s: [%s%s%s] (%s) (server=%s)", msg, clean_username, request->root->log_auth_badpass ? "/" : "", request->root->log_auth_badpass ? clean_password : "", - auth_name(buf, sizeof(buf), request, 1)); + auth_name(buf, sizeof(buf), request, 1), + request->client->server ? request->client->server : ""); }
Michael Bretterklieber wrote:
I attached a patch which appends the name of the virtual-server to the auth-logging entries. Any chance to get this commited?
I'd prefer to make the log string completely flexible, and read in from the configuration files. That would eliminate the need for further source code patches in this area. Alan DeKok.
Hi, Alan DeKok wrote:
Michael Bretterklieber wrote:
I attached a patch which appends the name of the virtual-server to the auth-logging entries. Any chance to get this commited?
I'd prefer to make the log string completely flexible, and read in from the configuration files. That would eliminate the need for further source code patches in this area.
sounds reasonable. could you give me please some hints? should this string be something like: '%{User-Name} %{Server-Name}', using xlat? Inside which section of the configfile should it reside, the log {} section? log { log_auth_format = '%{User-Name} %{Server-Name} ...'; } thanx, bye, Michi
Michael Bretterklieber wrote:
could you give me please some hints? should this string be something like: '%{User-Name} %{Server-Name}', using xlat?
It should start off being the same format as is currently in rad_authlog.
Inside which section of the configfile should it reside, the log {} section? log { log_auth_format = '%{User-Name} %{Server-Name} ...'; }
I'd say: log { auth_accept_message = ... auth_reject_message = ... } On the other hand, if there's a lot of "auth_*" things, it may be worth putting them into a subsection of the "log" section, and stripping off the "auth_" prefix. But that can be done later. Alan DeKok.
On Mon 23 Jun 2008, Alan DeKok wrote:
Michael Bretterklieber wrote:
could you give me please some hints? should this string be something like: '%{User-Name} %{Server-Name}', using xlat?
It should start off being the same format as is currently in rad_authlog.
Inside which section of the configfile should it reside, the log {} section? log { log_auth_format = '%{User-Name} %{Server-Name} ...'; }
I'd say:
log { auth_accept_message = ... auth_reject_message = ... }
On the other hand, if there's a lot of "auth_*" things, it may be worth putting them into a subsection of the "log" section, and stripping off the "auth_" prefix. But that can be done later.
You may wish to have a look at rlm_acctlog :-) Regards -- Peter Nixon http://peternixon.net/
On Sun 29 Jun 2008, Alan DeKok wrote:
Peter Nixon wrote:
You may wish to have a look at rlm_acctlog :-)
Hmm... good point.
And rlm_linelog, and rlm_sql_log.
Yep :-)
We should probably replace those 3 modules with one: rlm_log. That would simplify the code, and make the logging more flexible.
I personally think that rlm_acctlog is rather neat (and we spent a decent amount of time writing and debugging it), but as long as there is another way to do exactly the same thing its ok with me. (I use it on a rather large production deployment with other logging and reporting systems that rely on its output) Cheers -- Peter Nixon http://peternixon.net/
participants (3)
-
Alan DeKok -
Michael Bretterklieber -
Peter Nixon