Skip to content

Commit fcac595

Browse files
committed
PGPRO-2784: Windows installer does not clear permissive ACL entries
1 parent c8d7b40 commit fcac595

File tree

2 files changed

+32
-2
lines changed

2 files changed

+32
-2
lines changed

build/build64.cmd

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
SET ARCH=X64
22
SET SDK=MSVC2013
3-
SET PG_MAJOR_VERSION=10
4-
SET PG_PATCH_VERSION=4
3+
SET PG_MAJOR_VERSION=12
4+
SET PG_PATCH_VERSION=0
55
SET PRODUCT_NAME=PostgreSQL
66
rem SET PRODUCT_NAME=PostgreSQL 1C
77
rem SET ONE_C=YES
88
rem SET PGURL=http://repo.postgrespro.ru/1c-10-beta/src/postgrespro-1c-10.3.tar.bz2
9+
SET PERL5LIB=.
10+
SET MSBFLAGS=/m
911
call run.cmd %1

nsis/postgresql.nsi

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -933,6 +933,17 @@ Section $(componentServer) sec1
933933
${endif}
934934
FileClose $LogFile ;Closes the filled file
935935

936+
937+
AccessControl::DisableFileInheritance "$DATA_DIR"
938+
AccessControl::RevokeOnFile "$DATA_DIR" "(BU)" "GenericWrite + GenericRead"
939+
AccessControl::RevokeOnFile "$DATA_DIR" "(AU)" "GenericWrite + GenericRead"
940+
AccessControl::RevokeOnFile "$DATA_DIR" "(DU)" "GenericWrite + GenericRead"
941+
942+
push "$INSTDIR"
943+
call createAccessForFolder
944+
945+
946+
936947
SectionEnd
937948

938949
Section $(componentDeveloper) secDev
@@ -2509,3 +2520,20 @@ Function un.onInit
25092520
${endif}
25102521

25112522
FunctionEnd
2523+
2524+
Function createAccessForFolder
2525+
pop $0
2526+
AccessControl::DisableFileInheritance "$0"
2527+
AccessControl::RevokeOnFile "$0" "(BU)" "GenericWrite"
2528+
AccessControl::RevokeOnFile "$0" "(AU)" "GenericWrite"
2529+
AccessControl::RevokeOnFile "$0" "(DU)" "GenericWrite"
2530+
AccessControl::GrantOnFile "$0" "(BU)" "GenericRead + GenericExecute"
2531+
${if} ${AtLeastWin8}
2532+
;ALL_APP_PACKAGES (S-1-15-2-1)
2533+
AccessControl::GrantOnFile "$0" "(S-1-15-2-1)" "GenericRead + GenericExecute"
2534+
;The SID for "ALL RESTRICTED APPLICATION PACKAGES" is S-1-15-2-2
2535+
AccessControl::GrantOnFile "$0" "(S-1-15-2-2)" "GenericRead + GenericExecute"
2536+
${endif}
2537+
2538+
FunctionEnd
2539+

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy