57 Commits

Author SHA1 Message Date
Chris Roberts
2caf109a03 Mark passwords as sensitive within guest capabilities 2017-12-21 12:49:34 -08:00
Brian Cain
0ac26be4ef (#8917) Fix shell_expand_guest_path capability
Prior to this commit, when the guest capability attempted to expand a
path with spaces it would quote the path passed in. However if the path
also had a relative path those quotes would end up making `printf`
ignore it and not properly expand the path fully. This commit updates
that to first escape the quotes of a path and then pass in the new path
to be expanded.
2017-08-25 10:02:36 -07:00
Brian Cain
2b8f7f67ea Add unit tests for shell_expand_guest_path function 2017-08-15 09:33:29 -07:00
Brian Cain
61c501cc65 Ensure paths with spaces are preserved
Prior to this commit, if a user set the `destination` path to include a
space, the `shell_expand_guest_path` function would remove that space
and return a partial path. This commit updates that to quote the path to
be expanded to preserve the entire path.
2017-08-14 15:34:10 -07:00
Chris Roberts
e62d71b645 Remove comment removal from /etc/hosts file on guests
Fixes: #7794
2017-04-20 17:07:56 -07:00
Chris Roberts
fb4e4320b2 Remove set -e usage for better shell compatibility 2016-10-24 10:30:08 -07:00
Chris Roberts
185a7dfc2e guests/rsync do not chown files excluded from sync 2016-08-16 15:13:19 -07:00
Chris Roberts
dd91269491 guests: Prevent ssh disconnect from causing error on halt 2016-08-12 13:25:39 -07:00
Seth Vargo
d1a071d403
guests/darwin: Shellescape guest path for rsync 2016-07-18 21:12:58 -04:00
Seth Vargo
619c7a5b26
guests/darwin: Exit on error setting hostname 2016-07-18 21:12:58 -04:00
Seth Vargo
cf91bcf029
guests: Always search for FQDN without sudo 2016-07-18 21:12:54 -04:00
Seth Vargo
177b7784dd
guests/darwin: Allow ipv6 static networks 2016-06-19 12:01:52 -04:00
Seth Vargo
07e6d0e707
guests/bsd: Centralize logic for halting guests 2016-06-18 15:06:20 -04:00
Seth Vargo
079acb42cd
guests/bsd: Centralize logic for public key management 2016-06-17 21:36:28 -04:00
Seth Vargo
6284a9ac50
guests/bsd: Move NFS mounting logic into shared
A number of the BSD guests used very old mounting options or just
ignored some parameters entirely. This fixes that.

- Closes #7474
- Fixes #7466
2016-06-17 21:04:23 -04:00
Seth Vargo
0c268f7b3f
guests/bsd: Add shared BSD guest for common behavior 2016-06-17 20:16:36 -04:00
Seth Vargo
b29864f450
Use symbols for defining guest capabilities 2016-06-17 19:55:04 -04:00
Seth Vargo
add40534de
Use strip instead of chomp 2016-06-16 15:32:11 -04:00
Seth Vargo
a3d45bb7e0
guests/darwin: Use require_relative in plugin defn 2016-06-06 11:58:28 -04:00
Seth Vargo
428d6b56e8
guests/darwin: Require vagrant 2016-06-06 11:58:28 -04:00
Seth Vargo
499e4afba8
guests/darwin: Upload public key instead of trying to shellescape 2016-06-06 11:58:27 -04:00
Seth Vargo
dc883aa46f
guests/darwin: Add tests for get_addressable_ip_addr 2016-06-06 11:58:27 -04:00
Seth Vargo
5683a3b8ca
guests/darwin: Configure hostname in a single command 2016-06-06 11:58:27 -04:00
Mikhail Zholobov
f930fa94af Move "cant_read_mac_addresses" error to the global space
Now it is used not only by Windows, but by Darwin guests as well.
2015-10-09 14:57:41 +03:00
Mikhail Zholobov
e426455309 guests/darwin: Configure network following the MAC addresses matching
Currently `configure_networks` guest cap configures NICs following the device order and fails
when the device order is mixed. We should detect the appropriate NIC by its MAC address.
2015-10-09 14:57:41 +03:00
Seth Vargo
6210f13338 Merge pull request #5750 from alh84001/feature/capability_guest_darwin_mount_smb
Capability to mount smb shares in darwin guests
2015-05-30 21:34:53 -07:00
alh84001
1c04934d89 Mounting to paths where user has no write permissions (e.g. /) 2015-05-25 15:35:06 +02:00
Matija K
09eec472f6 Mounting as regular user instead of root 2015-05-24 15:11:34 +02:00
Matija K
b387f0e15d Capability to mount smb shares in darwin guests 2015-05-24 12:39:28 +02:00
Mikhail Zholobov
c399f075d5 darwin/cap/change_host_name: Fixed invalid argument LocalHostName 2015-05-21 18:48:39 +03:00
Timothy Sutton
c6e16beaa5 Support insert_public_key and remove_public_key on darwin guest
- fixes #5204
- darwin-specific sed arguments thanks to @elatt
2015-02-11 12:21:23 -05:00
Seth Vargo
d2874064f4 Use .key? instead of .has_key? 2015-01-05 18:29:01 -05:00
Johannes Plunien
286e9cd01e Set ComputerName and LocalHostName on darwin guests
This sets the bonjour host name for darwin guests to the same value
as config.vm.hostname. It also sets the user-friendly name for the
system.
2014-09-21 19:14:59 +02:00
Leo Simons
fec14cf04c Use -f argument to rm to force-remove files.
When using pty=true, removing files using sudo may request confirmation,
which will hang the connection.

Similarly, sometimes assumptions about file existence may be wrong and
in those cases it seems better to continue on as long as the file does
not exist, so -f makes sense there, too.
2014-08-29 10:51:31 +02:00
Matt Behrens
ef44f19601 drop -r flag from xargs on OS X
OS X's `xargs` does not support the `-r` flag (which means "do not
execute the command even once if there are no arguments"), but
behaves by default as if it was specified.

You can verify this yourself with this test:

    $ touch zero-length-file
    $ xargs echo <zero-length-file

If `echo` is executed, you will see a blank line.  If it is not
executed (i.e. `-r` is specified or the behavior is implied) then
you will see no blank line.
2014-05-25 18:42:40 -04:00
Kalman Hazins
bb052366f7 Change symbols inside hashes to 1.9 JSON-like syntax 2014-05-22 12:35:12 -04:00
Mitchell Hashimoto
9c7fb05d5f guests/darwin: respect NFS mount options [GH-3791] 2014-05-17 12:24:24 -07:00
Mitchell Hashimoto
34b7cace7b synced_folders/rsync: rsync__chown [GH-3810] 2014-05-17 12:01:50 -07:00
Teemu Matilainen
f87c7a9bc9 synced_folders\rsync: remove non-portable '-v' flag from chown [GH-3743]
Aside of the already fixed OpenBSD, at least Solaris `chown` seems not
to support the `-v` option, so remove it from all guests.
2014-05-10 23:51:12 +03:00
Mitchell Hashimoto
326e8012f7 guests/*: setup rsync_pre properly 2014-05-06 18:40:55 -07:00
Mitchell Hashimoto
4ef237a642 synced_folders/rsync: mkdir before rsync 2014-05-06 13:41:37 -07:00
Nikhil Benesch
2df36892dd synced_folders/rsync: only chown when necessary [GH-3525]
Run remote rsync as root to guarantee that rsync can write to guestpath.
This obviates the need to chown the guestpath to the SSH user prior to
sync.

This brings a substantial speedup (2x on a moderately-sized shared
folder) and properly triggers filesystem notifications on only the files
changed by a given sync.
2014-04-25 15:00:12 -04:00
Matt Way
16d093dc8a use global namespace for class IO naming conflict 2014-03-12 07:52:11 -04:00
Mitchell Hashimoto
f63ef395f1 Merge branch 'rsync_install' of https://github.com/tmatilai/vagrant into tmatilai-rsync_install
Conflicts:
	plugins/guests/freebsd/plugin.rb
	plugins/guests/netbsd/plugin.rb
	plugins/guests/openbsd/plugin.rb
2014-02-03 12:12:49 +01:00
Teemu Matilainen
e634cdc824 guests: rename LinuxShellExpandFailed error to ShellExpandFailed
Make the error generic for all guests (`DarwinShellExpandFailed` didn't
even exist) and not tied to synced folder.
2014-02-02 17:26:54 -03:00
Teemu Matilainen
ee2ae94c25 synced_folders/rsync: Install rsync on guest if needed
Add new `rsync_installed` and `rsync_install` guest capabilities
to detect and install `rsync`.

Also copy `rsync_pre` capability to all Unix guests.
2014-01-31 02:12:57 -03:00
Timothy Sutton
caaaa9fe28 Support verify_vmware_hgfs in darwin guest. 2013-08-09 15:00:38 -04:00
Timothy Sutton
23962baac9 Darwin: use :sudo for communicate.test 2013-08-07 17:10:32 -04:00
Timothy Sutton
a3b9428f67 Darwin: code debug cleanup 2013-08-06 10:18:38 -04:00
Timothy Sutton
8b925e6c15 Update Darwin guest description 2013-08-06 10:18:12 -04:00