[Git][NTPsec/ntpsec][master] 2 commits: More tweaks for seccomp

Hal Murray gitlab at mg.gitlab.com
Sun Dec 4 11:09:12 UTC 2016


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
89666d13 by Hal Murray at 2016-12-03T17:21:45-08:00
More tweaks for seccomp

- - - - -
18a0a88c by Hal Murray at 2016-12-04T03:06:00-08:00
Fix for mru avgint < 5 (float/int mixup)

- - - - -


2 changed files:

- ntpd/ntp_sandbox.c
- pylib/util.py


Changes:

=====================================
ntpd/ntp_sandbox.c
=====================================
--- a/ntpd/ntp_sandbox.c
+++ b/ntpd/ntp_sandbox.c
@@ -375,6 +375,9 @@ int scmp_sc[] = {
         SCMP_SYS(shmat),
 #endif
 
+	SCMP_SYS(fcntl64),
+	SCMP_SYS(fstat64),
+
 #ifdef __x86_64__
 	SCMP_SYS(mmap),
 #endif
@@ -382,8 +385,6 @@ int scmp_sc[] = {
 	SCMP_SYS(_newselect),
 	SCMP_SYS(_llseek),
 	SCMP_SYS(mmap2),
-	SCMP_SYS(fcntl64),
-	SCMP_SYS(fstat64),
 	SCMP_SYS(stat64),
 #endif
 };


=====================================
pylib/util.py
=====================================
--- a/pylib/util.py
+++ b/pylib/util.py
@@ -314,7 +314,7 @@ class MRUSummary:
 
     def summary(self, entry):
         lstint = int(self.now - entry.last + 0.5)
-        active = int(entry.last - entry.first + 0.5)
+        active = float(entry.last - entry.first)
         favgint = active / entry.ct
         avgint = int(favgint + 0.5)
         stats = "%6d" % lstint



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/cbd7e886c32bcffa5d0eea793b4f97156548b7ef...18a0a88c3eadc83edb198b1ef1e5927d9e3f2c56
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ntpsec.org/pipermail/vc/attachments/20161204/4d3afc26/attachment.html>


More information about the vc mailing list