freebsd-dev/usr.sbin/ntp/scripts/mkver
Cy Schubert 767173cec2 MFV r362565:
Update 4.2.8p14 --> 4.2.8p15

Summary: Systems that use a CMAC algorithm in ntp.keys will not release
a bit of memory on each packet that uses a CMAC keyid, eventually causing
ntpd to run out of memory and fail. The CMAC cleanup from
https://bugs.ntp.org/3447, part of ntp-4.2.8p11, introduced a bug whereby
the CMAC data structure was no longer completely removed.

MFC after:	3 days
Security:	NTP Bug 3661
2020-06-24 01:51:05 +00:00

47 lines
615 B
Bash
Executable File

#!/bin/sh
#
# $FreeBSD$
#
PROG=${1-UNKNOWN}
: ${ECHO:=echo}
ConfStr="$PROG"
ConfStr="$ConfStr 4.2.8p15"
case "$CSET" in
'') ;;
*) ConfStr="$ConfStr@$CSET" ;;
esac
case "" in
'')
case "1" in
'') ;;
*) ConfStr="${ConfStr}-a" ;;
esac
;;
*) ConfStr="${ConfStr}-r" ;;
esac
if [ ! -f .version ]; then
echo 0 > .version
fi
RUN="`cat .version`"
RUN="`expr $RUN + 1`"
echo $RUN > .version
ConfStr="$ConfStr (${RUN})"
${ECHO} "Version <${ConfStr}>";
rm -f version.c
cat > version.c << -EoF-
/*
* version file for $PROG
*/
#include <config.h>
const char * Version = "${ConfStr}";
-EoF-