From 5daf4a912cebce216db1b44154b3b20fa9a77582 Mon Sep 17 00:00:00 2001 From: ian Date: Sat, 8 Apr 2006 12:00:49 +0000 Subject: [PATCH] Detect missing vsnprintf and mention URL from Nelson Beebe in err msg. --- acconfig.h | 5 +++++ config.h.in | 8 ++++++++ configure.in | 2 +- debian/changelog | 1 + 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/acconfig.h b/acconfig.h index 1727302..3ead528 100644 --- a/acconfig.h +++ b/acconfig.h @@ -47,6 +47,11 @@ #define STRSIGNAL(x) "[platform has no strsignal!]" #endif +/* VSNPRINTF */ +#ifndef HAVE_VSNPRINTF +# error "You must have vsnprintf! Without vsnprintf it is very hard to write secure programs. If you don't have it then your system libc is probably full of hideous buffer overrun security bugs. But, if you don't want to fix your system a portable snprintf can be found at http://www.ijs.si/software/snprintf/" +#endif + /* EPROTO */ #ifndef HAVE_EPROTO #define EPROTO 0 diff --git a/config.h.in b/config.h.in index 0697f09..994d258 100644 --- a/config.h.in +++ b/config.h.in @@ -27,6 +27,9 @@ /* Define if you have the strsignal function. */ #undef HAVE_STRSIGNAL +/* Define if you have the vsnprintf function. */ +#undef HAVE_VSNPRINTF + /* Define if you have the socket library (-lsocket). */ #undef HAVE_LIBSOCKET @@ -35,6 +38,11 @@ #define STRSIGNAL(x) "[platform has no strsignal!]" #endif +/* VSNPRINTF */ +#ifndef HAVE_VSNPRINTFx +# error "You must have vsnprintf! Without vsnprintf it is very hard to write secure programs. If you don't have it then your system libc is probably full of hideous buffer overrun security bugs. But, if you don't want to fix your system a portable snprintf can be found at http://www.ijs.si/software/snprintf/" +#endif + /* EPROTO */ #ifndef HAVE_EPROTO #define EPROTO 0 diff --git a/configure.in b/configure.in index 2d42166..f46c56a 100644 --- a/configure.in +++ b/configure.in @@ -46,7 +46,7 @@ AC_CHECK_PROGS(MD5SUM_SIMPLE, md5sum md5 gmd5sum) CFLAGS="$CFLAGS -D_GNU_SOURCE" AC_CHECK_LIB(socket,socket) -AC_CHECK_FUNCS(setenv strsignal) +AC_CHECK_FUNCS(setenv strsignal vsnprintf) AC_CACHE_CHECK(for EPROTO,userv_cv_hdr_eproto, AC_EGREP_CPP(yes, diff --git a/debian/changelog b/debian/changelog index 2842485..595c7e9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,7 @@ userv (1.0.5) unstable; urgency=low Packaging changes: * Reran flex (flex Debian 2.5.31-31). * Use install -g 0 instead of -g root. This is more portable, I hope. + * Detect missing vsnprintf and mention URL from Nelson Beebe in err msg. -- -- 2.30.2