-/*
+/*
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 <netinet/in.h> /* for ntohl() */
+
+#include "author.h"
+#include "report.h"
+#include "packet.h"
+#include "utils.h"
+#include "do_author.h"
+#include "main.h"
+#include "cfgfile.h"
+
+
/*
* Come here when we receive an authorization START packet
*/
+void author TAC_ARGS((u_char *pak));
+
void
author(pak)
u_char *pak;
u_char *p;
u_char *argsizep;
char **cmd_argp;
- int i, len;
+ int i;
+ unsigned long len;
if (debug & DEBUG_AUTHOR_FLAG)
report(LOG_DEBUG, "Start authorization request");
len += p[i];
}
- if (len != ntohl(hdr->datalength)) {
+ if (len != (unsigned long) ntohl(hdr->datalength)) {
send_error_reply(TAC_PLUS_AUTHOR, NULL);
return;
}
identity.priv_lvl = apak->priv_lvl;
+ cfg_request_identity(&identity);
+
/* The author_data structure */
author_data.id = &identity; /* user id */
if (author_data.input_args) {
for (i = 0; i < author_data.num_in_args; i++)
free(author_data.input_args[i]);
-
+
free(author_data.input_args);
author_data.input_args = NULL;
}