This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new da37f36 https://bz.apache.org/bugzilla/show_bug.cgi?id=63759 Uninstaller & UAC da37f36 is described below commit da37f3654daacf20fa9340886c0367e9d58ce5f6 Author: Mark Thomas <ma...@apache.org> AuthorDate: Tue Sep 24 15:31:17 2019 +0100 https://bz.apache.org/bugzilla/show_bug.cgi?id=63759 Uninstaller & UAC When installing Tomcat with the Windows installer, grant sufficient privileges to enable the uninstaller to execute when user account control is active. --- res/tomcat.nsi | 37 +++++++++++++++++++++++++++++++++---- webapps/docs/changelog.xml | 5 +++++ 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/res/tomcat.nsi b/res/tomcat.nsi index a4f92e4..d6255b4 100644 --- a/res/tomcat.nsi +++ b/res/tomcat.nsi @@ -368,16 +368,45 @@ Section -post ; S-1-5-19 LocalService ; S-1-5-32-544 Local Administrators group ; S-1-5-18 Local System + ; S-1-5-11 Authenticated users + ; + ; Grant admins, LocalService and Local System full control full control nsExec::ExecToStack 'icacls "$INSTDIR" /inheritance:r /grant *S-1-5-19:(OI)(CI)(F) /grant *S-1-5-32-544:(OI)(CI)(F) /grant *S-1-5-18:(OI)(CI)(F)' Pop $0 Pop $1 - StrCmp $0 "0" SetPermissionsOk + StrCmp $0 "0" SetGroupPermissionsOk FileWrite $ServiceInstallLog "Install failed (setting file permissions): $0 $1$\r$\n" MessageBox MB_YESNO|MB_ICONSTOP \ "Failed to set file permissions.$\r$\nCheck your settings and permissions.$\r$\nIgnore and continue anyway (not recommended)?" \ - /SD IDNO IDYES SetPermissionsOk - Quit - SetPermissionsOk: + /SD IDNO IDYES SetGroupPermissionsOk + Quit + SetGroupPermissionsOk: + ClearErrors + + ; Make the icon readable to all authenticated users so it appears correctly in the uninstall UI + nsExec::ExecToStack 'icacls "$INSTDIR\tomcat.ico" /inheritance:e /grant *S-1-5-11:(R)' + Pop $0 + Pop $1 + StrCmp $0 "0" SetIconPermissionsOk + FileWrite $ServiceInstallLog "Install failed (setting file permissions for icon): $0 $1$\r$\n" + MessageBox MB_YESNO|MB_ICONSTOP \ + "Failed to set icon file permissions.$\r$\nCheck your settings and permissions.$\r$\nIgnore and continue anyway (not recommended)?" \ + /SD IDNO IDYES SetIconPermissionsOk + Quit + SetIconPermissionsOk: + ClearErrors + + ; Make the uninstaller readable and executable to all authenticated users so the user that installed Tomcat can also uninstall it + nsExec::ExecToStack 'icacls "$INSTDIR\Uninstall.exe" /inheritance:e /grant *S-1-5-11:(RX)' + Pop $0 + Pop $1 + StrCmp $0 "0" SetUninstallerPermissionsOk + FileWrite $ServiceInstallLog "Install failed (setting file permissions for uninstaller): $0 $1$\r$\n" + MessageBox MB_YESNO|MB_ICONSTOP \ + "Failed to set uninstaller file permissions.$\r$\nCheck your settings and permissions.$\r$\nIgnore and continue anyway (not recommended)?" \ + /SD IDNO IDYES SetUninstallerPermissionsOk + Quit + SetUninstallerPermissionsOk: ClearErrors SectionEnd diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index e24309c..b0a824d 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -78,6 +78,11 @@ <code>org.apache.tomcat.util.net.TesterSupport</code> and has been moved there. (rjung) </scode> + <fix> + <bug>63759</bug>: When installing Tomcat with the Windows installer, + grant sufficient privileges to enable the uninstaller to execute when + user account control is active. (markt) + </fix> </changelog> </subsection> </section> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org