#include <sys/param.h>
#include <netdb.h>
+#include "msntauth.h"
+#include "valid.h"
+
#define CONFIGFILE "/usr/local/squid/etc/msntauth.conf" /* Path to configuration file */
#define DENYUSERSDEFAULT "/usr/local/squid/etc/denyusers"
#define ALLOWUSERSDEFAULT "/usr/local/squid/etc/allowusers"
/* Declarations */
-int OpenConfigFile();
-void ProcessLine(char *);
-void AddServer(char *, char *, char *);
-int QueryServers(char *, char *);
-int QueryServerForUser(int, char *, char *);
-extern int Valid_User(char *, char *, char *, char *, char *);
-
+static void ProcessLine(char *);
+static void AddServer(char *, char *, char *);
+static int QueryServerForUser(int, char *, char *);
/*
* Opens and reads the configuration file.
*/
int
-OpenConfigFile()
+OpenConfigFile(void)
{
FILE *ConfigFile;
char Confbuf[2049]; /* Line reading buffer */
/* Parses a configuration file line. */
-void
+static void
ProcessLine(char *Linebuf)
{
char *Directive;
void
AddServer(char *ParamPDC, char *ParamBDC, char *ParamDomain)
{
- struct hostent *hstruct;
-
if (Serversqueried + 1 > MAXSERVERS) {
syslog(LOG_USER | LOG_ERR, "AddServer: Ignoring '%s' server line; too many servers.", ParamPDC);
return;
#include <syslog.h>
#include <sys/time.h>
-#define MSNTVERSION "Msntauth v2.0.3 (C) 2 Sep 2001 Stellar-X Antonino Iannella."
+#include "msntauth.h"
-extern int OpenConfigFile();
-extern int QueryServers(char *, char *);
-extern void Checktimer();
-extern void Check_forchange();
-extern int Read_denyusers(void);
-extern int Read_allowusers(void);
-extern int Check_user(char *);
+extern char version[];
+char msntauth_version[] = "Msntauth v2.0.3 (C) 2 Sep 2001 Stellar-X Antonino Iannella.";
/* Main program for simple authentication.
* Reads the denied user file. Sets alarm timer.
char username[256];
char password[256];
char wstr[256];
- char ver[100];
-
- /* Hidden way to imbed the authenticator release version */
- strcpy(ver, MSNTVERSION);
/* Read configuration file. Abort wildly if error. */
if (OpenConfigFile() == 1)
--- /dev/null
+extern int OpenConfigFile(void);
+extern int QueryServers(char *, char *);
+extern void Checktimer(void);
+extern void Check_forchange();
+extern int Read_denyusers(void);
+extern int Read_allowusers(void);
+extern int Check_user(char *);
+extern int QueryServers(char *, char *);