svn commit: r329998 - stable/11/sbin/savecore

Mike Silbersack silby at FreeBSD.org
Mon Feb 26 02:12:10 UTC 2018


Author: silby
Date: Mon Feb 26 02:12:09 2018
New Revision: 329998
URL: https://svnweb.freebsd.org/changeset/base/329998

Log:
  MFC r329362:
  Prevent savecore from reading bounds from the current directory.

Modified:
  stable/11/sbin/savecore/savecore.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sbin/savecore/savecore.c
==============================================================================
--- stable/11/sbin/savecore/savecore.c	Mon Feb 26 00:34:56 2018	(r329997)
+++ stable/11/sbin/savecore/savecore.c	Mon Feb 26 02:12:09 2018	(r329998)
@@ -155,6 +155,13 @@ getbounds(void)
 	char buf[6];
 	int ret;
 
+	/*
+	 * If we are just checking, then we haven't done a chdir to the dump
+	 * directory and we should not try to read a bounds file.
+	 */
+	if (checkfor)
+		return (0);
+
 	ret = 0;
 
 	if ((fp = fopen("bounds", "r")) == NULL) {


More information about the svn-src-all mailing list