Commit Graph

135 Commits

Author SHA1 Message Date
christos
97b3f8422e - make the append function to not append past the end of the string
- use the append function some more
2012-08-12 06:16:51 +00:00
kardel
b3d86d3e3a fix some fallout from append correction 2012-08-11 20:09:08 +00:00
christos
9bfa795a77 Homogenize all strn{cpy,cat} and snprintf() to a single append function to
prevent incorrect usage and buffer overflow.
2012-08-10 08:22:49 +00:00
joerg
ab7e24ab4b Disable warning about broken strncat usage from clang for now.
The code is technically not going to overflow, but completely messed up.
2012-08-09 14:40:52 +00:00
jnemeth
98f55161d5 PR/46612 - Lloyd Parkes -- add a terminating newline to error messages 2012-06-25 20:23:43 +00:00
christos
720edde670 fix printf format. 2012-02-09 17:53:56 +00:00
christos
b8867d0ef6 There is no point in creating an entry point for emalloc(), when all the other
functions are just defined in terms of ereallocz(). Fixes the sun2 build
because it avoids the conflict with emalloc() from libutil.
2012-02-04 16:31:02 +00:00
he
dedd1c6538 Re-define emalloc(arg) to ntp_emalloc(arg), so that this can be linked
statically on NetBSD as well, since emalloc() conflicts with the entry
on our -lutil.
2012-02-04 14:56:58 +00:00
christos
5744870aac cleanup compilation (not TRT, but the expedient way) 2012-02-03 21:36:40 +00:00
christos
26053bd797 don't bother with ifdef's, just grab the biggest type you can. 2012-02-03 21:35:55 +00:00
christos
6a250e03e2 cleanup last warnings, and remove local warnings overrides. 2012-02-03 16:33:10 +00:00
christos
0c82c01637 using 2 casts to fix an unsigned-signed comparison is a sign that this it
is done incorrectly. The RHS is guaranteed positive at this point so cast
it to unsigned to match the LHS.
2012-02-03 14:36:51 +00:00
kardel
2bc1b7bd9a Clang compile fix from Joerg Sonneberger approved by releng. 2012-02-03 10:20:29 +00:00
kardel
2f3ccb499e cleanup printf fmt differences between i386/amd64 2012-02-01 22:48:15 +00:00
kardel
617a40a056 use WARNS=0 until const issue is resolved 2012-02-01 21:22:19 +00:00
kardel
9b98de2bc5 initialize min_dist 2012-02-01 21:21:25 +00:00
kardel
cb314bfae7 build libopts with WARNS=0 for now 2012-02-01 20:49:09 +00:00
kardel
a2545411b3 back to WARNS=4 (constify and signedness corrections) 2012-02-01 20:48:01 +00:00
kardel
f6ba422c0a bin/45906: regenerate ntpd/ntp_keyword.h to accommodate our changes 2012-02-01 13:01:29 +00:00
kardel
10c9c4f431 add libotps for autoopts headers to CPPFLAGS 2012-02-01 08:15:21 +00:00
kardel
51c5c0eb79 NTP 4.2.6p5 (Harlan Stenn <stenn@ntp.org>, 2011/12/24)
Focus: Bug fixes

Severity: Medium

This is a recommended upgrade.

This release updates sys_rootdisp and sys_jitter calculations to match the
RFC specification, fixes a potential IPv6 address matching error for the
"nic" and "interface" configuration directives, suppresses the creation of
extraneous ephemeral associations for certain broadcastclient and
multicastclient configurations, cleans up some ntpq display issues, and
includes improvements to orphan mode, minor bugs fixes and code clean-ups.

New features / changes in this release:

ntpd

 * Updated "nic" and "interface" IPv6 address handling to prevent
   mismatches with localhost [::1] and wildcard [::] which resulted from
   using the address/prefix format (e.g. fe80::/64)
 * Fix orphan mode stratum incorrectly counting to infinity
 * Orphan parent selection metric updated to includes missing ntohl()
 * Non-printable stratum 16 refid no longer sent to ntp
 * Duplicate ephemeral associations suppressed for broadcastclient and
   multicastclient without broadcastdelay
 * Exclude undetermined sys_refid from use in loopback TEST12
 * Exclude MODE_SERVER responses from KoD rate limiting
 * Include root delay in clock_update() sys_rootdisp calculations
 * get_systime() updated to exclude sys_residual offset (which only
   affected bits "below" sys_tick, the precision threshold)
 * sys.peer jitter weighting corrected in sys_jitter calculation

ntpq

 * -n option extended to include the billboard "server" column
 * IPv6 addresses in the local column truncated to prevent overruns

---
NTP 4.2.6p4 (Harlan Stenn <stenn@ntp.org>, 2011/09/22)

Focus: Bug fixes and portability improvements

Severity: Medium

This is a recommended upgrade.

This release includes build infrastructure updates, code
clean-ups, minor bug fixes, fixes for a number of minor
ref-clock issues, and documentation revisions.

Portability improvements affect AIX, HP-UX, Linux, OS X and 64-bit time_t.

New features / changes in this release:

Build system

* Fix checking for struct rtattr
* Update config.guess and config.sub for AIX
* Upgrade required version of autogen and libopts for building
  from our source code repository

ntpd

* Back-ported several fixes for Coverity warnings from ntp-dev
* Fix a rare boundary condition in UNLINK_EXPR_SLIST()
* Allow "logconfig =allall" configuration directive
* Bind tentative IPv6 addresses on Linux
* Correct WWVB/Spectracom driver to timestamp CR instead of LF
* Improved tally bit handling to prevent incorrect ntpq peer status reports
* Exclude the Undisciplined Local Clock and ACTS drivers from the initial
  candidate list unless they are designated a "prefer peer"
* Prevent the consideration of Undisciplined Local Clock or ACTS drivers for
  selection during the 'tos orphanwait' period
* Prefer an Orphan Mode Parent over the Undisciplined Local Clock or ACTS
  drivers
* Improved support of the Parse Refclock trusttime flag in Meinberg mode
* Back-port utility routines from ntp-dev: mprintf(), emalloc_zero()
* Added the NTPD_TICKADJ_PPM environment variable for specifying baseline
  clock slew on Microsoft Windows
* Code cleanup in libntpq

ntpdc

* Fix timerstats reporting

ntpdate

* Reduce time required to set clock
* Allow a timeout greater than 2 seconds

sntp

* Backward incompatible command-line option change:
  -l/--filelog changed -l/--logfile (to be consistent with ntpd)

Documentation

* Update html2man. Fix some tags in the .html files
* Distribute ntp-wait.html

---
NTP 4.2.6p3 (Harlan Stenn <stenn@ntp.org>, 2011/01/03)

Focus: Bug fixes and portability improvements

Severity: Medium

This is a recommended upgrade.

This release includes build infrastructure updates, code
clean-ups, minor bug fixes, fixes for a number of minor
ref-clock issues, and documentation revisions.

Portability improvements in this release affect AIX, Atari FreeMiNT,
FreeBSD4, Linux and Microsoft Windows.

New features / changes in this release:

Build system
* Use lsb_release to get information about Linux distributions.
* 'test' is in /usr/bin (instead of /bin) on some systems.
* Basic sanity checks for the ChangeLog file.
* Source certain build files with ./filename for systems without . in PATH.
* IRIX portability fix.
* Use a single copy of the "libopts" code.
* autogen/libopts upgrade.
* configure.ac m4 quoting cleanup.

ntpd
* Do not bind to IN6_IFF_ANYCAST addresses.
* Log the reason for exiting under Windows.
* Multicast fixes for Windows.
* Interpolation fixes for Windows.
* IPv4 and IPv6 Multicast fixes.
* Manycast solicitation fixes and general repairs.
* JJY refclock cleanup.
* NMEA refclock improvements.
* Oncore debug message cleanup.
* Palisade refclock now builds under Linux.
* Give RAWDCF more baud rates.
* Support Truetime Satellite clocks under Windows.
* Support Arbiter 1093C Satellite clocks under Windows.
* Make sure that the "filegen" configuration command defaults to "enable".
* Range-check the status codes (plus other cleanup) in the RIPE-NCC driver.
* Prohibit 'includefile' directive in remote configuration command.
* Fix 'nic' interface bindings.
* Fix the way we link with openssl if openssl is installed in the base
  system.

ntp-keygen
* Fix -V coredump.
* OpenSSL version display cleanup.

ntpdc
* Many counters should be treated as unsigned.

ntpdate
* Do not ignore replies with equal receive and transmit timestamps.

ntpq
* libntpq warning cleanup.

ntpsnmpd
* Correct SNMP type for "precision" and "resolution".
* Update the MIB from the draft version to RFC-5907.

sntp
* Display timezone offset when showing time for sntp in the local
  timezone.
* Pay proper attention to RATE KoD packets.
* Fix a miscalculation of the offset.
* Properly parse empty lines in the key file.
* Logging cleanup.
* Use tv_usec correctly in set_time().
* Documentation cleanup.

---
NTP 4.2.6p2 (Harlan Stenn <stenn@ntp.org>, 2010/07/08)

Focus: Bug fixes and portability improvements

Severity: Medium

This is a recommended upgrade.

This release includes build infrastructure updates, code
clean-ups, minor bug fixes, fixes for a number of minor
ref-clock issues, improved KOD handling, OpenSSL related
updates and documentation revisions.

Portability improvements in this release affect Irix, Linux,
Mac OS, Microsoft Windows, OpenBSD and QNX6

New features / changes in this release:

ntpd
* Range syntax for the trustedkey configuration directive
* Unified IPv4 and IPv6 restrict lists

ntpdate
* Rate limiting and KOD handling

ntpsnmpd
* default connection to net-snmpd via a unix-domain socket
* command-line 'socket name' option

ntpq / ntpdc
* support for the "passwd ..." syntax
* key-type specific password prompts

sntp
* MD5 authentication of an ntpd
* Broadcast and crypto
* OpenSSL support

---
NTP 4.2.6p1 (Harlan Stenn <stenn@ntp.org>, 2010/04/09)

Focus: Bug fixes, portability fixes, and documentation improvements

Severity: Medium

This is a recommended upgrade.
2012-02-01 07:54:58 +00:00
kardel
3123f114e2 merge import ntp-4-2-6p5 2012-02-01 07:46:20 +00:00
kardel
f003fb54cd Import ntp 4.2.6p5 2012-01-31 21:18:50 +00:00
kardel
7f5b6b22a1 fix instructions in comment part 2012-01-31 20:05:13 +00:00
christos
6ee25ca9b9 use cleantags, instead of home grown copy. 2011-10-08 19:28:38 +00:00
he
89071b8936 Make this build again: include <err.h> when needed, and don't
shadow err() with a local variable called err...
2011-09-22 16:05:11 +00:00
christos
144b6f2c66 Check result of malloc (Maksymilian Arciemowicz) 2011-09-22 12:40:48 +00:00
joerg
ba0add90b0 Disable noreturn checks for remaining external code 2011-09-16 16:41:20 +00:00
joerg
2ae99cf42b There is no such thing as WARNS=5. 2011-09-16 16:29:12 +00:00
christos
3eb92d7759 PR/45308: Manuel Bouyer: Update list of broadcast addresses after updating
interfaces.
2011-09-14 16:18:29 +00:00
joerg
0855702cc7 Use of non-literal format strings 2011-08-25 16:29:39 +00:00
christos
9c35de859b widen the type to avoid gcc warning about shifting too much. 2011-08-17 09:32:55 +00:00
christos
058f310f02 - proper varyadic warning and error
- don't call syslog with a buffer, use %s first.
2011-08-16 05:28:44 +00:00
christos
05d3ffd600 - it is not the 80's anymore, use proper varargs
- no need to exit again, error does
2011-08-16 05:24:20 +00:00
christos
7fdb569fcb - document non-literal strings
- fix bad security practices: {msyslog,syslog,printf}(buffer) ->
    {msyslog,syslog,printf}("%s", buffer)
- use an anonymous union to avoid type punning casts
- re-order expression to avoid integer overflow
2011-08-16 05:15:20 +00:00
christos
afec221346 - fixes for non-literal strings
- add missing strbuf initialization
2011-08-16 04:45:17 +00:00
joerg
d43405d38d -Wno-array-bounds is no longer needed for clang here 2011-08-09 13:00:58 +00:00
mrg
db3c8201d3 avoid an overflow condition. 2011-07-01 02:18:54 +00:00
mrg
1b7bb725cc avoid a potential uninitialised variable problem. 2011-07-01 02:18:37 +00:00
mrg
56349c28d3 use __unused instead of having a function call itself, to provide an
empty translation unit.
2011-06-29 02:41:03 +00:00
mrg
c64370a6d5 fix a potential off-by-two array overflow found by GCC 4.5.3. 2011-06-22 03:59:49 +00:00
mrg
c111245a78 apply some -Wno-error and/or -fno-strict-aliasing.
all of this should be looked at closer, but some of them are not
very trivial.
2011-06-22 02:49:41 +00:00
kardel
2734092359 fix lineedit functionality. ntpq and friends would just exit on empty lines
which is not intended - there is a quit command for that purpose.
2011-06-19 15:58:07 +00:00
joerg
a216da57a6 Default to -Wno-sign-compare -Wno-pointer-sign for clang.
Push -Wno-array-bounds down to the cases that depend on it.
Selectively disable warnings for 3rd party software or non-trivial
issues to be reviewed later to get clang -Werror to build most of the
tree.
2011-05-26 12:56:24 +00:00
gdt
c93631d028 Don't copy ntpq.1 to ntpq.8 before overwriting it.
"foo > bar" fails when bar is mode 444, and files copied from the
source tree should be expected to perhaps be read only.  However, the
copy should have been removed when the sed was added.  And, it never
should have been "@"; suppressing it made debugging this harder than
it should have been.
2011-02-27 12:42:44 +00:00
plunky
f4ffd55a5b setting USE_FORT=yes means that memmove() becomes a macro, and the
#ifdef inside the macro arguments is undefined behaviour (pcc reports
a syntax error)

This was fixed upstream so change this to be the same as the 4.2.6p3
stable release of ntp (can't find an actual changelog entry that
describes this, so have included the memcpy change also - memmove
is not required here)
2011-02-27 12:10:18 +00:00
plunky
e9bb66e7cf clean up man files copied during build
also.. while we are putting the pages into different sections,
lets change the manpage contents to reflect that
2011-02-26 19:17:37 +00:00
kardel
4ba751f5ad make ntp compile for MKINET6=no 2011-01-09 14:49:39 +00:00
christos
e19314b713 Pretending that %d can print size_t on __LP64__, by turning off warnings
is not really a good idea.  Turn on the warnings and fix them. Unfortunately
there are a bunch of const-castaways... Should be fed upstream.
2010-12-04 23:08:32 +00:00
christos
632ebb6b6e fix typo caused mdnstries not to work. 2010-11-30 15:00:10 +00:00
christos
960613872d Add a new config keyword "mdnstries" that can be set to 0 to disable mdns. 2010-11-29 00:39:40 +00:00
christos
b155e612fc PR/44052: Takahiro HAYASHI: chrooted ntpd refers freed memory
As mentioned in the pr, process_routing_msgs can delete the current reader,
so cache the next element before calling it.
2010-11-06 20:40:12 +00:00
christos
3b2862d165 fix typo. From Anon Ymous 2010-09-22 14:37:08 +00:00
kardel
3319d8f1fd fix MKINET6=no compile 2010-09-04 17:06:06 +00:00
he
38fc53798e Another addition of -lterminfo after -ledit, so this links statically as well. 2010-09-01 16:43:39 +00:00
he
e7d5fad5e6 Add -lterminfo after -ledit, so that this links when doing static
linking as well (found when building for the sun2 target).
2010-09-01 16:26:11 +00:00
he
35c0cfeaba Vax doesn't have IEEE floating point. 2010-09-01 13:46:58 +00:00
kardel
72a98abb7e support to follow NetBSD build options for
MKCRYPTO
	MKMDNS
	MKINET6
2010-08-29 18:55:50 +00:00
kardel
d9d9735e8e make IPV6 support decision consistent with code in ntp_io.c 2010-08-29 18:54:30 +00:00
kardel
7d91f4fb19 remove commented out cruft 2010-08-29 18:52:59 +00:00
kardel
f7077f6660 only refer to libdns_sd when mDNS is compiled in 2010-08-29 11:15:32 +00:00
kardel
ef0ff97775 make mDNS registration depend on compile time build option MKMDNS 2010-08-29 10:13:07 +00:00
kardel
2092893b1f using a char * as timeout value is a unique concept - atol() the string 2010-08-28 20:54:24 +00:00
kardel
9893a031e7 don't return an int casted pointer as 'boolean' value - compare result of strchr with NULL 2010-08-28 20:52:55 +00:00
kardel
457fd0a5a5 disable .y.c rule - ntp_parser.y needs bison which is not part of the tool chain 2010-08-28 20:51:08 +00:00
kardel
179b12252e add installation of manual pages, html files and up to now missing commands (sntp, ntptrace) 2010-08-28 15:42:45 +00:00
kardel
2dee21c22b .sp only takes a single arg 2010-08-28 15:40:24 +00:00
kardel
e2516bcdc0 fix DEBUG compilation 2010-08-28 15:39:25 +00:00
kardel
43632c662f remove uncondition #define DEBUG 2010-08-28 15:38:55 +00:00
tonnerre
89ba794efc Prevent ntpd instances from sending MODE_PRIVATE error responses back and
forth. This resolves CVE-2009-3563, but it should be noted that nobody uses
this code so far, so this is more of a preventive update than a security
one.
2010-04-25 22:50:11 +00:00
christos
e28d07b4f4 put back -Werror 2009-12-14 02:09:39 +00:00
christos
71af8d5cf6 constify 2009-12-14 00:49:45 +00:00
christos
10afd40910 fix bogus ctype casts 2009-12-14 00:46:21 +00:00
christos
065f57e189 fix for long long time_t 2009-12-14 00:43:58 +00:00
christos
9cf8c53771 don't warn about SLEW; ntpd defines it! 2009-12-14 00:43:09 +00:00
christos
e589aa514b use initgroups/setgroups
proper types for uid and gid.
2009-12-14 00:42:47 +00:00
christos
eff9ac27fd fix debug printf format
fix bogus ctype cast
2009-12-14 00:42:21 +00:00
christos
5dd48b0c34 bring back our status printing function 2009-12-14 00:41:03 +00:00
christos
61c775be3f constify 2009-12-14 00:40:26 +00:00
christos
ed38567fda fix bogus ctype casts 2009-12-14 00:38:48 +00:00
christos
7b8fd1634b don't redefine NANOSECOND 2009-12-14 00:38:20 +00:00
christos
7cabe5d03b (unsigned char) for ctype functions. 2009-12-13 23:25:40 +00:00
christos
20051da22f int/long portability. 2009-12-13 23:25:24 +00:00
kardel
1ca06f9c92 initial version of reachover make- and support-files 2009-12-13 17:13:47 +00:00
kardel
abb0f93cd7 Import ntp 4.2.6 2009-12-13 16:51:59 +00:00