From: Dave Hart Date: Wed, 16 Dec 2009 21:26:45 +0000 (+0000) Subject: [Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir. X-Git-Tag: NTP_4_2_7P2~12^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3c4955956b597359e6efce88f8cbb184d9be6934;p=thirdparty%2Fntp.git [Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir. bk: 4b295095NaUvS_snVXVSBcBkfOf--w --- diff --git a/ChangeLog b/ChangeLog index 6d7fc017e..d56284069 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +--- + +* [Bug 1419] ntpdate, ntpdc, sntp, ntpd ignore configure --bindir. + --- (4.2.6) 2009/12/09 Released by Harlan Stenn * Include (4.2.4p8) - [Sec 1331] DoS with mode 7 packets - CVE-2009-3563. diff --git a/adjtimed/Makefile.am b/adjtimed/Makefile.am index cad9dd02e..c97a08a7d 100644 --- a/adjtimed/Makefile.am +++ b/adjtimed/Makefile.am @@ -1,7 +1,11 @@ AUTOMAKE_OPTIONS= -bindir= ${exec_prefix}/${BINSUBDIR} +if NTP_BINSUBDIR_IS_BIN bin_PROGRAMS= @MAKE_ADJTIMED@ +else +sbin_PROGRAMS= @MAKE_ADJTIMED@ +endif + BUILT_SOURCES= CLEANFILES= EXTRA_PROGRAMS= adjtimed diff --git a/bincheck.mf b/bincheck.mf index c67827dde..326b7aded 100644 --- a/bincheck.mf +++ b/bincheck.mf @@ -3,11 +3,11 @@ # subdir to warn folks if there is another version there. install-exec-hook: - @case ${BINSUBDIR} in \ - bin) ODIR=${exec_prefix}/sbin ;; \ - sbin) ODIR=${exec_prefix}/bin ;; \ - esac; \ - test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \ + @case ${BINSUBDIR} in \ + bin) ODIR=${sbindir} ;; \ + sbin) ODIR=${bindir} ;; \ + esac; \ + test -z "${bin_PROGRAMS}${bin_SCRIPTS}" \ || for i in ${bin_PROGRAMS} ${bin_SCRIPTS} " "; do \ test ! -f $$ODIR/$$i || echo "*** $$i is also in $$ODIR!"; \ done diff --git a/configure.ac b/configure.ac index 636b195b4..5f328357e 100644 --- a/configure.ac +++ b/configure.ac @@ -222,8 +222,10 @@ case "$use_binsubdir" in ;; esac AC_MSG_RESULT($use_binsubdir) + BINSUBDIR=$use_binsubdir AC_SUBST(BINSUBDIR) +AM_CONDITIONAL(NTP_BINSUBDIR_IS_BIN, test "bin" = "$BINSUBDIR") AC_MSG_CHECKING([if we want to use arlib]) AC_ARG_WITH(arlib, diff --git a/ntpd/Makefile.am b/ntpd/Makefile.am index 37d4c30e9..9b1fa44f9 100644 --- a/ntpd/Makefile.am +++ b/ntpd/Makefile.am @@ -1,9 +1,11 @@ NULL= AUTOMAKE_OPTIONS= -bindir= ${exec_prefix}/${BINSUBDIR} - +if NTP_BINSUBDIR_IS_BIN bin_PROGRAMS= ntpd @MAKE_NTPDSIM@ +else +sbin_PROGRAMS= ntpd @MAKE_NTPDSIM@ +endif noinst_LIBRARIES= libntpd.a diff --git a/ntpdate/Makefile.am b/ntpdate/Makefile.am index b162637d9..ea760af9b 100644 --- a/ntpdate/Makefile.am +++ b/ntpdate/Makefile.am @@ -3,9 +3,13 @@ AUTOMAKE_OPTIONS= BUILT_SOURCES= CLEANFILES= -bindir= ${exec_prefix}/${BINSUBDIR} -#bin_PROGRAMS= ntpdate ntptimeset + +if NTP_BINSUBDIR_IS_BIN bin_PROGRAMS= ntpdate +else +sbin_PROGRAMS= ntpdate +endif + EXTRA_PROGRAMS= ntptimeset ntptimeset_SOURCES= ntptimeset.c ntptime_config.c diff --git a/ntpdc/Makefile.am b/ntpdc/Makefile.am index 19eec3ddc..64a056949 100644 --- a/ntpdc/Makefile.am +++ b/ntpdc/Makefile.am @@ -1,8 +1,12 @@ NULL= AUTOMAKE_OPTIONS= -bindir= ${exec_prefix}/${BINSUBDIR} +if NTP_BINSUBDIR_IS_BIN bin_PROGRAMS= ntpdc +else +sbin_PROGRAMS= ntpdc +endif + EXTRA_PROGRAMS= ntpdc-layout EXTRA_DATA= check-layout BUILT_SOURCES= @MAKE_CHECK_LAYOUT@ diff --git a/ntpq/Makefile.am b/ntpq/Makefile.am index a4771a6d7..c847a9345 100644 --- a/ntpq/Makefile.am +++ b/ntpq/Makefile.am @@ -1,7 +1,11 @@ NULL= AUTOMAKE_OPTIONS= +if NTP_BINSUBDIR_IS_BIN bin_PROGRAMS= ntpq +else +sbin_PROGRAMS= ntpq +endif AM_CPPFLAGS= -I$(top_srcdir)/include -I$(top_srcdir)/lib/isc/include \ -I$(top_srcdir)/lib/isc/nothreads/include \ diff --git a/ntpsnmpd/Makefile.am b/ntpsnmpd/Makefile.am index ede645205..0d3f15f7c 100644 --- a/ntpsnmpd/Makefile.am +++ b/ntpsnmpd/Makefile.am @@ -1,7 +1,12 @@ NULL= AUTOMAKE_OPTIONS= +if NTP_BINSUBDIR_IS_BIN +bin_PROGRAMS= @MAKE_NTPSNMPD@ +else sbin_PROGRAMS= @MAKE_NTPSNMPD@ +endif + EXTRA_PROGRAMS= ntpsnmpd ntpsnmpd_SOURCES= netsnmp_daemonize.c ntpsnmpd.c ntpSnmpSubagentObject.c \ ntpsnmpd-opts.c ntpsnmpd-opts.h diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 649b7c12d..a00adc646 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -1,4 +1,8 @@ +if NTP_BINSUBDIR_IS_BIN bin_SCRIPTS= ntp-wait ntptrace +else +sbin_SCRIPTS= ntp-wait ntptrace +endif noinst_SCRIPTS= calc_tickadj checktime freq_adj html2man mkver ntpsweep ntpver plot_summary summary EXTRA_DIST = VersionName cvo.sh fixautomakedepsmagic genCommitLog \ genver hpadjtime.sh monitoring ntp-close ntp-groper ntp-restart \ diff --git a/sntp/Makefile.am b/sntp/Makefile.am index 9575f41b3..5c8af8ec0 100644 --- a/sntp/Makefile.am +++ b/sntp/Makefile.am @@ -16,8 +16,12 @@ run_ag= cd $(srcdir) && \ env PATH="$(abs_builddir):$(PATH)" \ autogen -L ../include --writable -bindir= ${exec_prefix}/${BINSUBDIR} +if NTP_BINSUBDIR_IS_BIN bin_PROGRAMS= sntp +else +sbin_PROGRAMS= sntp +endif + CLEANFILES= libopts-subdir SUBDIRS= diff --git a/sntp/configure.ac b/sntp/configure.ac index 6a4c26e25..348ad4877 100644 --- a/sntp/configure.ac +++ b/sntp/configure.ac @@ -706,8 +706,10 @@ case "$use_binsubdir" in ;; esac AC_MSG_RESULT($use_binsubdir) + BINSUBDIR=$use_binsubdir AC_SUBST(BINSUBDIR) +AM_CONDITIONAL(NTP_BINSUBDIR_IS_BIN, test "bin" = "$BINSUBDIR") AC_CONFIG_FILES([Makefile]) AC_OUTPUT diff --git a/util/Makefile.am b/util/Makefile.am index f546abea7..329160f36 100644 --- a/util/Makefile.am +++ b/util/Makefile.am @@ -2,8 +2,14 @@ NULL= #AUTOMAKE_OPTIONS = ../ansi2knr no-dependencies AUTOMAKE_OPTIONS= +if NTP_BINSUBDIR_IS_BIN bin_PROGRAMS= @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ \ ntp-keygen +else +sbin_PROGRAMS= @MAKE_NTPTIME@ @MAKE_TICKADJ@ @MAKE_TIMETRIM@ \ + ntp-keygen +endif + EXTRA_PROGRAMS= audio-pcm byteorder hist jitter kern longsize \ ntptime pps-api precision sht testrs6000 tg tickadj timetrim