Use 32-bit integer for NFS fsuid for older kernels [GH-1127]

This commit is contained in:
Mitchell Hashimoto 2013-07-17 23:34:47 -04:00
parent 04afd11fd1
commit a0543d7c7c
2 changed files with 6 additions and 6 deletions

View File

@ -8,6 +8,8 @@ BUG FIXES:
- NFS exports with improper casing on Mac OS X work properly. [GH-1202]
- Shared folders overriding '/vagrant' in multi-VM environments no
longer all just use the last value. [GH-1935]
- NFS export fsid's are now 32-bit integers, rather than UUIDs. This
lets NFS exports work with Linux kernels older than 2.6.20. [GH-1127]
## 1.2.4 (July 16, 2013)

View File

@ -1,6 +1,6 @@
require 'digest/md5'
require 'fileutils'
require 'pathname'
require 'zlib'
require "log4r"
@ -95,11 +95,9 @@ module Vagrant
opts[:map_gid] = prepare_permission(:gid, opts)
opts[:nfs_version] ||= 3
# The poor man's UUID. An MD5 hash here is sufficient since
# we need a 32 character "uuid" to represent the filesystem
# of an export. Hashing the host path is safe because two of
# the same host path will hash to the same fsid.
opts[:uuid] = Digest::MD5.hexdigest(opts[:hostpath])
# We use a CRC32 to generate a 32-bit checksum so that the
# fsid is compatible with both old and new kernels.
opts[:uuid] = Zlib.crc32(opts[:hostpath]).to_s
end
# Prepares the UID/GID settings for a single folder.