[java-identity-provider] 03/03: IDP-1663 Handle Read Only bit

Rod Widdowson rdw at steadingsoftware.com
Tue Sep 8 16:06:26 UTC 2020


This is an automated email from the git hooks/post-receive script.

rdw pushed a commit to branch main
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=09a7998b6c38801482192a830962c6090c33abb9

commit 09a7998b6c38801482192a830962c6090c33abb9
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Tue Sep 8 17:04:01 2020 +0100

    IDP-1663 Handle Read Only bit
    
    https://issues.shibboleth.net/jira/browse/IDP-1663
    
    We always make sure that the dist folder is set ReadOnly during installs.
    Respect this in a plugin install.  Equally remove the read only bit before
    trying to remove the folder during an upgrade.
---
 .../java/net/shibboleth/idp/installer/plugin/impl/PluginInstaller.java | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstaller.java b/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstaller.java
index 198ce4a09..be9b72541 100644
--- a/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstaller.java
+++ b/idp-installer/src/main/java/net/shibboleth/idp/installer/plugin/impl/PluginInstaller.java
@@ -242,10 +242,13 @@ public final class PluginInstaller extends AbstractInitializableComponent implem
         }
 
         final Path myWebApp = idpHome.resolve("dist").resolve("edit-webapp-" + pluginId);
+
+        InstallerSupport.setReadOnly(myWebApp, false);
         deleteTree(myWebApp);
         installWebapp(myWebApp);
         installFiles();
         downloadExternals();
+        InstallerSupport.setReadOnly(myWebApp, true);
 
         final BuildWar builder = new BuildWar(idpHome);
         try {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list