LP1860187: Set .properties Permissions Appropriately master
authorJason Boyer <jboyer@equinoxinitiative.org>
Fri, 24 Sep 2021 17:27:45 +0000 (13:27 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Fri, 3 Mar 2023 16:18:49 +0000 (11:18 -0500)
Use the AccessControl plugin to allow permissions to be inheirited
normally.

Signed-off-by: Jason Boyer <jboyer@equinoxinitiative.org>
Signed-off-by: Gina Monti <gmonti@biblio.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>
installer/windows/hatch.nsi

index 1cd0a54..4fb6142 100644 (file)
@@ -115,6 +115,7 @@ section "install"
     !insertmacro _ReplaceInFile  "$INSTDIR\extension\host\org.evergreen_ils.hatch.firefox.json" "/path/to/hatch.sh" "$0\\hatch.bat"
     AccessControl::EnableFileInheritance "$INSTDIR\extension\host\org.evergreen_ils.hatch.chrome.json"
     AccessControl::EnableFileInheritance "$INSTDIR\extension\host\org.evergreen_ils.hatch.firefox.json"
+
     ; Set logging to be in ProgramData
     SetShellVarContext all
     ${IfNot} ${FileExists} "$APPDATA\${APPNAME}"
@@ -122,6 +123,8 @@ section "install"
     ${EndIf}
     !insertmacro _ReplaceInFile  "$INSTDIR\hatch.properties" "#data.directory=/tmp/foo" "data.directory=C://ProgramData//${APPNAME}"
     !insertmacro _ReplaceInFile  "$INSTDIR\logging.properties" "%h/.evergreen/hatch.log" "C://ProgramData//${APPNAME}//hatch.log"
+    AccessControl::EnableFileInheritance "$INSTDIR\hatch.properties"
+    AccessControl::EnableFileInheritance "$INSTDIR\logging.properties"
 
     ; Registry info for Add/Remove Programs
     WriteRegStr HKLM "SOFTWARE\${COMPANYNAME}\${APPNAME}" "Logging Path" $APPDATA