[Git][NTPsec/ntpsec][path-check] 4 commits: Added NULL detector for pps_peer segfault.

Ian Bruene gitlab at mg.gitlab.com
Fri Aug 31 22:47:14 UTC 2018


Ian Bruene pushed to branch path-check at NTPsec / ntpsec


Commits:
964e181b by Ian Bruene at 2018-08-31T22:33:03Z
Added NULL detector for pps_peer segfault.

- - - - -
139d576c by Ian Bruene at 2018-08-31T22:42:44Z
Added check of python install directories in PYTHONPATH.

- - - - -
f4710fef by Ian Bruene at 2018-08-31T22:42:44Z
Removed check for PYTHONDIR. Only PYTHONARCHDIR left.

- - - - -
6a25472f by Ian Bruene at 2018-08-31T22:46:43Z
Fixed PYTHONARCHDIR test.

- - - - -


2 changed files:

- ntpd/refclock_gpsd.c
- wscript


Changes:

=====================================
ntpd/refclock_gpsd.c
=====================================
@@ -595,8 +595,11 @@ gpsd_shutdown(
 	if (up == NULL)
 		return;
 
-	/* now check if we must close IO resources */
-	if (pp != up->pps_peer->procptr) {
+	if (up->pps_peer == NULL) {
+		/* This is NULL if no related PPS */
+		DPRINT(1, ("%s: pps_peer found NULL", up->logname));
+	} else if (pp != up->pps_peer->procptr) {
+		/* now check if we must close IO resources */
 		if (-1 != pp->io.fd) {
 			DPRINT(1, ("%s: closing clock, fd=%d\n",
 				   up->logname, pp->io.fd));


=====================================
wscript
=====================================
@@ -1100,6 +1100,9 @@ def build(ctx):
         if "PYTHONPATH" not in os.environ:
             print("--- PYTHONPATH is not set, "
                   "loading the Python ntp library may be troublesome ---")
+        elif ctx.env.PYTHONARCHDIR not in os.environ["PYTHONPATH"]:
+            print("--- PYTHONDARCHIR not in PYTHONPATH"
+                  "loading the Python ntp library may be troublesome ---")
 
 #
 # Boot script setup



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/26306ee0a224d7b77bae29ae91ecb7557f2074b4...6a25472f0ba30eaab03720941b9f1bf8570da8f8

-- 
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/26306ee0a224d7b77bae29ae91ecb7557f2074b4...6a25472f0ba30eaab03720941b9f1bf8570da8f8
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/20180831/c526bc68/attachment-0001.html>


More information about the vc mailing list