LP1860187: Set .properties Permissions Appropriately user/jboyer/lp1860187_properties_perms
authorJason Boyer <jboyer@equinoxinitiative.org>
Fri, 24 Sep 2021 17:27:45 +0000 (13:27 -0400)
committerJason Boyer <jboyer@equinoxinitiative.org>
Fri, 24 Sep 2021 17:27:45 +0000 (13:27 -0400)
Use the AccessControl plugin to allow permissions to be inheirited
normally.

Signed-off-by: Jason Boyer <jboyer@equinoxinitiative.org>
installer/windows/hatch.nsi

index 08ef332..fa8f33f 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