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) {
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to