diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2016-11-03 16:21:48 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2016-11-03 16:21:48 +0000 |
commit | e0f48e5ce9e77711f6d8cc1397bc32e0bd3edc33 (patch) | |
tree | b6c4eeca353749c9e91156f8c69cb844ee21d43d /win | |
parent | 2a2e79b702b28149c8f9984d24367fe3ad7afa13 (diff) | |
download | mariadb-git-e0f48e5ce9e77711f6d8cc1397bc32e0bd3edc33.tar.gz |
MDEV-11214 Windows : MSI installation fails, if run by a service user (e.g LocalSystem)
Skip permission for data directory for LogonUser, if installation
runs by one of the service accounts (determined from their well-known SID).
There is no real LogonUser in this case.
Diffstat (limited to 'win')
-rw-r--r-- | win/packaging/extra.wxs.in | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/win/packaging/extra.wxs.in b/win/packaging/extra.wxs.in index b716bbf7e88..f60c0bb2020 100644 --- a/win/packaging/extra.wxs.in +++ b/win/packaging/extra.wxs.in @@ -463,9 +463,24 @@ <RegistryValue Root='HKLM' Key='SOFTWARE\@MANUFACTURER@\@CPACK_WIX_PACKAGE_NAME@' Name='DATADIR' Value='[DATADIR]' Type='string' KeyPath='yes'/> + <CreateFolder> + <util:PermissionEx User="NetworkService" GenericAll="yes" /> + </CreateFolder> + </Component> + + <Component Id="C.datadir.permissions" Directory="DATADIR"> + <Condition> + <!-- + Skip setting permissions for LogonUser, if package is installed by + service user (e.g LocalSystem) + --> + <![CDATA[ (UserSID <> "S-1-5-18") AND (UserSID <> "S-1-5-19") AND (UserSID <> "S-1-5-20") ]]> + </Condition> + <RegistryValue Root='HKLM' + Key='SOFTWARE\Monty Program AB\@CPACK_WIX_PACKAGE_NAME@' + Name='InstalledBy' Value='[USER_DOMAIN]\[LogonUser]' Type='string' KeyPath='yes'/> <CreateFolder> <util:PermissionEx User="[LogonUser]" Domain="[USER_DOMAIN]" GenericAll="yes" /> - <util:PermissionEx User="NetworkService" GenericAll="yes" /> </CreateFolder> </Component> |