import of ntp-stable-4.2.0a-20040525

This commit is contained in:
danh 2004-06-05 04:34:19 +00:00
parent e8a50919fc
commit edf7da51d6
8 changed files with 171 additions and 0 deletions

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-include_isc_netaddr_h,v 1.1.1.1 2004/06/05 04:34:19 danh Exp $
--- include/isc/netaddr.h.orig 2003-07-26 15:36:12.000000000 -0400
+++ include/isc/netaddr.h 2004-04-20 08:41:22.000000000 -0400
@@ -23,7 +23,6 @@
#include <isc/lang.h>
#include <isc/net.h>
#include <isc/types.h>
-#include "ntp_rfc2553.h"

View File

@ -0,0 +1,11 @@
$OpenBSD: patch-include_ntp_stdlib_h,v 1.1.1.1 2004/06/05 04:34:19 danh Exp $
--- include/ntp_stdlib.h.orig 2003-07-17 06:27:16.000000000 -0400
+++ include/ntp_stdlib.h 2004-04-20 08:31:17.000000000 -0400
@@ -3,7 +3,6 @@
*/
#include <sys/types.h>
#include <sys/socket.h>
-#include "ntp_rfc2553.h"
#include "ntp_types.h"
#include "ntp_string.h"

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-libntp_iosignal_c,v 1.1.1.1 2004/06/05 04:34:19 danh Exp $
--- libntp/iosignal.c.orig 2004-02-25 00:58:05.000000000 -0500
+++ libntp/iosignal.c 2004-06-04 09:42:26.000000000 -0400
@@ -24,7 +24,9 @@
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#endif
-
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
#include <arpa/inet.h>
#if _BSDI_VERSION >= 199510

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-libntp_ntp_rfc2553_c,v 1.1.1.1 2004/06/05 04:34:19 danh Exp $
--- libntp/ntp_rfc2553.c.orig 2004-05-25 07:02:24.000000000 -0400
+++ libntp/ntp_rfc2553.c 2004-06-04 09:45:19.000000000 -0400
@@ -72,11 +72,11 @@
#include <sys/types.h>
#include <ctype.h>
#include <sys/socket.h>
-#include "ntp_rfc2553.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <netdb.h>
+#include "ntp_rfc2553.h"
#include "ntpd.h"
#include "ntp_malloc.h"

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-ntpd_ntpd_c,v 1.1.1.1 2004/06/05 04:34:19 danh Exp $
--- ntpd/ntpd.c.orig 2004-02-25 00:58:13.000000000 -0500
+++ ntpd/ntpd.c 2004-06-04 09:39:45.000000000 -0400
@@ -399,11 +399,16 @@ ntpdmain(
}
#endif
-#if defined(HAVE_GETUID) && !defined(MPE) /* MPE lacks the concept of root */
+#if (defined(HAVE_GETUID) || defined(HAVE_GETEUID)) \
+ && !defined(MPE) /* MPE lacks the concept of root */
{
uid_t uid;
+#if defined(HAVE_GETEUID)
+ uid = geteuid();
+#else
uid = getuid();
+#endif
if (uid)
{
msyslog(LOG_ERR, "ntpd: must be run as root, not uid %ld", (long)uid);

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-ntpd_refclock_shm_c,v 1.1.1.1 2004/06/05 04:34:19 danh Exp $
--- ntpd/refclock_shm.c.orig 2004-02-25 00:58:16.000000000 -0500
+++ ntpd/refclock_shm.c 2004-06-04 14:29:25.000000000 -0400
@@ -222,6 +222,7 @@ shm_poll(
{
register struct shmTime *up;
struct refclockproc *pp;
+ time_t tsec;
/*
* This is the main routine. It snatches the time from the shm
@@ -270,7 +271,8 @@ shm_poll(
pp->lastrec.l_ui += JAN_1970;
/* pp->lasttime = current_time; */
pp->polls++;
- t=gmtime (&tvt.tv_sec);
+ tsec = tvt.tv_sec;
+ t = gmtime (&tsec);
pp->day=t->tm_yday+1;
pp->hour=t->tm_hour;
pp->minute=t->tm_min;

View File

@ -0,0 +1,45 @@
$OpenBSD: patch-ntpdate_ntpdate_c,v 1.1.1.1 2004/06/05 04:34:19 danh Exp $
--- ntpdate/ntpdate.c.orig 2004-05-25 07:02:25.000000000 -0400
+++ ntpdate/ntpdate.c 2004-06-04 09:49:44.000000000 -0400
@@ -10,17 +10,6 @@
#include <netinfo/ni.h>
#endif
-#include "ntp_machine.h"
-#include "ntp_fp.h"
-#include "ntp.h"
-#include "ntp_io.h"
-#include "ntp_unixtime.h"
-#include "ntpdate.h"
-#include "ntp_string.h"
-#include "ntp_syslog.h"
-#include "ntp_select.h"
-#include "ntp_stdlib.h"
-
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
@@ -45,9 +34,23 @@
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif /* HAVE_SYS_RESOURCE_H */
+#ifdef HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif /* HAVE_NETINET_IN_H */
#include <arpa/inet.h>
+#include "ntp_machine.h"
+#include "ntp_fp.h"
+#include "ntp.h"
+#include "ntp_io.h"
+#include "ntp_unixtime.h"
+#include "ntpdate.h"
+#include "ntp_string.h"
+#include "ntp_syslog.h"
+#include "ntp_select.h"
+#include "ntp_stdlib.h"
+
#ifdef __QNXNTO__
# include "adjtime.h"
#endif

View File

@ -0,0 +1,32 @@
$OpenBSD: patch-ntpdc_ntpdc_ops_c,v 1.1.1.1 2004/06/05 04:34:19 danh Exp $
--- ntpdc/ntpdc_ops.c.orig 2004-05-25 07:02:25.000000000 -0400
+++ ntpdc/ntpdc_ops.c 2004-06-04 09:51:19.000000000 -0400
@@ -9,22 +9,22 @@
#include <stdio.h>
#include <stddef.h>
-#include "ntpdc.h"
-#include "ntp_control.h"
-#include "ntp_refclock.h"
-#include "ntp_stdlib.h"
-
#include <ctype.h>
#ifdef HAVE_SYS_TIMEX_H
# include <sys/timex.h>
#endif
#include <netdb.h>
-#if !defined(__bsdi__) && !defined(apollo)
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
#include <arpa/inet.h>
+#include "ntpdc.h"
+#include "ntp_control.h"
+#include "ntp_refclock.h"
+#include "ntp_stdlib.h"
+
/*
* Declarations for command handlers in here
*/