This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/7.0.x by this push:
     new 664e5e1  https://bz.apache.org/bugzilla/show_bug.cgi?id=63759 
Uninstaller & UAC
664e5e1 is described below

commit 664e5e17d2f02e17bd777029e2b3afe77fb0272a
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 | 17 +++++++++++------
 2 files changed, 44 insertions(+), 10 deletions(-)

diff --git a/res/tomcat.nsi b/res/tomcat.nsi
index 438506e..f2c9077 100644
--- a/res/tomcat.nsi
+++ b/res/tomcat.nsi
@@ -367,16 +367,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 3018274..a352705 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -215,7 +215,7 @@
       </update>
       <update>
         <bug>63625</bug>: Update to Commons Daemon 1.2.1. This corrects several
-        regressions in Commons Daemon 1.2.1, most notably the Windows Service
+        regressions in Commons Daemon 1.2.0, most notably the Windows Service
         crashing on start when using 32-bit JVMs. (markt)
       </update>
       <update>
@@ -269,6 +269,16 @@
         <code>org.apache.tomcat.util.net.TesterSupport</code>
         and has been moved there. (rjung)
       </scode>
+      <fix>
+        When performing a silent install with the Windows Installer, ensure 
that
+        the registry entires are added to the 64-bit registry when using a
+        64-bit JVM. (markt)
+      </fix>
+      <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>
@@ -280,11 +290,6 @@
         reject them with a 400 response rather than triggering an internal 
error
         that results in a 500 response. (markt)
       </fix>
-      <fix>
-        When performing a silent install with the Windows Installer, ensure 
that
-        the registry entires are added to the 64-bit registry when using a
-        64-bit JVM. (markt)
-      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to