hosts/*: NFS prune regexp matches file paths [GH-3815]

This commit is contained in:
Mitchell Hashimoto 2014-10-24 12:16:53 -07:00
parent 64139f2158
commit ea983e32c8
3 changed files with 3 additions and 2 deletions

View File

@ -83,6 +83,7 @@ BUG FIXES:
- provisioners/shell: Retry getting SSH info a few times. [GH-3924]
- provisioners/shell: PowerShell scripts can have args. [GH-4548]
- synced\_folders/nfs: Don't modify NFS exports file if no exports. [GH-4619]
- synced\_folders/nfs: Prune exports for file path IDs. [GH-3815]
PLUGIN AUTHOR CHANGES:

View File

@ -137,7 +137,7 @@ module VagrantPlugins
user = Process.uid
File.read("/etc/exports").lines.each do |line|
if id = line[/^# VAGRANT-BEGIN:( #{user})? ([A-Za-z0-9-]+?)$/, 2]
if id = line[/^# VAGRANT-BEGIN:( #{user})? ([\.\/A-Za-z0-9-_]+?)$/, 2]
if valid_ids.include?(id)
logger.debug("Valid ID: #{id}")
else

View File

@ -71,7 +71,7 @@ module VagrantPlugins
user = Process.uid
File.read("/etc/exports").lines.each do |line|
if id = line[/^# VAGRANT-BEGIN:( #{user})? ([A-Za-z0-9-]+?)$/, 2]
if id = line[/^# VAGRANT-BEGIN:( #{user})? ([\.\/A-Za-z0-9-_]+?)$/, 2]
if valid_ids.include?(id)
logger.debug("Valid ID: #{id}")
else