[Git][NTPsec/ntpsec][master] 2 commits: Add getdents64, move prlimit64 for seccomp list

Hal Murray gitlab at mg.gitlab.com
Wed Nov 28 09:52:13 UTC 2018


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
528fb240 by Hal Murray at 2018-11-28T09:50:06Z
Add getdents64, move prlimit64 for seccomp list

getdents64 is needed by i686 in Fedora 29

- - - - -
2572c03b by Hal Murray at 2018-11-28T09:50:06Z
Supress shadow warnings from old gcc - ntpfrob/jitter.c

- - - - -


2 changed files:

- ntpd/ntp_sandbox.c
- ntpfrob/jitter.c


Changes:

=====================================
ntpd/ntp_sandbox.c
=====================================
@@ -297,7 +297,11 @@ int scmp_sc[] = {
 #endif
 
 	SCMP_SYS(getdents),	/* Scanning /etc/ntp.d/ */
+	SCMP_SYS(getdents64),
+#ifdef __NR_prlimit64
+	SCMP_SYS(prlimit64),	/* 64 bit Fedora 26 with early_droproot*/
 #endif
+#endif  /* ENABLE_EARLY_DROPROOT */
 
 	SCMP_SYS(adjtimex),
 	SCMP_SYS(bind),
@@ -324,9 +328,6 @@ int scmp_sc[] = {
 #ifdef __NR_getrlimit
 	SCMP_SYS(getrlimit),	/* sysconf */
 	SCMP_SYS(setrlimit),
-#endif
-#ifdef __NR_prlimit64
-	SCMP_SYS(prlimit64),	/* 64 bit Fedora 26 with early_droproot*/
 #endif
 	SCMP_SYS(getrusage),
 	SCMP_SYS(getsockname),


=====================================
ntpfrob/jitter.c
=====================================
@@ -75,7 +75,7 @@ void jitter(const iomode mode)
 	l_fp tr;
 	int i;
 	double gtod[NBUF];
-	doubletime_t jitter;
+	doubletime_t jitterx;	/* shadow warning on some old systems */
 
 	/*
 	 * Force pages into memory
@@ -109,12 +109,12 @@ void jitter(const iomode mode)
 
 	// calculate 'variance' and call it jitter
 	// and scale everything up a million time for clarity
-	jitter = 0;
+	jitterx = 0;
 	for (i = 0; i < (NBUF - 1); i ++) {
 		gtod[i] = (gtod[i] - average) * 1000000;
-		jitter += gtod[i] * gtod[i];
+		jitterx += gtod[i] * gtod[i];
 	}
-	jitter = jitter / (NBUF - 1);
+	jitterx = jitterx / (NBUF - 1);
 
 	/*
 	 * Sort the gtod array and display deciles
@@ -134,12 +134,12 @@ void jitter(const iomode mode)
 		    if (i < NBUF - 3)
 			fputs(", ", stdout);
 		}
-		fprintf(stdout, "], \"Jitter\": %.9Lf}\n", jitter);
+		fprintf(stdout, "], \"Jitter\": %.9Lf}\n", jitterx);
 	}
 	else if (mode != raw)
 	{
 		fprintf(stdout, "Mean %13.9Lf\n", average);
-		fprintf(stdout, "Jitter %13.9Lf\n", jitter);
+		fprintf(stdout, "Jitter %13.9Lf\n", jitterx);
 		fprintf(stdout, "High\n");
 		for (i = 0; i < NSAMPLES; i++)
 		    fprintf(stdout, "%2d %13.9f\n", i, gtod[i]);



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/7b73e77d40a9fc8cba6318b270384c17b332d326...2572c03b635b43cf41002e7efbd5063356527ce4

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/7b73e77d40a9fc8cba6318b270384c17b332d326...2572c03b635b43cf41002e7efbd5063356527ce4
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20181128/5602ec0c/attachment-0001.html>


More information about the vc mailing list