X-Git-Url: http://git.jankratochvil.net/?p=tac_plus.git;a=blobdiff_plain;f=enable.c;h=3e56c924d3b9ed48bcf8264be32dc09aed0f1597;hp=63a17eb2a1f124826e8ed39cb4cacb16bd087dee;hb=HEAD;hpb=a4d53c2fe3dc1952c7c7d8a4283545389ba5aa64 diff --git a/enable.c b/enable.c index 63a17eb..3e56c92 100644 --- a/enable.c +++ b/enable.c @@ -1,4 +1,4 @@ -/* +/* Copyright (c) 1995-1998 by Cisco systems, Inc. Permission to use, copy, modify, and distribute this software for @@ -17,8 +17,23 @@ FITNESS FOR A PARTICULAR PURPOSE. */ + #include "tac_plus.h" + +#include +#include + +#include "enable.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 */ @@ -30,6 +45,8 @@ struct private_data { int state; }; +static void enable TAC_ARGS((char *passwd, struct authen_data *data)); + static void enable(passwd, data) char *passwd; @@ -84,6 +101,8 @@ struct authen_data *data; * Return 0 if data->status is valid, otherwise 1 */ +int enable_fn TAC_ARGS((struct authen_data *data)); + int enable_fn(data) struct authen_data *data; @@ -157,14 +176,14 @@ struct authen_data *data; name && name[0] ? name : "unknown", data->NAS_id->NAS_port && data->NAS_id->NAS_port[0] ? data->NAS_id->NAS_port : "unknown", - session.peer, + session.peer, (data->status == TAC_PLUS_AUTHEN_STATUS_PASS) ? "accepted" : "rejected"); } break; 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; }