From 7abcea35b8594469a23a3df488ec5df923f0e797 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 24 Feb 2014 07:51:06 -0800 Subject: [PATCH] hosts/linux: escape regular expression for prune NFS exports [GH-2934] --- CHANGELOG.md | 2 ++ plugins/hosts/linux/cap/nfs.rb | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 217f2d46c..aca41a61a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,8 @@ BUG FIXES: - hosts/bsd: Don't invoke shell for NFS sudo calls. [GH-2808] - hosts/bsd: Sort NFS exports to avoid false validation errors. [GH-2927] - hosts/gentoo: Look for systemctl in `/usr/bin` [GH-2858] + - hosts/linux: Properly escape regular expression to prune NFS exports, + allowing VMware to work properly. [GH-2934] - hosts/opensuse: Start NFS server properly. [GH-2923] - providers/virtualbox: Enabling internal networks by just setting "true" works properly. [GH-2751] diff --git a/plugins/hosts/linux/cap/nfs.rb b/plugins/hosts/linux/cap/nfs.rb index f45899a05..4b9cd1b1f 100644 --- a/plugins/hosts/linux/cap/nfs.rb +++ b/plugins/hosts/linux/cap/nfs.rb @@ -89,7 +89,8 @@ module VagrantPlugins def self.nfs_cleanup(id) return if !File.exist?("/etc/exports") - user = Process.uid + user = Regexp.escape(Process.uid.to_s) + id = Regexp.escape(id.to_s) # Use sed to just strip out the block of code which was inserted # by Vagrant