Subject: CVS commit: basesrc/usr.sbin/user
To: None <source-changes@netbsd.org>
From: Thomas Klausner <wiz@netbsd.org>
List: source-changes
Date: 09/24/2001 16:22:40
Module Name:	basesrc
Committed By:	wiz
Date:		Mon Sep 24 13:22:39 UTC 2001

Modified Files:
	basesrc/bin/pax: tty_subs.c
	basesrc/bin/rcp: rcp.c
	basesrc/bin/sh: output.c
	basesrc/crypto/dist/heimdal/appl/ftp/ftp: ftp.c
	basesrc/crypto/dist/heimdal/appl/rcp: rcp.c
	basesrc/crypto/dist/heimdal/lib/roken: snprintf.c
	basesrc/crypto/dist/kame/racoon: plog.c
	basesrc/crypto/dist/krb4/lib/roken: snprintf.c
	basesrc/crypto/dist/openssl/crypto/err: err.c
	basesrc/dist/bind/bin/irpd: irpd.c
	basesrc/dist/bind/bin/ndc: ndc.c
	basesrc/dist/bind/lib/irs: irp.c
	basesrc/dist/dhcp/omapip: alloc.c
	basesrc/dist/dhcp/server: failover.c
	basesrc/dist/ntp/ntpd: refclock_true.c
	basesrc/games/larn: io.c
	basesrc/games/sail: pl_7.c
	basesrc/lib/libc/stdio: asprintf.c
	basesrc/lib/libcurses: ctrace.c printw.c
	basesrc/lib/libedit: el.c
	basesrc/libexec/ftpd: ftpd.c
	basesrc/libexec/rexecd: rexecd.c
	basesrc/libexec/rshd: rshd.c
	basesrc/sbin/fsck_msdos: main.c
	basesrc/sbin/restore: utilities.c
	basesrc/sbin/routed: main.c trace.c
	basesrc/usr.bin/error: touch.c
	basesrc/usr.bin/make: parse.c
	basesrc/usr.bin/rdist: server.c
	basesrc/usr.bin/telnet: telnet.c
	basesrc/usr.sbin/lpr/lpd: printjob.c
	basesrc/usr.sbin/map-mbone: mapper.c
	basesrc/usr.sbin/mrinfo: mrinfo.c
	basesrc/usr.sbin/mtrace: mtrace.c
	basesrc/usr.sbin/pkg_install/lib: exec.c
	basesrc/usr.sbin/pppd/chat: chat.c
	basesrc/usr.sbin/rarpd: rarpd.c
	basesrc/usr.sbin/route6d: route6d.c
	basesrc/usr.sbin/sup/source: run.c supcmeat.c supcmisc.c supmsg.c
	basesrc/usr.sbin/user: user.c
	gnusrc/gnu/dist/gettext/lib: vasprintf.c
	gnusrc/gnu/dist/libiberty: vasprintf.c
	gnusrc/gnu/dist/toolchain/opcodes: arc-dis.c
	syssrc/sys/arch/arm32/ofw: openfirm.c
	syssrc/sys/arch/dnard/ofw: openfirm.c
	syssrc/sys/arch/macppc/stand/ofwboot: Locore.c
	syssrc/sys/arch/mipsco/stand/common: saio.c
	syssrc/sys/arch/pc532/pc532: umprintf.c
	syssrc/sys/arch/pmax/stand/common: rz.c
	syssrc/sys/arch/powerpc/powerpc: openfirm.c
	syssrc/sys/arch/sparc/sparc: openfirm.c
	syssrc/sys/arch/sparc64/sparc64: openfirm.c
	syssrc/sys/lib/libsa: subr_prf.c
	syssrc/sys/netiso: tp_cons.c
	syssrc/sys/netkey: key.c

Log Message:
va_{start,end} audit:
Make sure that each va_start has one and only one matching va_end,
especially in error cases.
If the va_list is used multiple times, do multiple va_starts/va_ends.
If a function gets va_list as argument, don't let it use va_end (since
it's the callers responsibility).

Improved by comments from enami and christos -- thanks!

Heimdal/krb4/KAME changes already fed back, rest to follow.

Inspired by, but not not based on, OpenBSD.


To generate a diff of this commit:
cvs rdiff -r1.8 -r1.9 basesrc/bin/pax/tty_subs.c
cvs rdiff -r1.27 -r1.28 basesrc/bin/rcp/rcp.c
cvs rdiff -r1.23 -r1.24 basesrc/bin/sh/output.c
cvs rdiff -r1.1.1.3 -r1.2 basesrc/crypto/dist/heimdal/appl/ftp/ftp/ftp.c
cvs rdiff -r1.3 -r1.4 basesrc/crypto/dist/heimdal/appl/rcp/rcp.c
cvs rdiff -r1.1.1.4 -r1.2 basesrc/crypto/dist/heimdal/lib/roken/snprintf.c
cvs rdiff -r1.1.1.5 -r1.2 basesrc/crypto/dist/kame/racoon/plog.c
cvs rdiff -r1.1.1.3 -r1.2 basesrc/crypto/dist/krb4/lib/roken/snprintf.c
cvs rdiff -r1.1.1.3 -r1.2 basesrc/crypto/dist/openssl/crypto/err/err.c
cvs rdiff -r1.2 -r1.3 basesrc/dist/bind/bin/irpd/irpd.c
cvs rdiff -r1.4 -r1.5 basesrc/dist/bind/bin/ndc/ndc.c
cvs rdiff -r1.2 -r1.3 basesrc/dist/bind/lib/irs/irp.c
cvs rdiff -r1.1 -r1.2 basesrc/dist/dhcp/omapip/alloc.c
cvs rdiff -r1.1 -r1.2 basesrc/dist/dhcp/server/failover.c
cvs rdiff -r1.2 -r1.3 basesrc/dist/ntp/ntpd/refclock_true.c
cvs rdiff -r1.11 -r1.12 basesrc/games/larn/io.c
cvs rdiff -r1.24 -r1.25 basesrc/games/sail/pl_7.c
cvs rdiff -r1.8 -r1.9 basesrc/lib/libc/stdio/asprintf.c
cvs rdiff -r1.10 -r1.11 basesrc/lib/libcurses/ctrace.c
cvs rdiff -r1.16 -r1.17 basesrc/lib/libcurses/printw.c
cvs rdiff -r1.21 -r1.22 basesrc/lib/libedit/el.c
cvs rdiff -r1.129 -r1.130 basesrc/libexec/ftpd/ftpd.c
cvs rdiff -r1.8 -r1.9 basesrc/libexec/rexecd/rexecd.c
cvs rdiff -r1.23 -r1.24 basesrc/libexec/rshd/rshd.c
cvs rdiff -r1.11 -r1.12 basesrc/sbin/fsck_msdos/main.c
cvs rdiff -r1.13 -r1.14 basesrc/sbin/restore/utilities.c
cvs rdiff -r1.28 -r1.29 basesrc/sbin/routed/main.c
cvs rdiff -r1.25 -r1.26 basesrc/sbin/routed/trace.c
cvs rdiff -r1.11 -r1.12 basesrc/usr.bin/error/touch.c
cvs rdiff -r1.72 -r1.73 basesrc/usr.bin/make/parse.c
cvs rdiff -r1.21 -r1.22 basesrc/usr.bin/rdist/server.c
cvs rdiff -r1.18 -r1.19 basesrc/usr.bin/telnet/telnet.c
cvs rdiff -r1.28 -r1.29 basesrc/usr.sbin/lpr/lpd/printjob.c
cvs rdiff -r1.7 -r1.8 basesrc/usr.sbin/map-mbone/mapper.c
cvs rdiff -r1.11 -r1.12 basesrc/usr.sbin/mrinfo/mrinfo.c
cvs rdiff -r1.17 -r1.18 basesrc/usr.sbin/mtrace/mtrace.c
cvs rdiff -r1.7 -r1.8 basesrc/usr.sbin/pkg_install/lib/exec.c
cvs rdiff -r1.24 -r1.25 basesrc/usr.sbin/pppd/chat/chat.c
cvs rdiff -r1.42 -r1.43 basesrc/usr.sbin/rarpd/rarpd.c
cvs rdiff -r1.29 -r1.30 basesrc/usr.sbin/route6d/route6d.c
cvs rdiff -r1.8 -r1.9 basesrc/usr.sbin/sup/source/run.c
cvs rdiff -r1.21 -r1.22 basesrc/usr.sbin/sup/source/supcmeat.c
cvs rdiff -r1.9 -r1.10 basesrc/usr.sbin/sup/source/supcmisc.c
cvs rdiff -r1.7 -r1.8 basesrc/usr.sbin/sup/source/supmsg.c
cvs rdiff -r1.43 -r1.44 basesrc/usr.sbin/user/user.c
cvs rdiff -r1.1.1.1 -r1.2 gnusrc/gnu/dist/gettext/lib/vasprintf.c
cvs rdiff -r1.1.1.2 -r1.2 gnusrc/gnu/dist/libiberty/vasprintf.c
cvs rdiff -r1.1.1.3 -r1.2 gnusrc/gnu/dist/toolchain/opcodes/arc-dis.c
cvs rdiff -r1.5 -r1.6 syssrc/sys/arch/arm32/ofw/openfirm.c
cvs rdiff -r1.1 -r1.2 syssrc/sys/arch/dnard/ofw/openfirm.c
cvs rdiff -r1.8 -r1.9 syssrc/sys/arch/macppc/stand/ofwboot/Locore.c
cvs rdiff -r1.2 -r1.3 syssrc/sys/arch/mipsco/stand/common/saio.c
cvs rdiff -r1.4 -r1.5 syssrc/sys/arch/pc532/pc532/umprintf.c
cvs rdiff -r1.17 -r1.18 syssrc/sys/arch/pmax/stand/common/rz.c
cvs rdiff -r1.10 -r1.11 syssrc/sys/arch/powerpc/powerpc/openfirm.c
cvs rdiff -r1.4 -r1.5 syssrc/sys/arch/sparc/sparc/openfirm.c
cvs rdiff -r1.13 -r1.14 syssrc/sys/arch/sparc64/sparc64/openfirm.c
cvs rdiff -r1.3 -r1.4 syssrc/sys/lib/libsa/subr_prf.c
cvs rdiff -r1.13 -r1.14 syssrc/sys/netiso/tp_cons.c
cvs rdiff -r1.50 -r1.51 syssrc/sys/netkey/key.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.