This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push: new ec41b4c https://bz.apache.org/bugzilla/show_bug.cgi?id=63759 Uninstaller & UAC ec41b4c is described below commit ec41b4c0ead2fbe8b0d0fe759326a6702856b809 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 c50f084..28ebd4b 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 ff0d171..2b160da 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -81,6 +81,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