[Git][NTPsec/ntpsec][master] 4 commits: Fix typo in comment

Hal Murray gitlab at mg.gitlab.com
Wed Mar 29 09:59:37 UTC 2017


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
1bdcdff8 by Hal Murray at 2017-03-29T00:49:51-07:00
Fix typo in comment

- - - - -
92117675 by Hal Murray at 2017-03-29T00:49:51-07:00
Remove unused clutter from config.h

- - - - -
eac09b6a by Hal Murray at 2017-03-29T00:49:51-07:00
Remove NTPSEC_VERSION_{MAJOR,MINOR,REV} from config.h

Leave code as comments in case we need them tomorrow.

- - - - -
c7aca552 by Hal Murray at 2017-03-29T01:13:07-07:00
Add statfs and uname to OK list of syscalls.

Used by recent Fedora DNS lookup.  (where recent is quite old)

- - - - -


3 changed files:

- ntpd/ntp_monitor.c
- ntpd/ntp_sandbox.c
- wafhelpers/configure.py


Changes:

=====================================
ntpd/ntp_monitor.c
=====================================
--- a/ntpd/ntp_monitor.c
+++ b/ntpd/ntp_monitor.c
@@ -55,7 +55,7 @@ mon_entry	mon_mru_list;	/* mru listhead */
 u_int		mru_entries;	/* mru list count */
 
 /*
- * List of free structures structures, and counters of in-use and total
+ * List of free structures, and counters of in-use and total
  * structures. The free structures are linked with the hash_next field.
  */
 static  mon_entry *mon_free;		/* free list or null if none */


=====================================
ntpd/ntp_sandbox.c
=====================================
--- a/ntpd/ntp_sandbox.c
+++ b/ntpd/ntp_sandbox.c
@@ -350,15 +350,16 @@ int scmp_sc[] = {
         SCMP_SYS(unlink),
 
 #ifdef ENABLE_DNS_LOOKUP
-	/* Needed for threads */
-	SCMP_SYS(clone),
+	SCMP_SYS(clone),	/* threads */
+	SCMP_SYS(exit),
+	SCMP_SYS(futex),	/* sem_xxx */
 	SCMP_SYS(madvise),
 	SCMP_SYS(mprotect),
 	SCMP_SYS(set_robust_list),
-	SCMP_SYS(exit),
-	SCMP_SYS(futex),	/* sem_xxx */
 	SCMP_SYS(sendmmsg),	/* DNS lookup */
 	SCMP_SYS(socketpair),
+	SCMP_SYS(statfs),
+	SCMP_SYS(uname),
 #endif
 
 #ifdef HAVE_UTMPX_H
@@ -420,7 +421,7 @@ int scmp_sc[] = {
 static void catchTrap(int sig)
 {
 	UNUSED_ARG(sig);	/* signal number */
-	msyslog(LOG_ERR, "SIGSYS: got a trap.  Bailing.");
+	msyslog(LOG_ERR, "SIGSYS: got a trap. Probably seccomp omission. Bailing.");
 	exit(1);
 }
 #endif /* HAVE_SECCOMP */


=====================================
wafhelpers/configure.py
=====================================
--- a/wafhelpers/configure.py
+++ b/wafhelpers/configure.py
@@ -48,12 +48,14 @@ def cmd_configure(ctx, config):
     ctx.env.NTPSEC_VERSION = "%s.%s.%s" % (ctx.env.NTPSEC_VERSION_MAJOR,
                                            ctx.env.NTPSEC_VERSION_MINOR,
                                            ctx.env.NTPSEC_VERSION_REV)
-    ctx.define("NTPSEC_VERSION_MAJOR", ctx.env.NTPSEC_VERSION_MAJOR,
-               comment="Major version number")
-    ctx.define("NTPSEC_VERSION_MINOR", ctx.env.NTPSEC_VERSION_MINOR,
-               comment="Minor version number")
-    ctx.define("NTPSEC_VERSION_REV", ctx.env.NTPSEC_VERSION_REV,
-               comment="Revision version number")
+# These are not currently used via config.h so remove clutter.
+# Leave as comments in case we want them tomorrow.
+#    ctx.define("NTPSEC_VERSION_MAJOR", ctx.env.NTPSEC_VERSION_MAJOR,
+#               comment="Major version number")
+#    ctx.define("NTPSEC_VERSION_MINOR", ctx.env.NTPSEC_VERSION_MINOR,
+#               comment="Minor version number")
+#    ctx.define("NTPSEC_VERSION_REV", ctx.env.NTPSEC_VERSION_REV,
+#               comment="Revision version number")
 
     ctx.env.OPT_STORE = config["OPT_STORE"]
 
@@ -397,16 +399,6 @@ int main(int argc, char **argv) {
     if ctx.env.DEST_OS == "openbsd":
         ctx.define("PLATFORM_OPENBSD", "1", quote=False)
 
-    # int32_t and uint32_t probes aren't really needed, POSIX guarantees
-    # them.  But int64_t and uint64_t are not guaranteed to exist on 32-bit
-    # machines.  The calendar and ISC code needs them.
-    types = ["uint64_t"]
-
-    for inttype in sorted(types):
-        ctx.check_cc(header_name=["stdint.h", "sys/types.h"],
-                     mandatory=False,
-                     type_name=inttype)
-
     structures = (
         ("struct if_laddrconf", ["sys/types.h", "net/if6.h"]),
         ("struct if_laddrreq", ["sys/types.h", "net/if6.h"]),
@@ -442,7 +434,6 @@ int main(int argc, char **argv) {
 
     ctx.define("GETSOCKNAME_SOCKLEN_TYPE", "socklen_t", quote=False,
                comment="socklen type")
-    ctx.define("DFLT_RLIMIT_STACK", 50, comment="Default stack size")
 
     # These are helpful and don't break Linux or *BSD
     ctx.define("OPEN_BCAST_SOCKET", 1,



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/f2c037ca11c7b9de54af9e6f8f03581b3506e972...c7aca552602d99d1b5827976eec950aed6b66fa0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170329/d3a1c27c/attachment.html>


More information about the vc mailing list