templates/sudoers.rb.erb in vagrant-lxc-1.1.0 vs templates/sudoers.rb.erb in vagrant-lxc-1.2.0

- old
+ new

@@ -1,6 +1,6 @@ -#!/opt/vagrant/embedded/bin/ruby +#!<%= cmd_paths['ruby'] %> # Automatically created by vagrant-lxc class Whitelist class << self def add(command, *args) @@ -78,11 +78,10 @@ end end base = "/var/lib/lxc" base_path = %r{\A#{base}/.*\z} -templates_path = %r{\A/usr/(share|lib|lib64|local/lib)/lxc/templates/.*\z} ## # Commands from provider.rb # - Check lxc is installed Whitelist.add '<%= cmd_paths['which'] %>', /\Alxc-\w+\z/ @@ -94,21 +93,16 @@ # - Shared folders Whitelist.add '<%= cmd_paths['mkdir'] %>', '-p', base_path # - Container config customizations and pruning Whitelist.add '<%= cmd_paths['cp'] %>', '-f', %r{/tmp/.*}, base_path Whitelist.add '<%= cmd_paths['chown'] %>', 'root:root', base_path -# - Template import -Whitelist.add '<%= cmd_paths['cp'] %>', %r{\A.*\z}, templates_path -Whitelist.add '<%= cmd_paths['chmod'] %>', '+x', templates_path -# - Template removal -Whitelist.add '<%= cmd_paths['rm'] %>', templates_path # - Packaging Whitelist.add '<%= cmd_paths['tar'] %>', '--numeric-owner', '-cvzf', %r{/tmp/.*/rootfs.tar.gz}, '-C', base_path, './rootfs' Whitelist.add '<%= cmd_paths['chown'] %>', /\A\d+:\d+\z/, %r{\A/tmp/.*/rootfs\.tar\.gz\z} # - Private network script and commands Whitelist.add '<%= cmd_paths['ip'] %>', 'addr', 'add', /(\d+|\.)+\/24/, 'dev', /.+/ -Whitelist.add '<%= cmd_paths['ifconfig'] %>', /.+/, 'down' -Whitelist.add '<%= cmd_paths['brctl'] %>', 'delbr', /.+/ +Whitelist.add '<%= cmd_paths['ip'] %>', 'link', 'set', /.+/, /(up|down)/ +Whitelist.add '<%= cmd_paths['brctl'] %>', /(addbr|delbr)/, /.+/ Whitelist.add_regex %r{<%= pipework_regex %>}, '**' ## # Commands from driver/cli.rb Whitelist.add '<%= cmd_paths['lxc_bin'] %>/lxc-version'