Commit Graph

182 Commits

Author SHA1 Message Date
kardel 36f7d8cda6 Import ntp 4.2.2p2 2006-07-29 07:10:38 +00:00
mrg 5609a371c9 make MKCRYPTO=no work again. 2006-06-25 03:02:19 +00:00
kardel d66ddb6f9c use the version that is now in ntp-stable (4.2.2 release branch) 2006-06-18 22:48:51 +00:00
kardel 7d46a5bb55 NetBSD Coverity CID 3804: avoid file pointer leak 2006-06-18 21:35:57 +00:00
kardel 50fd338dac NetBSD Coverity CID 3799: overrun static array (off by one) fixed 2006-06-18 21:30:19 +00:00
kardel e1a3a74084 NetBSD Coverity CID 3797: bad return code check for open(2) fixed
(!fd replaced with fd < 0)
2006-06-18 21:25:13 +00:00
kardel b58f2a229e NetBSD Coverity CID 3796: possible NULL deref 2006-06-18 21:20:35 +00:00
kardel d58917ea1c cope with situations where interface are UP and bound to
INADDR_ANY - ntpd will ignore those interfaces
(bug 637 @bugs.ntp.isc.org)
2006-06-17 12:11:55 +00:00
christos 2e91d940da PR/33724: Scott Ellis: Building a release with MKINET6=no stops in libisc due
to compiler warnings. Fixed misplaced and miscommented #endif
2006-06-13 22:36:36 +00:00
kardel d5b727f28d correct pointer advances broken by previous fix 2006-06-13 21:03:53 +00:00
kardel 3dfb395215 sort out pointer types - found & fix by jmmv 2006-06-12 10:46:19 +00:00
kardel b51cdf6b08 fix pointer deref - found by jmmv 2006-06-12 10:45:27 +00:00
kardel 8704ff927b import and integrate NTP 4.2.2 2006-06-11 19:34:07 +00:00
kardel 9c52afaf31 Import ntp 4.2.2 2006-06-11 14:57:12 +00:00
mrg 995cc7365d initialise tmp_clock() for GCC4. 2006-05-20 19:22:36 +00:00
christos e4162ca0f8 XXX: GCC uninitialized. 2006-05-14 23:36:01 +00:00
christos e75e0ea2a7 another XXX: GCC uninitialized variable. 2006-05-14 01:31:14 +00:00
christos 9da0166ffa Another uninitialized variables XXX: GCC 2006-05-14 01:30:00 +00:00
christos 386c6259af Coverity CID 3497: Don't try to set the day/month if we did not get them
from the clock.
2006-05-13 23:55:23 +00:00
mrg 0fa82c2792 move the extern for clktypes[]'s somewhere it's type is defined. 2006-05-11 00:11:25 +00:00
mrg ebd6722e04 ctl_trap[] is not public so don't extern it. 2006-05-11 00:10:54 +00:00
mrg 084c052803 quell GCC 4.1 uninitialised variable warnings.
XXX: we should audit the tree for which old ones are no longer needed
after getting the older compilers out of the tree..
2006-05-10 21:53:14 +00:00
mrg 0c37c63edc change (mostly) int to socklen_t. GCC 4 doesn't like that int and
socklen_t are different signness.
2006-05-09 20:18:05 +00:00
kardel e01a907378 NetBSD 22 CID 3049,3075: safeguard against (unlikely to impossible) NULL deref 2006-05-04 08:24:05 +00:00
kardel 70ff37328f handle NULL return from d2i_X509() - NetBSD Run 21 Coverity CID 2979 2006-05-02 09:24:19 +00:00
kardel 610b4c0dee dead code: removed (Coverity NetBSD CID 611) 2006-03-29 07:30:30 +00:00
kardel d6c06e8308 fix as discussed in NTP Bug 584, Coverity NetBSD CID 1510 2006-03-29 07:19:34 +00:00
kardel a1cdcab3c8 buffer overrun: backport fix from NTP project (Coverity NetBSD Scan 8: CID 1509) 2006-03-21 11:12:13 +00:00
kardel 15dc7197ee null deref: fix another case of incomplete list handling (Coverity NetBSD Scan 8: CID 986) 2006-03-21 10:28:25 +00:00
kardel dbefff2ee4 error handling: check success of open(2) - bail out early (Coverity CID 1282 NetBSD Scan 5) 2006-03-19 07:20:30 +00:00
kardel 24781071d1 null deref: complete linked list handling beginng condition (Coverity CID 986) 2006-03-19 07:02:47 +00:00
kardel 063cb750db mem leak: unreachable code prevented freeing of allocated memory
(Coverity CID 612 NetBSD Scan 5)
2006-03-18 15:22:34 +00:00
kardel 012eaf5162 null deref: avoid 0 deref (Coverity CID 987 NetBSD Scan 5) 2006-03-18 14:33:20 +00:00
kardel 36ab9cfe6b buffer bounds: one beyond buffer (Coverity CID 1490 NetBSD Scan 5) 2006-03-18 14:25:17 +00:00
kardel a07906a5a8 buffer bounds: buffer full condition wrong for bounds check (Coverity CID 1508 NetBSD Scan 5) 2006-03-18 14:18:59 +00:00
kardel 630d3f115c buffer bounds: correct > - >= error for bounds check (Coverity CID 1511 NetBSD Scan 5) 2006-03-18 14:08:29 +00:00
kardel 99c0e2540c buffer bounds: clamp index for epobuf to buffer bounds (Coverity CID 1512 NetBSD Scan 5) 2006-03-18 14:02:13 +00:00
kardel 80b13f6f4e mem leakage: free old malloced buffer on errors (Coverity CID 2056 NetBSD Scan 5) 2006-03-18 13:44:15 +00:00
kardel ee0722e2b9 avoid close(-1): don't attempt to cleanup INVALID_SOCKET ( ==-1 ) fd's - would lead to close(-1) and FD_CLR((u_int)-1(!), ...) (Coverity CID 1281 NetBSD Scan 5) 2006-03-18 13:13:25 +00:00
kardel 9429ea9653 null deref: backport current ntp code to fix (Coverity CID 759) 2006-03-18 12:40:48 +00:00
kardel 58ad32062f Coverity NetBSD scan CID 2055: fallout fix return/fclose -> fclose/return 2006-03-18 09:28:50 +00:00
kardel e13d171a8e resource leak (fd/mem): fclose() streams on error (Coverity NetBSD scan CID 2055) 2006-03-18 09:26:08 +00:00
kardel 589ea6e802 resource leak (fd/mem): close stream when errors occur (Coverity NetBSD Scan CID 2054) 2006-03-18 08:57:25 +00:00
kardel 862343544d resolve CID 808 for the general case (code didn't trigger it - constant strings were supplied ) 2006-03-18 08:09:03 +00:00
elad 77e1c3c1fc Fix off-by-one, found by Coverity. CID 1466. 2006-03-18 02:35:47 +00:00
kardel 9bccbf4462 Coverity fixes:
CID
687	missing block
988	null pointer deref on shutdown (on open failure - introduced by
	change of contract in ntp_refclock.c)
989	null pointer for private data (could not happen - safeguard anyway)
1513	off by one
2410	misplaced null pointer test
2006-03-18 00:30:30 +00:00
christos 5ca310136d deal with const in the new openssl 2005-11-26 01:10:42 +00:00
christos 19d0f25ed5 PR/31580: Miles Nordin 'ntptime' no longer reports ERROR and UNSYNC when ntpd
isn't synchronized (ntpd bug #506)
2005-10-20 15:41:01 +00:00
elad a615d99b28 Use group-id from ``gr'' and not ``pw''.
Fixes security issue addressed by CAN-2005-2496.
Thanks to Adrian Portelli for notifying me about this.
2005-10-13 14:58:23 +00:00
lukem f7e488f953 Don't attempt to use an uninitialized variable when there's no interfaces.
Detected with gcc -Wuninitialized.
2005-06-03 16:13:33 +00:00
riz 254aabe783 There was a change from usecs to nsecs between ntpd 4.1.1 and 4.2.0 -
take this into account correctly.  From ntp-current via Brian Buhrow
in PR#29685.  Approved by christos.
2005-05-21 01:47:09 +00:00
christos aba19ee8af Double the stack space limit. We are running out with ntp.pool.org. 2005-04-05 20:56:58 +00:00
lukem c6f2cec0b0 include <isc/net.h> so that -UWANT_IPV6 compiles correctly. 2005-01-10 02:14:46 +00:00
dsl 968ad08000 Stop argument to ctype function being char 2004-10-30 15:01:32 +00:00
christos 72f840350f PR/27210: Paul Shupak: "ntpd"'s NEMA driver has 8 units, but MAX_UNITS
is #defined as 4.
2004-10-10 22:13:04 +00:00
christos 766798b654 PR/27137: Martin J. Laubach: core dump when localhost does not support
a given address family and a peer only supports the family localhost does
not support. For example: configure a kernel without IPV6, and then
add a line in ntp.conf server <ipv6addr>. We report that the server is
unreachable and we keep going because there might be more servers around?
XXX: What if it is the last server? Should we detect this? It is not nice
to just bail on this error, because a server might lose its ipv4 address
and only advertise ipv6.
2004-10-05 03:34:38 +00:00
christos 6e1b89d727 80K of stack is not enough for a 64 bit machine, and we got crashes on
sparc64. change 20 * 4096 to 5 * 4096 * sizeof(void *). This is again
very little, but enough :-). If you see a crash again, don't blame the
nameserver code before you change this constant.
2004-06-29 04:16:37 +00:00
drochner e917a2fcb1 ignore 0.0.0.0 interface addresses (dhclient leftovers) 2004-02-26 18:17:13 +00:00
fredb 8f443ee26a Don't bother complaining about "no IPv6 interfaces" or "no IPv4 interfaces"
unless debugging is compiled in and enabled. Adapted from ntp-dev. Closes
PR bin/23703, by Martin Husemann.
2003-12-20 17:38:19 +00:00
keihan 9f474dc36a Make "-s" option silent again, fixes PR bin/23707.
This has been fixed in current ntp-dev and also includes
some whitespace fixes.  NTP bug report available at:

http://bugzilla.ntp.org/show_bug.cgi?id=263
2003-12-20 16:12:27 +00:00
drochner a273546bc0 pull in a set of patches from ntp bk to fix the
"Clock stepping messes up frequency." issue
2003-12-04 17:22:31 +00:00
drochner 507fa5fee7 compile cleanly with -Wall (ntp bug #258) 2003-12-04 17:17:36 +00:00
drochner 35f545891e fix some memory allocation bugs (ntp bug #252) 2003-12-04 17:15:26 +00:00
drochner a3d91b3051 fix error handling after send errors (ntp bug #243) 2003-12-04 17:13:11 +00:00
drochner 849e83ebc4 fix some LP64 issues (ntp bug #233) 2003-12-04 17:10:34 +00:00
drochner 93cc3883d8 use return value of openssl's RAND_file_name(), this makes the
fallback to /dev/urandom work as intended by openssl
(ntp bug #234)
2003-12-04 17:06:12 +00:00
drochner 7b3a4acbea don't join a multicast group where we just want to send
(this might be preliminary, it might be intended to receive other host's
multicast in the future, but until packets are filtered properly this
fixes the "manycastclient answers requests" problem - see ntp bug #241)
2003-12-04 17:01:32 +00:00
drochner 74a4307696 deal with sin6_scope_id where necessary 2003-12-04 16:56:01 +00:00
drochner 3cdd2cee5f keep track of the scope id of link-local ipv6 addresses, and deal with
the KAME specific way to embed it into the address
(keeping the interface close to the last public bind-9.3 snapshot to
avoid conflicts in the future)
2003-12-04 16:52:28 +00:00
drochner d5e6f1b80b resolve conflicts
(in this case, throw away all local modifications; I'll start patching
from scratch)
2003-12-04 16:23:34 +00:00
drochner b21928a34e Import ntp 4.2.0 2003-12-04 16:05:14 +00:00
simonb a1f8e60591 Update for CVS repo basesrc/src change (many moons ago). 2003-10-23 02:23:26 +00:00
agc 865595bdf3 Move UCB-licensed code from 4-clause to 3-clause licence.
Patches provided by Joel Baker in PR 22253, verified by myself.
2003-08-07 09:20:39 +00:00
cb ee482404e6 Output key IDs in decimal, not hexadecimal, so that they can
be read back later.

fixes PR#14216. ok by Simon Burge (and by him via ntp distribution)
2003-07-16 12:22:58 +00:00
itojun 93851338f2 sscanf overrun 2003-05-17 01:12:28 +00:00
wiz 0acfa3bb9e Consistently spell occurrence with two rs. 2003-03-29 22:48:37 +00:00
wiz 447edbab8d hexadecimal, not hexidecimal. Reported to the authors. 2003-03-16 21:54:46 +00:00
wiz 990562bfef .Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.
2003-02-25 10:34:36 +00:00
jdolecek 28f3685337 use correct group id if group was specified for -u; previously, it would
mistakely use user's primary group instead
problem reported and fix supplied in PR bin/20232 by KAMADA Ken'ichi
2003-02-08 11:45:54 +00:00
wiz dd5bd120af Various misspellings, from Adrian Mrva. 2002-12-21 12:37:49 +00:00
wiz 34574e798b outgoing with a final g, not t; from Adrian Mrva. 2002-12-21 12:32:24 +00:00
thorpej e733469648 Avoid strict alias warnings. 2002-12-06 15:12:56 +00:00
thorpej 47355062e5 Avoid strict alias warning. 2002-12-06 15:09:38 +00:00
uwe fd3534dbc5 Nit-pick: use || instead of | in the test. Ok by simonb. 2002-09-20 14:09:45 +00:00
wiz 111e203639 Comment out token after #endif. 2002-05-16 19:53:37 +00:00
wiz 79deb5d12d Comment out token after #endif. 2002-05-16 19:40:53 +00:00
wiz 98d39977a3 Remove token after #endif. 2002-05-16 19:30:17 +00:00
drochner 1fba973e56 make it build without REFCLOCK but with -Wall 2002-04-19 20:45:54 +00:00
christos 590eabc9c6 Set the stack limit to something smaller than the default, like it is
done in the aix case so that we don't end up mlockall() unused memory.
From: witek@wnuk.eu.org (Witold J. Wnuk)
2002-04-18 23:18:42 +00:00
thorpej 64b4b1c3c3 Don't use static const u_char ... for register bits. Use #define. 2002-04-09 02:42:50 +00:00
mason be7a76e49f document -i and -u in the man page 2002-02-21 17:10:14 +00:00
wiz 78cb877358 Try to remove some more unnecessary whitespace when converting. 2002-01-19 11:43:47 +00:00
martin 114dbddbad Make ntpd use the getifaddrs interface, thus avoiding alignement
problems (see port-sparc64/15112).

This change will be submitted to the NTP maintainers as well.
2002-01-05 13:24:40 +00:00
martin 6db2d4b116 Back out previous change - turns out to be a sparc64 toolchain problem
(surprise!)
2002-01-03 11:22:07 +00:00
martin 357b95fa25 Replace a structure copy (dereferencing a pointer received from an ioctl)
by a memcpy, similar to the patch suggested by jarle@uninett.no in PR 15112.
I'm not sure if the ioctl code should be fixed to deliver this pointer
properly aligned, but this change should not cause any problem and it is
safer this way.
2002-01-02 20:47:37 +00:00
wiz 546fc71d49 Pull over fixes from rev. 1.5-1.7 of basesrc/usr.sbin/ntp/ntpd/ntpd.8. 2001-12-26 15:14:59 +00:00
wiz b4371d47f5 Replace some misuses of "then" with "than". 2001-12-04 17:56:30 +00:00
wiz 1fd7eeefcd "than" instead of "then". 2001-11-21 19:14:19 +00:00
christos a9add05994 s/%%m/%m/ 2001-11-12 03:06:44 +00:00
manu 22376d8b65 Fixed a small bug in -u option parsing (it only worked if you supplied a
user *and* a group)
2001-11-08 20:06:22 +00:00