X-Git-Url: http://git.jankratochvil.net/?p=tac_plus.git;a=blobdiff_plain;f=default_v0_fn.c;h=7c4c9cbcdd2a4beb393ceb95dfd524f5569c6535;hp=96e0c1df9827a8c569ff7815adeb20b4d02f1153;hb=413c510553a773cd16e2b538e4a208b4c4d9f775;hpb=a296ccf128acec69a7db2312ebcc231cd18e5944 diff --git a/default_v0_fn.c b/default_v0_fn.c index 96e0c1d..7c4c9cb 100644 --- a/default_v0_fn.c +++ b/default_v0_fn.c @@ -17,8 +17,23 @@ FITNESS FOR A PARTICULAR PURPOSE. */ + #include "tac_plus.h" + +#include +#include + +#include "default_v0_fn.h" #include "expire.h" +#include "utils.h" +#include "report.h" +#include "pwlib.h" +#include "choose_authen.h" /* for "struct authen_data" */ +#include "do_author.h" /* for "struct identity" */ +#include "packet.h" +#include "main.h" +#include "cfgfile.h" + /* internal state variables */ #define STATE_AUTHEN_START 0 /* no requests issued */ @@ -45,6 +60,8 @@ struct private_data { * Return 0 if data->status is valid, otherwise 1 */ +int default_v0_fn TAC_ARGS((struct authen_data *data)); + int default_v0_fn(data) struct authen_data *data; @@ -97,7 +114,7 @@ struct authen_data *data; default: /* something awful has happened. Give up and die */ - report(LOG_ERR, "%s: default_fn bad state %d", + report(LOG_ERR, "%s: default_fn bad state %d", session.peer, p->state); return (1); } @@ -136,7 +153,7 @@ struct authen_data *data; /* Never authenticate this user. It's for authorization only */ data->status = TAC_PLUS_AUTHEN_STATUS_FAIL; if (debug) { - report(LOG_DEBUG, + report(LOG_DEBUG, "authentication query for '%s' %s from %s rejected", name && name[0] ? name : "unknown", session.port, session.peer); @@ -164,7 +181,7 @@ struct authen_data *data; default: data->status = TAC_PLUS_AUTHEN_STATUS_ERROR; - report(LOG_ERR, "%s: Bogus service value %d from packet", + report(LOG_ERR, "%s: Bogus service value %d from packet", session.peer, data->service); break; } @@ -185,4 +202,3 @@ struct authen_data *data; return (1); } } -