lp1860187 Global Read Access on Properties
authorKyle Huckins <khuckins@catalyte.io>
Tue, 21 Jan 2020 20:36:14 +0000 (20:36 +0000)
committerBill Erickson <berickxx@gmail.com>
Fri, 24 Jan 2020 22:39:31 +0000 (17:39 -0500)
- Provide Generic Read Access to all Users for the Hatch.properties
and logging.properties files located in Program Files on Windows
Install.

Signed-off-by: Kyle Huckins <khuckins@catalyte.io>
 Changes to be committed:
modified:   installer/windows/hatch.nsi

Signed-off-by: Bill Erickson <berickxx@gmail.com>
installer/windows/hatch.nsi

index 08ef332..993b8e5 100644 (file)
@@ -123,6 +123,10 @@ section "install"
     !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"
 
+    ; Ensure our properties files are readable and writable
+    AccessControl::GrantOnFile "$INSTDIR\hatch.properties" "(BU)" "GenericRead+ReadData+ReadEA+ReadAttributes+ReadControl+GenericExecute+Execute"
+    AccessControl::GrantOnFile "$INSTDIR\logging.properties" "(BU)" "GenericRead+ReadData+ReadEA+ReadAttributes+ReadControl+GenericExecute+Execute"
+
     ; Registry info for Add/Remove Programs
     WriteRegStr HKLM "SOFTWARE\${COMPANYNAME}\${APPNAME}" "Logging Path" $APPDATA
     SetShellVarContext current