summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libexec/spamd/Makefile4
-rw-r--r--libexec/spamd/spamd.c59
2 files changed, 40 insertions, 23 deletions
diff --git a/libexec/spamd/Makefile b/libexec/spamd/Makefile
index b65d71caf91..cf851f9479f 100644
--- a/libexec/spamd/Makefile
+++ b/libexec/spamd/Makefile
@@ -1,10 +1,10 @@
-# $OpenBSD: Makefile,v 1.3 2003/03/02 19:21:59 beck Exp $
+# $OpenBSD: Makefile,v 1.4 2003/03/02 23:55:11 cloder Exp $
PROG= spamd
SRCS= spamd.c sdl.c
MAN= spamd.8 spamd-setup.8
-CFLAGS+= -Wall -Werror
+CFLAGS+= -Wall -Werror -Wstrict-prototypes -ansi
afterinstall:
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index 10ec702c25a..9ffe5efe444 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.16 2003/03/02 23:04:35 kjell Exp $ */
+/* $OpenBSD: spamd.c,v 1.17 2003/03/02 23:55:11 cloder Exp $ */
/*
* Copyright (c) 2002 Theo de Raadt. All rights reserved.
@@ -44,26 +44,6 @@
#include "sdl.h"
-char hostname[MAXHOSTNAMELEN];
-struct syslog_data sdata = SYSLOG_DATA_INIT;
-char *reply = NULL;
-char *nreply = "450";
-char *spamd = "spamd IP-based SPAM blocker";
-
-extern struct sdlist *blacklists;
-
-int conffd = -1;
-char *cb;
-size_t cbs, cbu;
-
-time_t t;
-
-#define MAXCON 200
-int maxcon = MAXCON;
-int clients;
-int debug;
-#define MAXTIME 400
-
struct con {
int fd;
int state;
@@ -93,6 +73,43 @@ struct con {
int ol;
} *con;
+void usage(void);
+char *grow_obuf(struct con *, int);
+int parse_configline(char *);
+void parse_configs(void);
+void do_config(void);
+int append_error_string (struct con *, size_t, char *, int, void *);
+void build_reply(struct con *);
+void doreply(struct con *);
+void setlog(char *, int, char *);
+void initcon(struct con *, int, struct sockaddr_in *);
+void closecon(struct con *);
+int match(char *, char *);
+void nextstate(struct con *);
+void handler(struct con *);
+void handlew(struct con *, int one);
+
+char hostname[MAXHOSTNAMELEN];
+struct syslog_data sdata = SYSLOG_DATA_INIT;
+char *reply = NULL;
+char *nreply = "450";
+char *spamd = "spamd IP-based SPAM blocker";
+
+extern struct sdlist *blacklists;
+
+int conffd = -1;
+char *cb;
+size_t cbs, cbu;
+
+time_t t;
+
+#define MAXCON 200
+int maxcon = MAXCON;
+int clients;
+int debug;
+#define MAXTIME 400
+
+
void
usage(void)
{