@@ -13,7 +13,7 @@ PIDFILE = "/run/ntpd.pid"
|
|||||||
@synchronized
|
@synchronized
|
||||||
def start():
|
def start():
|
||||||
startService(command="/usr/sbin/ntpd",
|
startService(command="/usr/sbin/ntpd",
|
||||||
args=config.get("OPTIONS", "-x -g -u ntp:ntp -p %s " % PIDFILE),
|
args=config.get("OPTIONS", "-x -u ntp:ntp -p %s " % PIDFILE),
|
||||||
donotify=True)
|
donotify=True)
|
||||||
|
|
||||||
@synchronized
|
@synchronized
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ def start():
|
|||||||
# Eventhough the ntpdate is a oneshot process, the pidfile hack is used to
|
# Eventhough the ntpdate is a oneshot process, the pidfile hack is used to
|
||||||
# work around COMAR's silly status() check in startService()
|
# work around COMAR's silly status() check in startService()
|
||||||
startService(command="/usr/sbin/ntpdate",
|
startService(command="/usr/sbin/ntpdate",
|
||||||
args="%s %s" % (config.get("OPTIONS", "-q -n -g -u ntp -s -b"), tickers),
|
args="%s %s" % (config.get("OPTIONS", "-u ntp -s -b"), tickers),
|
||||||
makepid=True,
|
makepid=True,
|
||||||
pidfile=PIDFILE,
|
pidfile=PIDFILE,
|
||||||
donotify=True)
|
donotify=True)
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Options for ntpdate
|
# Options for ntpdate
|
||||||
OPTIONS="-u ntp -s -b"
|
OPTIONS="-q -u ntp -s -b"
|
||||||
|
|
||||||
# Set to 'yes' to sync hw clock after successful ntpdate
|
# Set to 'yes' to sync hw clock after successful ntpdate
|
||||||
SYNC_HWCLOCK=no
|
SYNC_HWCLOCK=no
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
http://bugs.ntp.org/show_bug.cgi?id=2646
|
||||||
|
https://bugs.gentoo.org/533966
|
||||||
|
|
||||||
|
--- a/ntpd/ntpd.c
|
||||||
|
+++ a/ntpd/ntpd.c
|
||||||
|
@@ -971,8 +971,8 @@ getgroup:
|
||||||
|
char *captext;
|
||||||
|
|
||||||
|
captext = (0 != interface_interval)
|
||||||
|
- ? "cap_sys_time,cap_net_bind_service=pe"
|
||||||
|
- : "cap_sys_time=pe";
|
||||||
|
+ ? "cap_ipc_lock,cap_sys_time,cap_net_bind_service=pe"
|
||||||
|
+ : "cap_ipc_lock,cap_sys_time=pe";
|
||||||
|
caps = cap_from_text(captext);
|
||||||
|
if (!caps) {
|
||||||
|
msyslog(LOG_ERR,
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
https://bugs.gentoo.org/563922
|
||||||
|
http://bugs.ntp.org/show_bug.cgi?id=2906
|
||||||
|
|
||||||
|
--- a/sntp/tests/Makefile.in
|
||||||
|
+++ b/sntp/tests/Makefile.in
|
||||||
|
@@ -783,6 +783,7 @@ base_LDADD = \
|
||||||
|
$(LIBOPTS_LDADD) \
|
||||||
|
$(LDADD_LIBEVENT) \
|
||||||
|
$(top_builddir)/../libntp/libntp.a \
|
||||||
|
+ $(PTHREAD_LIBS) \
|
||||||
|
$(LDADD_LIBNTP) \
|
||||||
|
$(LDADD_NTP) \
|
||||||
|
$(NULL)
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
https://bugs.gentoo.org/711530
|
||||||
|
|
||||||
|
--- ntp-4.2.8p14/ntpd/ntpd.c
|
||||||
|
+++ ntp-4.2.8p14/ntpd/ntpd.c
|
||||||
|
@@ -1189,7 +1189,7 @@
|
||||||
|
* drop privileges in this case.
|
||||||
|
*/
|
||||||
|
cap_t caps;
|
||||||
|
- caps = cap_from_text("cap_sys_time,cap_setuid,cap_setgid,cap_sys_chroot,cap_net_bind_service=pe");
|
||||||
|
+ caps = cap_from_text("cap_ipc_lock,cap_sys_time,cap_setuid,cap_setgid,cap_sys_chroot,cap_net_bind_service=pe");
|
||||||
|
if ( ! caps) {
|
||||||
|
msyslog( LOG_ERR, "cap_from_text() failed: %m" );
|
||||||
|
exit(-1);
|
||||||
@@ -0,0 +1,75 @@
|
|||||||
|
|
||||||
|
Source:
|
||||||
|
https://bugs.ntp.org/show_bug.cgi?id=3688
|
||||||
|
|
||||||
|
Juergen Perlinger 2020-12-24 07:10:49 UTC
|
||||||
|
Created attachment 1760 [details]
|
||||||
|
ultimate patch, v00
|
||||||
|
|
||||||
|
--- a/sntp/log.c 2020-12-24 08:02:05.206004072 +0100
|
||||||
|
+++ a/sntp/log.c 2020-12-24 08:02:05.206004072 +0100
|
||||||
|
@@ -2,7 +2,7 @@
|
||||||
|
|
||||||
|
#include "log.h"
|
||||||
|
|
||||||
|
-const char *progname; /* for msyslog use too */
|
||||||
|
+extern const char *progname; /* for msyslog use too */
|
||||||
|
|
||||||
|
static int counter = 0;
|
||||||
|
|
||||||
|
--- a/sntp/main.c 2020-12-24 08:02:05.210003956 +0100
|
||||||
|
+++ a/sntp/main.c 2020-12-24 08:02:05.210003956 +0100
|
||||||
|
@@ -20,7 +20,6 @@
|
||||||
|
#include "log.h"
|
||||||
|
#include "libntp.h"
|
||||||
|
|
||||||
|
-
|
||||||
|
int shutting_down;
|
||||||
|
int time_derived;
|
||||||
|
int time_adjusted;
|
||||||
|
--- a/sntp/main.h 2020-12-24 08:02:05.210003956 +0100
|
||||||
|
+++ a/sntp/main.h 2020-12-24 08:02:05.210003956 +0100
|
||||||
|
@@ -16,6 +16,14 @@
|
||||||
|
|
||||||
|
#include "crypto.h"
|
||||||
|
|
||||||
|
+/* !Attention! 'progname' must de instantiated in any program that wants
|
||||||
|
+ * to use this library. Putting it into the library breaks a lot of
|
||||||
|
+ * things, since many programs define it itself and then the symbol
|
||||||
|
+ * might end up twice in the linker.
|
||||||
|
+ */
|
||||||
|
+extern const char * progname;
|
||||||
|
+
|
||||||
|
+
|
||||||
|
void set_li_vn_mode(struct pkt *spkt, char leap, char version, char mode);
|
||||||
|
extern int sntp_main(int argc, char **argv, const char *);
|
||||||
|
int generate_pkt(struct pkt *x_pkt, const struct timeval *tv_xmt,
|
||||||
|
--- a/sntp/sntp.c 2020-12-24 08:02:05.210003956 +0100
|
||||||
|
+++ a/sntp/sntp.c 2020-12-24 08:02:05.210003956 +0100
|
||||||
|
@@ -2,6 +2,8 @@
|
||||||
|
|
||||||
|
#include "main.h"
|
||||||
|
|
||||||
|
+const char * progname;
|
||||||
|
+
|
||||||
|
int
|
||||||
|
main (
|
||||||
|
int argc,
|
||||||
|
--- a/sntp/tests/t-log.c 2020-12-24 08:02:05.210003956 +0100
|
||||||
|
+++ a/sntp/tests/t-log.c 2020-12-24 08:02:05.210003956 +0100
|
||||||
|
@@ -3,7 +3,6 @@
|
||||||
|
#include "ntp_types.h"
|
||||||
|
|
||||||
|
|
||||||
|
-//#include "log.h"
|
||||||
|
#include "log.c"
|
||||||
|
|
||||||
|
void setUp(void);
|
||||||
|
--- a/tests/libntp/test-libntp.h 2020-12-24 08:02:05.210003956 +0100
|
||||||
|
+++ a/tests/libntp/test-libntp.h 2020-12-24 08:02:05.210003956 +0100
|
||||||
|
@@ -5,4 +5,4 @@
|
||||||
|
|
||||||
|
time_t timefunc(time_t *ptr);
|
||||||
|
void settime(int y, int m, int d, int H, int M, int S);
|
||||||
|
-time_t nowtime;
|
||||||
|
+extern time_t nowtime;
|
||||||
+6
-21
@@ -30,27 +30,12 @@
|
|||||||
<Dependency>libevent-devel</Dependency>
|
<Dependency>libevent-devel</Dependency>
|
||||||
</BuildDependencies>
|
</BuildDependencies>
|
||||||
<Patches>
|
<Patches>
|
||||||
<!--Patch level="1">fedora/ntp-4.2.6p1-sleep.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.6p1-droproot.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.6p1-bcast.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.6p1-cmsgalign.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.6p2-tentative.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.6p1-retcode.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.6p1-rtnetlink.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.6p2-html2man.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.6p2-htmldoc.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.6p2-mlock.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.6p1-nano.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.4p7-getprecision.patch</Patch>
|
|
||||||
<Patch level="1">fedora/ntp-4.2.6p1-logdefault.patch</Patch>
|
|
||||||
|
|
||||||
ntpstat patches -->
|
|
||||||
<!--<Patch level="0">fedora/ntpstat-0.2-clksrc.patch</Patch>
|
|
||||||
<Patch level="0">fedora/ntpstat-0.2-multipacket.patch</Patch>
|
|
||||||
<Patch level="0">fedora/ntpstat-0.2-sysvars.patch</Patch>
|
|
||||||
<Patch level="0">fedora/ntpstat-0.2-maxerror.patch</Patch-->
|
|
||||||
<Patch level="1">0001-libntp-Do-not-use-PTHREAD_STACK_MIN-on-glibc.patch</Patch>
|
<Patch level="1">0001-libntp-Do-not-use-PTHREAD_STACK_MIN-on-glibc.patch</Patch>
|
||||||
</Patches>
|
<Patch level="1">gentoo/ntp-4.2.8-ipc-caps.patch</Patch>
|
||||||
|
<Patch level="1">gentoo/ntp-4.2.8-sntp-test-pthreads.patch</Patch>
|
||||||
|
<Patch level="1">gentoo/ntp-4.2.8_p14-add_cap_ipc_lock.patch</Patch>
|
||||||
|
<Patch level="1">gentoo/ntp-4.2.8_p15-gcc10.patch</Patch>
|
||||||
|
</Patches>
|
||||||
</Source>
|
</Source>
|
||||||
|
|
||||||
<Package>
|
<Package>
|
||||||
@@ -128,7 +113,7 @@
|
|||||||
|
|
||||||
<History>
|
<History>
|
||||||
<Update release="10">
|
<Update release="10">
|
||||||
<Date>2022-07-31</Date>
|
<Date>2022-07-30</Date>
|
||||||
<Version>4.2.8_p15</Version>
|
<Version>4.2.8_p15</Version>
|
||||||
<Comment>Rebuild.</Comment>
|
<Comment>Rebuild.</Comment>
|
||||||
<Name>Mustafa Cinasal</Name>
|
<Name>Mustafa Cinasal</Name>
|
||||||
|
|||||||
Reference in New Issue
Block a user