-/*
+/*
Copyright (c) 1995-1998 by Cisco systems, Inc.
Permission to use, copy, modify, and distribute this software for
FITNESS FOR A PARTICULAR PURPOSE.
*/
+
#include "tac_plus.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#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 */
int state;
};
+static void enable TAC_ARGS((char *passwd, struct authen_data *data));
+
static void
enable(passwd, data)
char *passwd;
* 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;
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;
}