diff --git a/FILES b/FILES deleted file mode 100644 index 5ae3b68..0000000 --- a/FILES +++ /dev/null @@ -1,445 +0,0 @@ -BLURB -BLURB2 -BLURB3 -BLURB4 -README -FAQ -INSTALL -INSTALL.alias -INSTALL.ctl -INSTALL.ids -INSTALL.maildir -INSTALL.mbox -INSTALL-1.03 -INSTALL.vsm -REMOVE.sendmail -REMOVE.binmail -TEST.deliver -TEST.receive -UPGRADE -THOUGHTS -TODO -THANKS -CHANGES -SECURITY -INTERNALS -SENDMAIL -PIC.local2alias -PIC.local2ext -PIC.local2local -PIC.local2rem -PIC.local2virt -PIC.nullclient -PIC.relaybad -PIC.relaygood -PIC.rem2local -FILES -VERSION -SYSDEPS -TARGETS -Makefile -BIN.README -BIN.Makefile -idedit.c -conf-break -auto_break.h -conf-spawn -auto_spawn.h -chkspawn.c -conf-split -auto_split.h -conf-patrn -auto_patrn.h -conf-users -conf-groups -auto_uids.h -auto_usera.h -extra.h -addresses.5 -except.1 -bouncesaying.1 -condredirect.1 -dot-qmail.9 -envelopes.5 -forgeries.7 -forward.1 -maildir2mbox.1 -maildirmake.1 -maildirwatch.1 -mailsubj.1 -mbox.5 -preline.1 -qbiff.1 -qmail-clean.8 -qmail-command.8 -qmail-control.9 -qmail-getpw.9 -qmail-header.5 -qmail-inject.8 -qmail-limits.9 -qmail-local.8 -qmail-log.5 -qmail-lspawn.8 -qmail-newmrh.9 -qmail-newu.9 -qmail-pop3d.8 -qmail-popup.8 -qmail-pw2u.9 -qmail-qmqpc.8 -qmail-qmqpd.8 -qmail-qmtpd.8 -qmail-qread.8 -qmail-qstat.8 -qmail-queue.8 -qmail-remote.8 -qmail-rspawn.8 -qmail-send.9 -qmail-showctl.8 -qmail-smtpd.8 -qmail-start.9 -qmail-tcpok.8 -qmail-tcpto.8 -qmail-users.9 -qmail.7 -qreceipt.1 -splogger.8 -tcp-env.1 -config.sh -config-fast.sh -qmail-clean.c -qmail-getpw.c -qmail-inject.c -qmail-local.c -qmail-lspawn.c -qmail-newmrh.c -qmail-newu.c -qmail-pop3d.c -qmail-popup.c -qmail-pw2u.c -qmail-qmqpc.c -qmail-qmqpd.c -qmail-qmtpd.c -qmail-qread.c -qmail-qstat.sh -qmail-queue.c -qmail-remote.c -qmail-rspawn.c -qmail-send.c -qmail-showctl.c -qmail-smtpd.c -qmail-start.c -qmail-tcpok.c -qmail-tcpto.c -spawn.c -dnscname.c -dnsfq.c -dnsip.c -dnsmxip.c -dnsptr.c -dnstxt.c -spfquery.c -hostname.c -ipmeprint.c -tcp-env.c -sendmail.c -qreceipt.c -qsmhook.c -qbiff.c -forward.c -preline.c -predate.c -except.c -bouncesaying.c -condredirect.c -maildirmake.c -maildir2mbox.c -maildirwatch.c -splogger.c -qail.sh -elq.sh -pinq.sh -qmail-upq.sh -datemail.sh -mailsubj.sh -qlx.h -rcpthosts.h -rcpthosts.c -commands.h -commands.c -dnsdoe.h -dnsdoe.c -fmtqfn.h -fmtqfn.c -gfrom.h -gfrom.c -myctime.h -myctime.c -newfield.h -newfield.c -qsutil.h -qsutil.c -readsubdir.h -readsubdir.c -received.h -received.c -tcpto.h -tcpto.c -tcpto_clean.c -trigger.h -trigger.c -triggerpull.h -triggerpull.c -trynpbg1.c -trysyslog.c -conf-cc -conf-ld -home.sh -home+df.sh -proc.sh -proc+df.sh -binm1.sh -binm2.sh -binm3.sh -binm1+df.sh -binm2+df.sh -binm3+df.sh -find-systype.sh -make-compile.sh -make-load.sh -make-makelib.sh -trycpp.c -warn-auto.sh -auto-str.c -auto-int.c -auto-int8.c -auto-gid.c -auto-uid.c -hier.c -install.c -instcheck.c -install-big.c -alloc.3 -alloc.h -alloc.c -alloc_re.c -case.3 -case.h -case_diffb.c -case_diffs.c -case_lowerb.c -case_lowers.c -case_starts.c -cdb.3 -cdb.h -cdb_hash.c -cdb_seek.c -cdb_unpack.c -cdbmake.h -cdbmake_add.c -cdbmake_hash.c -cdbmake_pack.c -cdbmss.h -cdbmss.c -coe.3 -coe.h -coe.c -fd.h -fd_copy.3 -fd_copy.c -fd_move.3 -fd_move.c -fifo_make.3 -fifo.h -fifo.c -trymkffo.c -fork.h1 -fork.h2 -tryvfork.c -now.3 -now.h -now.c -open.h -open_append.c -open_excl.c -open_read.c -open_trunc.c -open_write.c -seek.h -seek_cur.c -seek_end.c -seek_set.c -seek_trunc.c -conf-qmail -auto_qmail.h -qmail.h -qmail.c -gen_alloc.h -gen_allocdefs.h -stralloc.3 -stralloc.h -stralloc_eady.c -stralloc_pend.c -stralloc_copy.c -stralloc_opyb.c -stralloc_opys.c -stralloc_cat.c -stralloc_catb.c -stralloc_cats.c -stralloc_arts.c -strerr.h -strerr_sys.c -strerr_die.c -substdio.h -substdio.c -substdi.c -substdo.c -substdio_copy.c -subfd.h -subfderr.c -subfdouts.c -subfdout.c -subfdins.c -subfdin.c -readwrite.h -exit.h -timeoutconn.h -timeoutconn.c -timeoutread.h -timeoutread.c -timeoutwrite.h -timeoutwrite.c -remoteinfo.h -remoteinfo.c -uint32.h1 -uint32.h2 -tryulong32.c -wait.3 -wait.h -wait_pid.c -wait_nohang.c -trywaitp.c -sig.h -sig_alarm.c -sig_block.c -sig_catch.c -sig_pause.c -sig_pipe.c -sig_child.c -sig_term.c -sig_hup.c -sig_misc.c -sig_bug.c -trysgact.c -trysgprm.c -env.3 -env.h -env.c -envread.c -byte.h -byte_chr.c -byte_copy.c -byte_cspn.c -byte_cr.c -byte_diff.c -byte_rchr.c -byte_rcspn.c -byte_zero.c -str.h -str_chr.c -str_cpy.c -str_cpyb.c -str_diff.c -str_diffn.c -str_len.c -str_rchr.c -str_start.c -lock.h -lock_ex.c -lock_exnb.c -lock_un.c -tryflock.c -getln.3 -getln.h -getln.c -getln2.3 -getln2.c -sgetopt.3 -sgetopt.h -sgetopt.c -subgetopt.3 -subgetopt.h -subgetopt.c -error.3 -error_str.3 -error_temp.3 -error.h -error.c -error_str.c -error_temp.c -fmt.h -fmt_str.c -fmt_strn.c -fmt_uint.c -fmt_uint0.c -fmt_ulong.c -scan.h -scan_ulong.c -scan_8long.c -slurpclose.h -slurpclose.c -quote.h -quote.c -hfield.h -hfield.c -headerbody.h -headerbody.c -token822.h -token822.c -control.h -control.c -datetime.3 -datetime.h -datetime.c -datetime_un.c -prioq.h -prioq.c -date822fmt.h -date822fmt.c -dns.h -dns.c -spf.h -spf.c -trylsock.c -tryrsolv.c -ip.h -ip.c -ipalloc.h -ipalloc.c -select.h1 -select.h2 -trysysel.c -ndelay.h -ndelay.c -ndelay_off.c -direntry.3 -direntry.h1 -direntry.h2 -trydrent.c -prot.h -prot.c -chkshsgr.c -warn-shsgr -tryshsgr.c -ipme.h -ipme.c -trysalen.c -maildir.5 -maildir.h -maildir.c -tcp-environ.5 -constmap.h -constmap.c -qmail-todo.c -channels.g -conf-channels -CHANNELS diff --git a/Makefile b/Makefile index d80a293..46f6d4e 100644 --- a/Makefile +++ b/Makefile @@ -334,7 +334,7 @@ compile chkuser.c chkuser.h chkuser_settings.h clean: \ TARGETS - rm -f `cat TARGETS` + rm -f `grep -v '^#' TARGETS` coe.o: \ compile coe.c coe.h @@ -1573,7 +1573,7 @@ exit.h ./compile qmail-qread.c qmail-qstat: \ -warn-auto.sh qmail-qstat.sh conf-qmail conf-break conf-split +warn-auto.sh qmail-qstat.sh conf-qmail cat warn-auto.sh qmail-qstat.sh \ | sed s}QMAIL}"`head -1 conf-qmail`"}g \ | sed s}BREAK}"`head -1 conf-break`"}g \ @@ -1950,87 +1950,6 @@ compile sgetopt.c substdio.h subfd.h substdio.h sgetopt.h subgetopt.h \ subgetopt.h ./compile sgetopt.c -shar: \ -FILES BLURB BLURB2 BLURB3 BLURB4 README FAQ INSTALL INSTALL.alias \ -INSTALL.ctl INSTALL.ids INSTALL.maildir INSTALL.mbox INSTALL.vsm \ -REMOVE.sendmail REMOVE.binmail TEST.deliver TEST.receive UPGRADE \ -THOUGHTS TODO THANKS CHANGES SECURITY INTERNALS SENDMAIL \ -PIC.local2alias PIC.local2ext PIC.local2local PIC.local2rem \ -PIC.local2virt PIC.nullclient PIC.relaybad PIC.relaygood \ -PIC.rem2local FILES VERSION SYSDEPS TARGETS Makefile BIN.README \ -BIN.Makefile BIN.setup idedit.c conf-break auto_break.h conf-spawn \ -auto_spawn.h chkspawn.c conf-split auto_split.h conf-patrn \ -auto_patrn.h conf-users conf-groups auto_uids.h auto_usera.h extra.h \ -addresses.5 except.1 bouncesaying.1 condredirect.1 dot-qmail.9 \ -envelopes.5 forgeries.7 forward.1 maildir2mbox.1 maildirmake.1 \ -maildirwatch.1 mailsubj.1 mbox.5 preline.1 qbiff.1 qmail-clean.8 \ -qmail-command.8 qmail-control.9 qmail-getpw.9 qmail-header.5 \ -qmail-inject.8 qmail-limits.9 qmail-local.8 qmail-log.5 \ -qmail-lspawn.8 qmail-newmrh.9 qmail-newu.9 qmail-pop3d.8 \ -qmail-popup.8 qmail-pw2u.9 qmail-qmqpc.8 qmail-qmqpd.8 qmail-qmtpd.8 \ -qmail-qread.8 qmail-qstat.8 qmail-queue.8 qmail-remote.8 \ -qmail-rspawn.8 qmail-send.9 qmail-showctl.8 qmail-smtpd.8 \ -qmail-start.9 qmail-tcpok.8 qmail-tcpto.8 qmail-users.9 qmail.7 \ -qreceipt.1 splogger.8 tcp-env.1 config.sh config-fast.sh \ -qmail-clean.c qmail-getpw.c qmail-inject.c qmail-local.c \ -qmail-lspawn.c qmail-newmrh.c qmail-newu.c qmail-pop3d.c \ -qmail-popup.c qmail-pw2u.c qmail-qmqpc.c qmail-qmqpd.c qmail-qmtpd.c \ -qmail-qread.c qmail-qstat.sh qmail-queue.c qmail-remote.c \ -qmail-rspawn.c qmail-send.c qmail-showctl.c qmail-smtpd.c \ -qmail-start.c qmail-tcpok.c qmail-tcpto.c spawn.c dnscname.c dnsfq.c \ -dnsip.c dnsmxip.c dnsptr.c dnstxt.c hostname.c ipmeprint.c ipmetest.c tcp-env.c \ -sendmail.c qreceipt.c qsmhook.c qbiff.c forward.c preline.c predate.c \ -except.c bouncesaying.c condredirect.c maildirmake.c maildir2mbox.c \ -maildirwatch.c splogger.c qail.sh elq.sh pinq.sh qmail-upq.sh \ -datemail.sh mailsubj.sh qlx.h rcpthosts.h rcpthosts.c commands.h \ -commands.c dnsdoe.h dnsdoe.c fmtqfn.h fmtqfn.c gfrom.h gfrom.c \ -myctime.h myctime.c newfield.h newfield.c qsutil.h qsutil.c \ -readsubdir.h readsubdir.c received.h received.c tcpto.h tcpto.c \ -tcpto_clean.c trigger.h trigger.c triggerpull.h triggerpull.c \ -trynpbg1.c trysyslog.c conf-cc conf-ld home.sh home+df.sh proc.sh \ -proc+df.sh binm1.sh binm2.sh binm3.sh binm1+df.sh binm2+df.sh \ -binm3+df.sh find-systype.sh make-compile.sh make-load.sh \ -make-makelib.sh trycpp.c warn-auto.sh auto-str.c auto-int.c \ -auto-int8.c auto-gid.c auto-uid.c hier.c install.c instcheck.c \ -install-big.c alloc.3 alloc.h alloc.c alloc_re.c case.3 case.h \ -case_diffb.c case_diffs.c case_lowerb.c case_lowers.c case_starts.c \ -cdb.3 cdb.h cdb_hash.c cdb_seek.c cdb_unpack.c cdbmake.h \ -cdbmake_add.c cdbmake_hash.c cdbmake_pack.c cdbmss.h cdbmss.c coe.3 \ -coe.h coe.c fd.h fd_copy.3 fd_copy.c fd_move.3 fd_move.c fifo_make.3 \ -fifo.h fifo.c trymkffo.c fork.h1 fork.h2 tryvfork.c now.3 now.h now.c \ -open.h open_append.c open_excl.c open_read.c open_trunc.c \ -open_write.c seek.h seek_cur.c seek_end.c seek_set.c seek_trunc.c \ -conf-qmail auto_qmail.h qmail.h qmail.c gen_alloc.h gen_allocdefs.h \ -stralloc.3 stralloc.h stralloc_eady.c stralloc_pend.c stralloc_copy.c \ -stralloc_opyb.c stralloc_opys.c stralloc_cat.c stralloc_catb.c \ -stralloc_cats.c stralloc_arts.c strerr.h strerr_sys.c strerr_die.c \ -substdio.h substdio.c substdi.c substdo.c substdio_copy.c subfd.h \ -subfderr.c subfdouts.c subfdout.c subfdins.c subfdin.c readwrite.h \ -exit.h timeoutconn.h timeoutconn.c timeoutread.h timeoutread.c \ -timeoutwrite.h timeoutwrite.c remoteinfo.h remoteinfo.c uint32.h1 \ -uint32.h2 tryulong32.c wait.3 wait.h wait_pid.c wait_nohang.c \ -trywaitp.c sig.h sig_alarm.c sig_block.c sig_catch.c sig_pause.c \ -sig_pipe.c sig_child.c sig_term.c sig_hup.c sig_misc.c sig_bug.c \ -trysgact.c trysgprm.c env.3 env.h env.c envread.c byte.h byte_chr.c \ -byte_copy.c byte_cr.c byte_cspn.c byte_diff.c byte_rchr.c byte_rcspn.c \ -byte_zero.c str.h spf.c spf.h spfquery.c \ -str_chr.c str_cpy.c str_cpyb.c str_diff.c str_diffn.c str_len.c str_rchr.c \ -str_start.c lock.h lock_ex.c lock_exnb.c lock_un.c tryflock.c getln.3 \ -getln.h getln.c getln2.3 getln2.c sgetopt.3 sgetopt.h sgetopt.c \ -subgetopt.3 subgetopt.h subgetopt.c error.3 error_str.3 error_temp.3 \ -error.h error.c error_str.c error_temp.c fmt.h fmt_str.c fmt_strn.c \ -fmt_uint.c fmt_uint0.c fmt_ulong.c scan.h scan_ulong.c scan_8long.c \ -slurpclose.h slurpclose.c quote.h quote.c hfield.h hfield.c \ -headerbody.h headerbody.c token822.h token822.c control.h control.c \ -datetime.3 datetime.h datetime.c datetime_un.c prioq.h prioq.c \ -date822fmt.h date822fmt.c dns.h dns.c trylsock.c tryrsolv.c ip.h ip.c \ -ipalloc.h strsalloc.h ipalloc.c select.h1 select.h2 trysysel.c ndelay.h ndelay.c \ -ndelay_off.c direntry.3 direntry.h1 direntry.h2 trydrent.c prot.h \ -prot.c chkshsgr.c warn-shsgr tryshsgr.c ipme.h ipme.c trysalen.c \ -maildir.5 maildir.h maildir.c tcp-environ.5 constmap.h constmap.c - shar -m `cat FILES` > shar - chmod 400 shar - sig.a: \ makelib sig_alarm.o sig_block.o sig_catch.o sig_pause.o sig_pipe.o \ sig_child.o sig_hup.o sig_term.o sig_bug.o sig_misc.o diff --git a/alloc.c b/alloc.c index e19ff0d..a914c39 100644 --- a/alloc.c +++ b/alloc.c @@ -13,7 +13,7 @@ static aligned realspace[SPACE / ALIGNMENT]; static unsigned int avail = SPACE; /* multiple of ALIGNMENT; 0<=avail<=SPACE */ /*@null@*//*@out@*/char *alloc(n) -unsigned int n; +long unsigned int n; { char *x; if (n >= (INT_MAX >> 3)) { diff --git a/auto-int.c b/auto-int.c index c138869..a0dc991 100644 --- a/auto-int.c +++ b/auto-int.c @@ -7,7 +7,7 @@ char buf1[256]; substdio ss1 = SUBSTDIO_FDBUF(write,1,buf1,sizeof(buf1)); -void puts(s) +void puts2(s) char *s; { if (substdio_puts(&ss1,s) == -1) _exit(111); @@ -30,11 +30,11 @@ char **argv; scan_ulong(value,&num); strnum[fmt_ulong(strnum,num)] = 0; - puts("int "); - puts(name); - puts(" = "); - puts(strnum); - puts(";\n"); + puts2("int "); + puts2(name); + puts2(" = "); + puts2(strnum); + puts2(";\n"); if (substdio_flush(&ss1) == -1) _exit(111); _exit(0); } diff --git a/auto-int8.c b/auto-int8.c index 091978f..db985c1 100644 --- a/auto-int8.c +++ b/auto-int8.c @@ -4,10 +4,12 @@ #include "scan.h" #include "fmt.h" +extern unsigned int scan_8long(char *s, unsigned long *u); + char buf1[256]; substdio ss1 = SUBSTDIO_FDBUF(write,1,buf1,sizeof(buf1)); -void puts(s) +void puts2(s) char *s; { if (substdio_puts(&ss1,s) == -1) _exit(111); @@ -30,11 +32,11 @@ char **argv; scan_8long(value,&num); strnum[fmt_ulong(strnum,num)] = 0; - puts("int "); - puts(name); - puts(" = "); - puts(strnum); - puts(";\n"); + puts2("int "); + puts2(name); + puts2(" = "); + puts2(strnum); + puts2(";\n"); if (substdio_flush(&ss1) == -1) _exit(111); _exit(0); } diff --git a/auto-str.c b/auto-str.c index acc3d60..a95a947 100644 --- a/auto-str.c +++ b/auto-str.c @@ -5,7 +5,7 @@ char buf1[256]; substdio ss1 = SUBSTDIO_FDBUF(write,1,buf1,sizeof(buf1)); -void puts(s) +void puts2(s) char *s; { if (substdio_puts(&ss1,s) == -1) _exit(111); @@ -25,20 +25,20 @@ char **argv; value = argv[2]; if (!value) _exit(100); - puts("char "); - puts(name); - puts("[] = \"\\\n"); + puts2("char "); + puts2(name); + puts2("[] = \"\\\n"); while (ch = *value++) { - puts("\\"); + puts2("\\"); octal[3] = 0; octal[2] = '0' + (ch & 7); ch >>= 3; octal[1] = '0' + (ch & 7); ch >>= 3; octal[0] = '0' + (ch & 7); - puts(octal); + puts2(octal); } - puts("\\\n\";\n"); + puts2("\\\n\";\n"); if (substdio_flush(&ss1) == -1) _exit(111); _exit(0); } diff --git a/bouncesaying.c b/bouncesaying.c index c7d0026..cae5451 100644 --- a/bouncesaying.c +++ b/bouncesaying.c @@ -1,3 +1,4 @@ +#include #include "fork.h" #include "strerr.h" #include "error.h" diff --git a/cdb_seek.c b/cdb_seek.c index f31b87d..675ae1b 100644 --- a/cdb_seek.c +++ b/cdb_seek.c @@ -1,3 +1,4 @@ +#include #include #include #include "cdb.h" diff --git a/chkshsgr.c b/chkshsgr.c index 2bcdade..e94405a 100644 --- a/chkshsgr.c +++ b/chkshsgr.c @@ -1,7 +1,11 @@ +#include +#include #include "exit.h" + void main() { - short x[4]; + gid_t x[4]; + // was short x[4]; x[0] = x[1] = 0; if (getgroups(1,x) == 0) if (setgroups(1,x) == -1) _exit(1); diff --git a/chkuser.c b/chkuser.c index 62da98a..d66eab9 100644 --- a/chkuser.c +++ b/chkuser.c @@ -1,4 +1,3 @@ - /* * * 'chkuser.c' v.2.0.9 @@ -21,10 +20,12 @@ /* required by vpopmail */ #include +#include #include #include #include +#include "case.h" #include "dns.h" #include "env.h" #include "ipme.h" @@ -48,6 +49,9 @@ extern void flush(); extern void out (char *s); +extern int addrallowed(); +extern unsigned int byte_rchr(); +extern int vmaildir_readquota(const char *dir, const char *quota); extern char *remotehost; extern char *remoteip; diff --git a/condredirect.c b/condredirect.c index 732b752..a314e09 100644 --- a/condredirect.c +++ b/condredirect.c @@ -12,6 +12,7 @@ #include "fmt.h" #include "stralloc.h" #include "srs.h" +#include "str.h" #define FATAL "condredirect: fatal: " diff --git a/conf-cc b/conf-cc index d1ff49b..c2babf3 100644 --- a/conf-cc +++ b/conf-cc @@ -1,3 +1,3 @@ -cc -O2 -g -DEXTERNAL_TODO -DTLS=20231230 -I`/bin/sh ./vpopmail-dir.sh`/include +cc -O2 -g -DEXTERNAL_TODO -DTLS=20231230 -I`/bin/sh ./vpopmail-dir.sh`/include -DDEPRECATED_FUNCTIONS_REMOVED This will be used to compile .c files. diff --git a/deprecated.h b/deprecated.h new file mode 100644 index 0000000..6a328c9 --- /dev/null +++ b/deprecated.h @@ -0,0 +1,29 @@ +#ifndef DEPRECATED_H +#define DEPRECATED_H + +/* + * Patch grabbed from notqmail https://github.com/notqmail/notqmail/commit/c3d3c72e3ca7bb5102f710aad7bf9ab105bde27e + * It gets the compiler to get rid of "incompatible redeclaration of library function 'log2'" + * compilation warning. + * + * We sometimes decide certain functions should no longer be called. + * If valuable external patches still call them, we wait to delete them + * until those patches stop being valuable. + * + * In the meantime, we + * + * 1. Mark these functions deprecated, so compilers will warn people + * 2. Optionally define them out of existence, mainly for developer builds + */ + +#ifndef DEPRECATED_FUNCTIONS_REMOVED +#define DEPRECATED_FUNCTIONS_AVAILABLE +#endif + +#if defined(__clang__) || defined(__GNUC__) +#define _deprecated_ __attribute__((deprecated)) +#else +#define _deprecated_ +#endif + +#endif diff --git a/dnsmxip.c b/dnsmxip.c index 6d8e137..de40aa5 100644 --- a/dnsmxip.c +++ b/dnsmxip.c @@ -1,3 +1,4 @@ +#include #include "substdio.h" #include "subfd.h" #include "stralloc.h" diff --git a/except.c b/except.c index c553b3b..4d14da6 100644 --- a/except.c +++ b/except.c @@ -1,3 +1,4 @@ +#include #include "fork.h" #include "strerr.h" #include "wait.h" diff --git a/fd_copy.c b/fd_copy.c index b9f7167..c200d41 100644 --- a/fd_copy.c +++ b/fd_copy.c @@ -1,3 +1,4 @@ +#include #include #include "fd.h" diff --git a/fd_move.c b/fd_move.c index 1aa557f..09c474b 100644 --- a/fd_move.c +++ b/fd_move.c @@ -1,3 +1,4 @@ +#include #include "fd.h" int fd_move(to,from) diff --git a/forward.c b/forward.c index f8eb2c7..f39db8d 100644 --- a/forward.c +++ b/forward.c @@ -8,6 +8,7 @@ #include "fmt.h" #include "stralloc.h" #include "srs.h" +#include "str.h" #define FATAL "forward: fatal: " diff --git a/hier.c b/hier.c index 9e85dfd..a1b026f 100644 --- a/hier.c +++ b/hier.c @@ -4,7 +4,7 @@ #include "auto_uids.h" #include "fmt.h" #include "fifo.h" - +#include "install.h" #include #include "channels.h" diff --git a/idedit.c b/idedit.c index e6747b5..3002ec7 100644 --- a/idedit.c +++ b/idedit.c @@ -15,6 +15,8 @@ int fd; +int wait_pid(int *wstat, int pid); + void byte(pos,value) char *pos; unsigned int value; diff --git a/install-big.c b/install-big.c index 44e7a59..c0135df 100644 --- a/install-big.c +++ b/install-big.c @@ -1,11 +1,11 @@ +#include #include "auto_qmail.h" #include "auto_split.h" #include "auto_uids.h" +#include "channels.h" #include "fmt.h" #include "fifo.h" - -#include -#include "channels.h" +#include "install.h" char buf[100 + FMT_ULONG]; diff --git a/install.c b/install.c index 95034f2..24f6534 100644 --- a/install.c +++ b/install.c @@ -1,3 +1,5 @@ +#include +#include "fifo.h" #include "substdio.h" #include "strerr.h" #include "error.h" diff --git a/install.h b/install.h new file mode 100644 index 0000000..be984f7 --- /dev/null +++ b/install.h @@ -0,0 +1,5 @@ +void d(char *home, char*subdir, int uid, int gid, int mode); +void h(char *home, int uid, int gid, int mode); +void c(char *home, char *subdir, char *file, int uid, int gid, int mode); +void z(char *home, char *file, int len, int uid, int gid, int mode); +void p(char *home, char *fifo, int uid, int gid, int mode); diff --git a/ipme.c b/ipme.c index 53c6958..b66fc2b 100644 --- a/ipme.c +++ b/ipme.c @@ -16,6 +16,10 @@ #include "ipme.h" #include "substdio.h" #include "readwrite.h" +#include "alloc.h" +#include "open.h" +#include "getln.h" +#include "str.h" static int ipmeok = 0; ipalloc ipme = {0}; @@ -23,6 +27,9 @@ ipalloc ipme_mask = {0}; ipalloc notipme = {0}; ipalloc notipme_mask = {0}; +int ipme_match(struct ipalloc *ipa, struct ipalloc *ipa_mask, struct ip_address *ip); +int ipme_readipfile(ipalloc *ipa, ipalloc *ipa_mask, char *fn); + int ipme_is(ip) struct ip_address *ip; { diff --git a/ipmeprint.c b/ipmeprint.c index fd35bf7..0bdd3f0 100644 --- a/ipmeprint.c +++ b/ipmeprint.c @@ -1,3 +1,4 @@ +#include #include "subfd.h" #include "substdio.h" #include "ip.h" diff --git a/ipmetest.c b/ipmetest.c index e87b518..4ad6336 100644 --- a/ipmetest.c +++ b/ipmetest.c @@ -1,3 +1,5 @@ +#include +#include #include "subfd.h" #include "substdio.h" #include "ip.h" diff --git a/maildir.c b/maildir.c index efbd3d4..24996e5 100644 --- a/maildir.c +++ b/maildir.c @@ -1,3 +1,4 @@ +#include #include #include #include "prioq.h" diff --git a/maildir2mbox.c b/maildir2mbox.c index 7364441..63c6546 100644 --- a/maildir2mbox.c +++ b/maildir2mbox.c @@ -1,3 +1,5 @@ +#include "sys/stat.h" +#include #include "readwrite.h" #include "prioq.h" #include "env.h" diff --git a/maildirgetquota.c b/maildirgetquota.c index 1c541f8..5666fce 100644 --- a/maildirgetquota.c +++ b/maildirgetquota.c @@ -13,6 +13,7 @@ #include #include #include +#include int maildir_getquota(const char *dir, char buf[QUOTABUFSIZE]) { diff --git a/maildirmake.c b/maildirmake.c index 9863fef..62ba212 100644 --- a/maildirmake.c +++ b/maildirmake.c @@ -1,3 +1,5 @@ +#include "sys/stat.h" +#include #include "strerr.h" #include "exit.h" diff --git a/maildiropen.c b/maildiropen.c index 25b5eb8..4fd31da 100644 --- a/maildiropen.c +++ b/maildiropen.c @@ -19,6 +19,7 @@ #include #include #include +#include #include "maildirmisc.h" diff --git a/maildirquota.c b/maildirquota.c index 1ca1a1f..6b6bea8 100644 --- a/maildirquota.c +++ b/maildirquota.c @@ -7,6 +7,7 @@ #include "config.h" #endif +#include #include /* #if HAVE_DIRENT_H */ #include diff --git a/newfield.c b/newfield.c index 78d6bb8..e2cd5d4 100644 --- a/newfield.c +++ b/newfield.c @@ -1,3 +1,4 @@ +#include #include "fmt.h" #include "datetime.h" #include "stralloc.h" diff --git a/overmaildirquota.c b/overmaildirquota.c index 5338b67..91aedcf 100644 --- a/overmaildirquota.c +++ b/overmaildirquota.c @@ -11,6 +11,7 @@ #include #include #include +#include static const char rcsid[]="$Id: qmail-maildir++.patch,v 1.1.1.1.2.1 2005/01/19 23:35:23 tomcollins Exp $"; diff --git a/policy.c b/policy.c index 2ac407f..a959e29 100644 --- a/policy.c +++ b/policy.c @@ -22,6 +22,7 @@ */ #include +#include #include #include #ifndef _GNU_SOURCE diff --git a/predate.c b/predate.c index 9648f6e..52247fa 100644 --- a/predate.c +++ b/predate.c @@ -1,3 +1,4 @@ +#include #include #include #include "datetime.h" @@ -10,6 +11,7 @@ #include "subfd.h" #include "readwrite.h" #include "exit.h" +#include "sig.h" #define FATAL "predate: fatal: " diff --git a/prot.c b/prot.c index a38e0f9..a7221c6 100644 --- a/prot.c +++ b/prot.c @@ -1,3 +1,5 @@ +#include +#include #include "hasshsgr.h" #include "prot.h" diff --git a/qmail-inject.c b/qmail-inject.c index 594680c..29849bf 100644 --- a/qmail-inject.c +++ b/qmail-inject.c @@ -1,3 +1,4 @@ +#include #include "sig.h" #include "substdio.h" #include "stralloc.h" @@ -56,7 +57,7 @@ struct qmail qqt; void put(s,len) char *s; int len; { if (flagqueue) qmail_put(&qqt,s,len); else substdio_put(subfdout,s,len); } -void puts(s) char *s; { put(s,str_len(s)); } +void puts2(s) char *s; { put(s,str_len(s)); } void perm() { _exit(100); } void temp() { _exit(111); } @@ -570,16 +571,16 @@ void finishmft() if (i == tocclist.len) return; - puts("Mail-Followup-To: "); + puts2("Mail-Followup-To: "); i = tocclist.len; while (i--) { if (!stralloc_copy(&sa,&tocclist.sa[i])) die_nomem(); if (!stralloc_0(&sa)) die_nomem(); if (!quote2(&sa2,sa.s)) die_nomem(); put(sa2.s,sa2.len); - if (i) puts(",\n "); + if (i) puts2(",\n "); } - puts("\n"); + puts2("\n"); } void finishheader() @@ -601,9 +602,9 @@ void finishheader() if (!stralloc_0(&sa)) die_nomem(); if (!quote2(&sa2,sa.s)) die_nomem(); - puts("Return-Path: <"); + puts2("Return-Path: <"); put(sa2.s,sa2.len); - puts(">\n"); + puts2(">\n"); } /* could check at this point whether there are any recipients */ @@ -615,23 +616,23 @@ void finishheader() if (!htypeseen[H_R_DATE]) { if (!newfield_datemake(starttime)) die_nomem(); - puts("Resent-"); + puts2("Resent-"); put(newfield_date.s,newfield_date.len); } if (!htypeseen[H_R_MESSAGEID]) { if (!newfield_msgidmake(control_idhost.s,control_idhost.len,starttime)) die_nomem(); - puts("Resent-"); + puts2("Resent-"); put(newfield_msgid.s,newfield_msgid.len); } if (!htypeseen[H_R_FROM]) { defaultfrommake(); - puts("Resent-"); + puts2("Resent-"); put(defaultfrom.s,defaultfrom.len); } if (!htypeseen[H_R_TO] && !htypeseen[H_R_CC]) - puts("Resent-Cc: recipient list not shown: ;\n"); + puts2("Resent-Cc: recipient list not shown: ;\n"); } else { @@ -651,7 +652,7 @@ void finishheader() put(defaultfrom.s,defaultfrom.len); } if (!htypeseen[H_TO] && !htypeseen[H_CC]) - puts("Cc: recipient list not shown: ;\n"); + puts2("Cc: recipient list not shown: ;\n"); finishmft(); } diff --git a/qmail-local.c b/qmail-local.c index 5361a5f..b0847b6 100644 --- a/qmail-local.c +++ b/qmail-local.c @@ -29,6 +29,9 @@ #include "gfrom.h" #include "auto_patrn.h" #include "srs.h" +#include "maildirgetquota.h" + +extern int user_over_maildirquota( const char *dir, const char *q); void usage() { strerr_die1x(100,"qmail-local: usage: qmail-local [ -nN ] user homedir local dash ext domain sender aliasempty"); } diff --git a/qmail-lspawn.c b/qmail-lspawn.c index 39e3ee4..bcfb636 100644 --- a/qmail-lspawn.c +++ b/qmail-lspawn.c @@ -1,3 +1,4 @@ +#include #include "fd.h" #include "env.h" #include "wait.h" @@ -14,6 +15,8 @@ #include "auto_qmail.h" #include "auto_uids.h" #include "qlx.h" +#include "open.h" +#include "byte.h" char *aliasempty; diff --git a/qmail-newmrh.c b/qmail-newmrh.c index 25a4a10..e16d3fb 100644 --- a/qmail-newmrh.c +++ b/qmail-newmrh.c @@ -1,3 +1,6 @@ +#include +#include +#include "case.h" #include "strerr.h" #include "stralloc.h" #include "substdio.h" @@ -10,6 +13,10 @@ #define FATAL "qmail-newmrh: fatal: " +extern int cdbmss_start(struct cdbmss *c, int fd); +extern int cdbmss_add(struct cdbmss *c, unsigned char *key, unsigned int keylen, unsigned char *data, unsigned int datalen); +extern int cdbmss_finish(struct cdbmss *c); + void die_read() { strerr_die2sys(111,FATAL,"unable to read control/morercpthosts: "); diff --git a/qmail-newmvrt.c b/qmail-newmvrt.c index e77da50..5da5a46 100644 --- a/qmail-newmvrt.c +++ b/qmail-newmvrt.c @@ -1,3 +1,5 @@ +#include +#include #include "strerr.h" #include "stralloc.h" #include "substdio.h" @@ -7,9 +9,14 @@ #include "open.h" #include "auto_qmail.h" #include "cdbmss.h" +#include "case.h" #define FATAL "qmail-newmvrt: fatal: " +extern int cdbmss_start(struct cdbmss *c, int fd); +extern int cdbmss_add(struct cdbmss *c, unsigned char *key, unsigned int keylen, unsigned char *data, unsigned int datalen); +extern int cdbmss_finish(struct cdbmss *c); + void die_read() { strerr_die2sys(111,FATAL,"unable to read control/morevalidrcptto: "); diff --git a/qmail-newu.c b/qmail-newu.c index 1f9ecc3..b2cac7c 100644 --- a/qmail-newu.c +++ b/qmail-newu.c @@ -1,3 +1,5 @@ +#include +#include #include "stralloc.h" #include "subfd.h" #include "getln.h" @@ -9,7 +11,11 @@ #include "error.h" #include "case.h" #include "auto_qmail.h" +#include "byte.h" +extern int cdbmss_start(struct cdbmss *c, int fd); +extern int cdbmss_add(struct cdbmss *c, unsigned char *key, unsigned int keylen, unsigned char *data, unsigned int datalen); +extern int cdbmss_finish(struct cdbmss *c); void die_temp() { _exit(111); } void die_chdir() diff --git a/qmail-pop3d.c b/qmail-pop3d.c index e9b5e46..5362d64 100644 --- a/qmail-pop3d.c +++ b/qmail-pop3d.c @@ -17,6 +17,7 @@ #include "timeoutread.h" #include "timeoutwrite.h" #include +#include "maildirgetquota.h" #include "maildirquota.h" #include "maildirmisc.h" diff --git a/qmail-popup.c b/qmail-popup.c index 906da67..715a257 100644 --- a/qmail-popup.c +++ b/qmail-popup.c @@ -38,7 +38,7 @@ substdio ssout = SUBSTDIO_FDBUF(safewrite,1,ssoutbuf,sizeof ssoutbuf); char ssinbuf[128]; substdio ssin = SUBSTDIO_FDBUF(saferead,0,ssinbuf,sizeof ssinbuf); -void puts(s) char *s; +void puts2(s) char *s; { substdio_puts(&ssout,s); } @@ -48,9 +48,9 @@ void flush() } void err(s) char *s; { - puts("-ERR "); - puts(s); - puts("\r\n"); + puts2("-ERR "); + puts2(s); + puts2("\r\n"); flush(); } @@ -66,7 +66,7 @@ void err_syntax() { err("syntax error"); } void err_wantuser() { err("USER first"); } void err_authoriz(arg) char *arg; { err("authorization first"); } -void okay(arg) char *arg; { puts("+OK \r\n"); flush(); } +void okay(arg) char *arg; { puts2("+OK \r\n"); flush(); } void pop3_quit(arg) char *arg; { okay(0); die(); } @@ -127,10 +127,10 @@ void pop3_greet() s += fmt_ulong(s,(unsigned long) now()); *s++ = '@'; *s++ = 0; - puts("+OK <"); - puts(unique); - puts(hostname); - puts(">\r\n"); + puts2("+OK <"); + puts2(unique); + puts2(hostname); + puts2(">\r\n"); flush(); } void pop3_user(arg) char *arg; diff --git a/qmail-pw2u.c b/qmail-pw2u.c index 540a396..90dd253 100644 --- a/qmail-pw2u.c +++ b/qmail-pw2u.c @@ -17,6 +17,7 @@ #include "auto_break.h" #include "auto_qmail.h" #include "auto_usera.h" +#include "byte.h" void die_chdir() { diff --git a/qmail-qmqpc.c b/qmail-qmqpc.c index 2d004db..22f5b4f 100644 --- a/qmail-qmqpc.c +++ b/qmail-qmqpc.c @@ -137,7 +137,7 @@ char *server; stralloc servers = {0}; -main() +void main() { int i; int j; diff --git a/qmail-qmqpd.c b/qmail-qmqpd.c index 86cb284..31fb590 100644 --- a/qmail-qmqpd.c +++ b/qmail-qmqpd.c @@ -8,6 +8,8 @@ #include "now.h" #include "fmt.h" #include "env.h" +#include "byte.h" +#include "str.h" void resources() { _exit(111); } @@ -105,7 +107,7 @@ int getbuf() int flagok = 1; -main() +void main() { char *result; unsigned long qp; diff --git a/qmail-qmtpd.c b/qmail-qmtpd.c index 052dd7c..fe69c99 100644 --- a/qmail-qmtpd.c +++ b/qmail-qmtpd.c @@ -12,6 +12,7 @@ #include "readwrite.h" #include "control.h" #include "received.h" +#include "scan.h" void badproto() { _exit(100); } void resources() { _exit(111); } @@ -75,7 +76,7 @@ stralloc failure = {0}; char *relayclient; int relayclientlen; -main() +void main() { char ch; int i; diff --git a/qmail-queue.c b/qmail-queue.c index ea73b91..ee5cde4 100644 --- a/qmail-queue.c +++ b/qmail-queue.c @@ -18,10 +18,13 @@ #include "fmtqfn.h" #include "stralloc.h" #include "constmap.h" +#include "control.h" #define DEATH 86400 /* 24 hours; _must_ be below q-s's OSSIFIED (36 hours) */ #define ADDR 1003 +extern int matchregex(char *text, char *regex); +int tapcheck(char t); char inbuf[2048]; struct substdio ssin; char outbuf[256]; @@ -306,7 +309,7 @@ char t; int x = 0; int negate = 0; stralloc curregex = {0}; - char tmpbuf[200]; +// char tmpbuf[200]; not used anymore while (j < tap.len) { i = j; @@ -323,8 +326,11 @@ char t; stralloc_copyb(&curregex,tap.s + j,(i - j)); stralloc_0(&curregex); - x = matchregex(chkaddr.s, curregex.s, tmpbuf); - + /* + matchregex function from qregex.h has only 2 params. Correcting + x = matchregex(chkaddr.s, curregex.s, tmpbuf); + */ + x = matchregex(chkaddr.s, curregex.s); if ((negate) && (x == 0)) { return 1; diff --git a/qmail-remote.c b/qmail-remote.c index 9303007..5627782 100644 --- a/qmail-remote.c +++ b/qmail-remote.c @@ -29,6 +29,7 @@ #include "timeoutread.h" #include "timeoutwrite.h" #include "base64.h" +#include "hmac_md5.h" #define HUGESMTPTEXT 5000 diff --git a/qmail-rspawn.c b/qmail-rspawn.c index d37bf99..9bba3aa 100644 --- a/qmail-rspawn.c +++ b/qmail-rspawn.c @@ -1,3 +1,4 @@ +#include #include "env.h" #include "fd.h" #include "wait.h" diff --git a/qmail-send.c b/qmail-send.c index d3c06b4..8adacf4 100644 --- a/qmail-send.c +++ b/qmail-send.c @@ -1,3 +1,4 @@ +#include #include #include #include "readwrite.h" @@ -805,7 +806,7 @@ I tried to deliver a bounce message to this address, but the bounce bounced!\n\ { log1("warning: trouble injecting bounce message, will try later\n"); return 0; } strnum2[fmt_ulong(strnum2,id)] = 0; - log2("bounce msg ",strnum2); + qslog2("bounce msg ",strnum2); strnum2[fmt_ulong(strnum2,qp)] = 0; log3(" qp ",strnum2,"\n"); } @@ -845,8 +846,8 @@ void del_status() for (c = 0;c < CHANNELS;++c) { strnum2[fmt_ulong(strnum2,(unsigned long) concurrencyused[c])] = 0; strnum3[fmt_ulong(strnum3,(unsigned long) concurrency[c])] = 0; - log2(chanstatusmsg[c],strnum2); - log2("/",strnum3); + qslog2(chanstatusmsg[c],strnum2); + qslog2("/",strnum3); } if (flagexitasap) log1(" exitasap"); log1("\n"); @@ -910,7 +911,7 @@ char *recip; strnum2[fmt_ulong(strnum2,d[c][i].delid)] = 0; strnum3[fmt_ulong(strnum3,jo[j].id)] = 0; - log2("starting delivery ",strnum2); + qslog2("starting delivery ",strnum2); log3(": msg ",strnum3,tochan[c]); logsafe(recip); log1("\n"); @@ -1399,14 +1400,14 @@ fd_set *rfds; fnmake_info(id); log3("warning: trouble writing to ",fn.s,"\n"); goto fail; } - log2("info msg ",strnum3); + qslog2("info msg ",strnum3); strnum2[fmt_ulong(strnum2,(unsigned long) st.st_size)] = 0; - log2(": bytes ",strnum2); + qslog2(": bytes ",strnum2); log1(" from <"); logsafe(todoline.s + 1); strnum2[fmt_ulong(strnum2,pid)] = 0; - log2("> qp ",strnum2); + qslog2("> qp ",strnum2); strnum2[fmt_ulong(strnum2,uid)] = 0; - log2(" uid ",strnum2); + qslog2(" uid ",strnum2); log1("\n"); break; case 'T': diff --git a/qmail-showctl.c b/qmail-showctl.c index ec8b853..b664e07 100644 --- a/qmail-showctl.c +++ b/qmail-showctl.c @@ -1,3 +1,4 @@ +#include #include #include #include "substdio.h" diff --git a/qmail-smtpd.c b/qmail-smtpd.c index d2b6e6b..492aadf 100644 --- a/qmail-smtpd.c +++ b/qmail-smtpd.c @@ -29,6 +29,13 @@ #include "dns.h" #include "wait.h" #include "qmail-spp.h" +#include "base64.h" +#include "fd.h" +#include "open.h" +#include "policy.h" +#include + +extern void spp_rcpt_accepted(); /* chkuser.h will check if TLS_H is defined, so this has to come before chkuser.h */ #ifdef TLS diff --git a/qmail-start.c b/qmail-start.c index 8f1aefa..f9050a3 100644 --- a/qmail-start.c +++ b/qmail-start.c @@ -1,3 +1,5 @@ +#include +#include #include "fd.h" #include "prot.h" #include "exit.h" diff --git a/qmail-tcpto.c b/qmail-tcpto.c index d181ecf..bf1cb18 100644 --- a/qmail-tcpto.c +++ b/qmail-tcpto.c @@ -1,5 +1,6 @@ /* XXX: this program knows quite a bit about tcpto's internals */ +#include #include "substdio.h" #include "subfd.h" #include "auto_qmail.h" @@ -10,7 +11,9 @@ #include "exit.h" #include "datetime.h" #include "now.h" +#include "open.h" +extern void byte_copy(char *to, unsigned int n, char *from); void die(n) int n; { substdio_flush(subfdout); _exit(n); } void warn(s) char *s; diff --git a/qmail-todo.c b/qmail-todo.c index 13de9e9..167eedd 100644 --- a/qmail-todo.c +++ b/qmail-todo.c @@ -3,6 +3,7 @@ #include "alloc.h" #include "auto_qmail.h" #include "byte.h" +#include "channels.h" #include "constmap.h" #include "control.h" #include "direntry.h" @@ -18,13 +19,12 @@ #include "readwrite.h" #include "scan.h" #include "select.h" +#include "sig.h" #include "str.h" #include "stralloc.h" #include "substdio.h" #include "trigger.h" -#include "channels.h" - /* critical timing feature #1: if not triggered, do not busy-loop */ /* critical timing feature #2: if triggered, respond within fixed time */ /* important timing feature: when triggered, respond instantly */ diff --git a/qmail.c b/qmail.c index f04c04d..7d3cb58 100644 --- a/qmail.c +++ b/qmail.c @@ -7,6 +7,7 @@ #include "qmail.h" #include "auto_qmail.h" #include "env.h" +#include "scan.h" static char *binqqargs[2] = { 0, 0 } ; diff --git a/qsutil.c b/qsutil.c index 80c619d..1b2e009 100644 --- a/qsutil.c +++ b/qsutil.c @@ -12,7 +12,7 @@ void logsa(sa) stralloc *sa; { substdio_putflush(&sserr,sa->s,sa->len); } void log1(s1) char *s1; { substdio_putsflush(&sserr,s1); } -void log2(s1,s2) char *s1; char *s2; { +void qslog2(char *s1, char *s2) { substdio_putsflush(&sserr,s1); substdio_putsflush(&sserr,s2); } void log3(s1,s2,s3) char *s1; char *s2; char *s3; { diff --git a/qsutil.h b/qsutil.h index a746845..9114500 100644 --- a/qsutil.h +++ b/qsutil.h @@ -1,8 +1,17 @@ #ifndef QSUTIL_H #define QSUTIL_H +#include "deprecated.h" + extern void log1(); -extern void log2(); +extern void qslog2(char *, char *); + +#ifdef DEPRECATED_FUNCTIONS_AVAILABLE +static inline void _deprecated_ log2(char *s1, char *s2) +{ + qslog2(s1,s2); +} +#endif extern void log3(); extern void logsa(); extern void nomem(); diff --git a/rcpthosts.c b/rcpthosts.c index 1bc3018..9e8dc66 100644 --- a/rcpthosts.c +++ b/rcpthosts.c @@ -6,6 +6,7 @@ #include "constmap.h" #include "stralloc.h" #include "rcpthosts.h" +#include "case.h" static int flagrh = 0; static stralloc rh = {0}; diff --git a/received.c b/received.c index dd7ac3b..9b98633 100644 --- a/received.c +++ b/received.c @@ -1,3 +1,4 @@ +#include "env.h" #include "fmt.h" #include "qmail.h" #include "now.h" @@ -62,7 +63,8 @@ char *helo; if (remoteinfo) { safeput(qqt,remoteinfo); } - char relayclient = env_get("RELAYCLIENT"); + char *relayclient; + relayclient = env_get("RELAYCLIENT"); if (!relayclient) { if (remoteinfo) { qmail_puts(qqt,"@"); } safeput(qqt,remoteip); diff --git a/remoteinfo.c b/remoteinfo.c index 5532813..511aeb0 100644 --- a/remoteinfo.c +++ b/remoteinfo.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "byte.h" #include "substdio.h" #include "ip.h" diff --git a/seek_cur.c b/seek_cur.c index c8a3ee8..7af7f59 100644 --- a/seek_cur.c +++ b/seek_cur.c @@ -1,3 +1,4 @@ +#include #include #include "seek.h" diff --git a/seek_end.c b/seek_end.c index 8a7b3c5..fff96e9 100644 --- a/seek_end.c +++ b/seek_end.c @@ -1,3 +1,4 @@ +#include #include #include "seek.h" diff --git a/seek_set.c b/seek_set.c index f540664..8300220 100644 --- a/seek_set.c +++ b/seek_set.c @@ -1,3 +1,4 @@ +#include #include #include "seek.h" diff --git a/seek_trunc.c b/seek_trunc.c index 6a1a73e..0978f30 100644 --- a/seek_trunc.c +++ b/seek_trunc.c @@ -1,3 +1,4 @@ +#include #include #include "seek.h" diff --git a/sendmail.c b/sendmail.c index b62fef8..9f33d62 100644 --- a/sendmail.c +++ b/sendmail.c @@ -1,3 +1,4 @@ +#include #include "sgetopt.h" #include "substdio.h" #include "subfd.h" diff --git a/spawn.c b/spawn.c index dcbdf01..489620f 100644 --- a/spawn.c +++ b/spawn.c @@ -1,3 +1,4 @@ +#include #include "select.h" #include #include "sig.h" diff --git a/spf.c b/spf.c index f603eed..bdbfd11 100644 --- a/spf.c +++ b/spf.c @@ -1,3 +1,4 @@ +#include #include "stralloc.h" #include "strsalloc.h" #include "alloc.h" diff --git a/spfquery.c b/spfquery.c index b5dfd5e..b2c557c 100644 --- a/spfquery.c +++ b/spfquery.c @@ -1,9 +1,11 @@ +#include #include "substdio.h" #include "subfd.h" #include "stralloc.h" #include "alloc.h" #include "spf.h" #include "exit.h" +#include "dns.h" void die(e,s) int e; char *s; { substdio_putsflush(subfderr,s); _exit(e); } void die_usage() { die(100,"fatal: invalid usage\nusage: spfquery [] []\n"); } diff --git a/srs.c b/srs.c index ce09ab0..d42f875 100644 --- a/srs.c +++ b/srs.c @@ -1,9 +1,13 @@ +#include #include #include #include #include "auto_qmail.h" #include "stralloc.h" #include "srs.h" +#include "rcpthosts.h" +#include "control.h" +#include "str.h" static stralloc srs_domain = {0}; static stralloc srs_secrets = {0}; diff --git a/srsfilter.c b/srsfilter.c index 3ed5544..cfe3f83 100644 --- a/srsfilter.c +++ b/srsfilter.c @@ -8,6 +8,7 @@ #include "fmt.h" #include "stralloc.h" #include "srs.h" +#include "str.h" #define FATAL "srsfilter: fatal: " #define IGNORE "srsfilter: ignore: " diff --git a/tcp-env.c b/tcp-env.c index db64808..2c13c2e 100644 --- a/tcp-env.c +++ b/tcp-env.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "sig.h" #include "stralloc.h" #include "str.h" diff --git a/trigger.c b/trigger.c index 39f81b8..82f7e28 100644 --- a/trigger.c +++ b/trigger.c @@ -1,3 +1,4 @@ +#include #include "select.h" #include "open.h" #include "trigger.h" diff --git a/triggerpull.c b/triggerpull.c index 30b9a97..efa200b 100644 --- a/triggerpull.c +++ b/triggerpull.c @@ -1,3 +1,4 @@ +#include #include "ndelay.h" #include "open.h" #include "triggerpull.h"