Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Aug 2015 12:02:41 +0000 (UTC)
From:      "Andrey V. Elsukov" <ae@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org
Subject:   svn commit: r287252 - stable/9/sys/dev/md
Message-ID:  <201508281202.t7SC2fYr050528@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ae
Date: Fri Aug 28 12:02:40 2015
New Revision: 287252
URL: https://svnweb.freebsd.org/changeset/base/287252

Log:
  MFC r286720:
    Use g_conf_printf_escaped() to escape illegal symbols in file name.
  
    PR:		202289

Modified:
  stable/9/sys/dev/md/md.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/dev/   (props changed)

Modified: stable/9/sys/dev/md/md.c
==============================================================================
--- stable/9/sys/dev/md/md.c	Fri Aug 28 11:56:20 2015	(r287251)
+++ stable/9/sys/dev/md/md.c	Fri Aug 28 12:02:40 2015	(r287252)
@@ -88,6 +88,7 @@
 #include <sys/vnode.h>
 
 #include <geom/geom.h>
+#include <geom/geom_int.h>
 
 #include <vm/vm.h>
 #include <vm/vm_param.h>
@@ -1540,9 +1541,11 @@ g_md_dumpconf(struct sbuf *sb, const cha
 			    indent, (uintmax_t) mp->mediasize);
 			sbuf_printf(sb, "%s<type>%s</type>\n", indent,
 			    type);
-			if (mp->type == MD_VNODE && mp->vnode != NULL)
-				sbuf_printf(sb, "%s<file>%s</file>\n",
-				    indent, mp->file);
+			if (mp->type == MD_VNODE && mp->vnode != NULL) {
+				sbuf_printf(sb, "%s<file>", indent);
+				g_conf_printf_escaped(sb, "%s", mp->file);
+				sbuf_printf(sb, "</file>\n");
+			}
 		}
 	}
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201508281202.t7SC2fYr050528>