diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-09-30 16:06:36 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2000-09-30 16:06:36 +0000 |
commit | a4127f0e5c2746cfc64abf21fed515a5082c8755 (patch) | |
tree | 6dda646e3ea37a041b05a37bc822d029001ee3ee /usr.sbin/config | |
parent | 8d88fc81c47cb240f36e8daa81311f36000d290d (diff) |
Some format string problems that were missed during initial audit; deraadt@ and
millert@ ok
Diffstat (limited to 'usr.sbin/config')
-rw-r--r-- | usr.sbin/config/exec_aout.c | 8 | ||||
-rw-r--r-- | usr.sbin/config/exec_ecoff.c | 8 | ||||
-rw-r--r-- | usr.sbin/config/exec_elf.c | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/usr.sbin/config/exec_aout.c b/usr.sbin/config/exec_aout.c index 0647a77baef..1e5c4c2f85d 100644 --- a/usr.sbin/config/exec_aout.c +++ b/usr.sbin/config/exec_aout.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_aout.c,v 1.1 1999/10/04 20:00:51 deraadt Exp $ */ +/* $OpenBSD: exec_aout.c,v 1.2 2000/09/30 16:06:34 aaron Exp $ */ /* * Copyright (c) 1999 Mats O Jansson. All rights reserved. @@ -30,7 +30,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: exec_aout.c,v 1.1 1999/10/04 20:00:51 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: exec_aout.c,v 1.2 2000/09/30 16:06:34 aaron Exp $"; #endif #include <err.h> @@ -98,7 +98,7 @@ aout_loadkernel(file) off_t cur,end; if ((fd = open(file, O_RDONLY | O_EXLOCK, 0)) < 0) - err(1, file, errno); + err(1, "%s", file); if (read(fd, (char *)&aout_ex, sizeof(aout_ex)) != sizeof(aout_ex)) errx(1, "can't read a.out header"); @@ -136,7 +136,7 @@ aout_savekernel(outfile) int fd; if ((fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0755)) < 0) - err(1, outfile, errno); + err(1, "%s", outfile); if (write(fd, aout_p, aout_psz) != aout_psz) errx(1, "can't write a.out text and data"); diff --git a/usr.sbin/config/exec_ecoff.c b/usr.sbin/config/exec_ecoff.c index f9c9089817a..362ea3e12d7 100644 --- a/usr.sbin/config/exec_ecoff.c +++ b/usr.sbin/config/exec_ecoff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_ecoff.c,v 1.2 1999/10/05 18:14:44 deraadt Exp $ */ +/* $OpenBSD: exec_ecoff.c,v 1.3 2000/09/30 16:06:34 aaron Exp $ */ /* * Copyright (c) 1999 Mats O Jansson. All rights reserved. @@ -30,7 +30,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: exec_ecoff.c,v 1.2 1999/10/05 18:14:44 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: exec_ecoff.c,v 1.3 2000/09/30 16:06:34 aaron Exp $"; #endif #include <err.h> @@ -101,7 +101,7 @@ ecoff_loadkernel(file) off_t beg,cur,end; if ((fd = open(file, O_RDONLY | O_EXLOCK, 0)) < 0) - err(1, file, errno); + err(1, "%s" file); if (read(fd, (char *)&ecoff_ex, sizeof(ecoff_ex)) != sizeof(ecoff_ex)) errx(1, "can't read ecoff header"); @@ -144,7 +144,7 @@ ecoff_savekernel(outfile) int fd; if ((fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0755)) < 0) - err(1, outfile, errno); + err(1, "%s", outfile); if (write(fd, ecoff_b, ecoff_bsz) != ecoff_bsz) errx(1, "can't write beginning of file %s",outfile); diff --git a/usr.sbin/config/exec_elf.c b/usr.sbin/config/exec_elf.c index 1446fa27012..80c1aa57673 100644 --- a/usr.sbin/config/exec_elf.c +++ b/usr.sbin/config/exec_elf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_elf.c,v 1.1 1999/10/04 20:00:51 deraadt Exp $ */ +/* $OpenBSD: exec_elf.c,v 1.2 2000/09/30 16:06:34 aaron Exp $ */ /* * Copyright (c) 1999 Mats O Jansson. All rights reserved. @@ -30,7 +30,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: exec_elf.c,v 1.1 1999/10/04 20:00:51 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: exec_elf.c,v 1.2 2000/09/30 16:06:34 aaron Exp $"; #endif #include <err.h> @@ -130,7 +130,7 @@ elf_loadkernel(file) Elf32_Shdr *s; if ((fd = open(file, O_RDONLY | O_EXLOCK, 0)) < 0) - err(1, file, errno); + err(1, "%s", file); if (read(fd, (char *)&elf_ex, sizeof(elf_ex)) != sizeof(elf_ex)) errx(1, "can't read elf header"); @@ -164,7 +164,7 @@ elf_savekernel(outfile) int fd; if ((fd = open(outfile, O_WRONLY | O_CREAT | O_TRUNC, 0755)) < 0) - err(1, outfile, errno); + err(1, "%s", outfile); if (write(fd, elf_total, elf_size) != elf_size) errx(1, "can't write file %s", outfile); |