summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Wrock <matt@mattwrock.com>2016-02-01 13:26:23 -0800
committerMatt Wrock <matt@mattwrock.com>2016-02-01 13:26:23 -0800
commit716f49eb97695ed5e07cfba693c928863e7b43de (patch)
treed785bda0d03c1eff59bf6ab5430f94f1a2c0c5e1
parentb644e353d50280133c30c5df966abecd25fd7c99 (diff)
downloadchef-wix_users.tar.gz
explicitly specify user permissions during msi install of chef directorywix_users
-rw-r--r--omnibus/config/projects/chef.rb1
-rw-r--r--omnibus/resources/chef/msi/source.wxs.erb17
2 files changed, 18 insertions, 0 deletions
diff --git a/omnibus/config/projects/chef.rb b/omnibus/config/projects/chef.rb
index 6c436907d5..311b135fb2 100644
--- a/omnibus/config/projects/chef.rb
+++ b/omnibus/config/projects/chef.rb
@@ -84,6 +84,7 @@ package :msi do
fast_msi true
upgrade_code msi_upgrade_code
wix_candle_extension "WixUtilExtension"
+ wix_light_extension "WixUtilExtension"
signing_identity "F74E1A68005E8A9C465C3D2FF7B41F3988F0EA09", machine_store: true
parameters ChefLogDllPath: windows_safe_path(gem_path("chef-[0-9]*-mingw32/ext/win32-eventlog/chef-log.dll")),
ProjectLocationDir: project_location_dir
diff --git a/omnibus/resources/chef/msi/source.wxs.erb b/omnibus/resources/chef/msi/source.wxs.erb
index 79f90ac18b..b566ca6191 100644
--- a/omnibus/resources/chef/msi/source.wxs.erb
+++ b/omnibus/resources/chef/msi/source.wxs.erb
@@ -18,6 +18,14 @@
<Package InstallerVersion="200" InstallPrivileges="elevated"
Compressed="yes" InstallScope="perMachine" />
+ <!--
+ Create property references for the well known SIDs of the
+ accounts we want to restrict for the project location folder
+ -->
+ <PropertyRef Id="WIX_ACCOUNT_LOCALSYSTEM" />
+ <PropertyRef Id="WIX_ACCOUNT_ADMINISTRATORS" />
+ <PropertyRef Id="WIX_ACCOUNT_USERS" />
+
<Media Id="1" Cabinet="ChefClient.cab" EmbedCab="yes" CompressionLevel="high" />
<!--
@@ -31,6 +39,7 @@
<!-- We always do Major upgrades -->
<MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeErrorMessage)" />
+
<!--
If fastmsi is set, custom actions will be invoked during install to unzip
project files, and during uninstall to remove the project folder
@@ -78,6 +87,13 @@
</Directory>
<Directory Id="INSTALLLOCATION" Name="opscode">
<Directory Id="PROJECTLOCATION" Name="$(var.ProjectLocationDir)" >
+ <Component Id="ProjectLocationPermissions" Guid="{75f50556-efae-4ede-beb2-a2c9b1a4d43f}" >
+ <CreateFolder>
+ <Permission User="[WIX_ACCOUNT_LOCALSYSTEM]" GenericAll="yes"/>
+ <Permission User="[WIX_ACCOUNT_ADMINISTRATORS]" GenericAll="yes"/>
+ <Permission User="[WIX_ACCOUNT_USERS]" GenericRead="yes" GenericExecute="yes"/>
+ </CreateFolder>
+ </Component>
<Directory Id="PROJECTLOCATIONBIN" Name="bin" >
<Component Id="ChefClientPath" Guid="{7F663F88-55A2-4E20-82BF-8BD2E60BB83A}" >
<Environment Id="ClientPathEnvironment"
@@ -121,6 +137,7 @@
<!-- Set the components defined in our fragment files that will be used for our feature -->
<Feature Id="ChefClientFeature" Title="!(loc.FeatureMainName)" Absent="disallow" AllowAdvertise="no" Level="1" ConfigurableDirectory="INSTALLLOCATION">
<ComponentGroupRef Id="ProjectDir" />
+ <ComponentRef Id="ProjectLocationPermissions" />
<ComponentRef Id="ChefClientPath" />
<ComponentRef Id="CONFIGLOCATIONDIR" />
<ComponentRef Id="ChefClientLog" />