diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/smtpd/config.c | 11 | ||||
-rw-r--r-- | usr.sbin/smtpd/makemap.c | 14 | ||||
-rw-r--r-- | usr.sbin/smtpd/smtpctl/Makefile | 4 |
3 files changed, 18 insertions, 11 deletions
diff --git a/usr.sbin/smtpd/config.c b/usr.sbin/smtpd/config.c index 9dd67c43084..88d78d30eeb 100644 --- a/usr.sbin/smtpd/config.c +++ b/usr.sbin/smtpd/config.c @@ -1,4 +1,4 @@ -/* $OpenBSD: config.c,v 1.41 2018/06/18 18:19:14 gilles Exp $ */ +/* $OpenBSD: config.c,v 1.42 2018/07/03 01:34:43 mortimer Exp $ */ /* * Copyright (c) 2008 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -283,6 +283,8 @@ purge_config(uint8_t what) } } +#ifndef CONFIG_MINIMUM + void config_process(enum smtp_proc_type proc) { @@ -325,3 +327,10 @@ config_peer(enum smtp_proc_type proc) mproc_enable(p); } + +#else + +void config_process(enum smtp_proc_type proc) {} +void config_peer(enum smtp_proc_type proc) {} + +#endif diff --git a/usr.sbin/smtpd/makemap.c b/usr.sbin/smtpd/makemap.c index d4c34479404..51c475e64a1 100644 --- a/usr.sbin/smtpd/makemap.c +++ b/usr.sbin/smtpd/makemap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: makemap.c,v 1.70 2018/06/16 19:41:26 gilles Exp $ */ +/* $OpenBSD: makemap.c,v 1.71 2018/07/03 01:34:43 mortimer Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@poolp.org> @@ -53,8 +53,7 @@ static int make_aliases(DBT *, char *); static char *conf_aliases(char *); static int dump_db(const char *, DBTYPE); -struct smtpd smtpd; -struct smtpd *env = &smtpd; +struct smtpd *env; char *source; static int mode; @@ -67,12 +66,6 @@ enum output_type { /* * Stub functions so that makemap compiles using minimum object files. */ -void -purge_config(uint8_t what) -{ - memset(env, 0, sizeof(struct smtpd)); -} - int fork_proc_backend(const char *backend, const char *conf, const char *procname) { @@ -92,6 +85,9 @@ makemap(int prog_mode, int argc, char *argv[]) char *p; int fd = -1; + if ((env = config_default()) == NULL) + err(1, NULL); + log_init(1, LOG_MAIL); mode = prog_mode; diff --git a/usr.sbin/smtpd/smtpctl/Makefile b/usr.sbin/smtpd/smtpctl/Makefile index 73d990fdf86..ef8148be8c9 100644 --- a/usr.sbin/smtpd/smtpctl/Makefile +++ b/usr.sbin/smtpd/smtpctl/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.46 2018/01/06 07:59:27 sunil Exp $ +# $OpenBSD: Makefile,v 1.47 2018/07/03 01:34:43 mortimer Exp $ .PATH: ${.CURDIR}/.. @@ -19,6 +19,7 @@ CFLAGS+= -Wshadow -Wpointer-arith -Wcast-qual CFLAGS+= -Wsign-compare CFLAGS+= -Werror-implicit-function-declaration CFLAGS+= -DNO_IO +CFLAGS+= -DCONFIG_MINIMUM YFLAGS= SRCS= enqueue.c @@ -35,6 +36,7 @@ SRCS+= compress_gzip.c SRCS+= to.c SRCS+= expand.c SRCS+= tree.c +SRCS+= config.c SRCS+= dict.c SRCS+= aliases.c SRCS+= limit.c |