File tree Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Expand file tree Collapse file tree 3 files changed +22
-6
lines changed Original file line number Diff line number Diff line change 145
145
146
146
- name : create placeholder pam config
147
147
file :
148
- path : ' /etc/pam.d/{{ item }} '
148
+ path : ' /etc/pam.d/postgresql '
149
149
state : touch
150
150
owner : postgres
151
151
group : postgres
152
152
mode : 0664
153
- with_items :
154
- - ' postgresql'
155
153
when : (debpkg_mode or nixpkg_mode) and not is_psql_15
156
154
157
155
# Add pg_hba.conf
Original file line number Diff line number Diff line change 94
94
shell : |
95
95
sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#{{postgresql_version}}_src"
96
96
when : stage2_nix
97
-
97
+
98
+ - name : Check psql_version and install gatekeeper if not pg15
99
+ block :
100
+ - name : Check if psql_version is psql_15
101
+ set_fact :
102
+ is_psql_15 : " {{ psql_version == 'psql_15' }}"
103
+
104
+ - name : Install gatekeeper from nix binary cache
105
+ become : yes
106
+ shell : |
107
+ sudo -u postgres bash -c ". /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix profile install github:supabase/postgres/{{ git_commit_sha }}#gatekeeper"
108
+ when : stage2_nix and not is_psql_15
109
+
110
+ - name : Create symbolic link for linux-pam to find pam_jit_pg.so
111
+ shell : >
112
+ sudo ln -s /var/lib/postgresql/.nix-profile/lib/security/pam_jit_pg.so $(find /nix/store -type d -path "/nix/store/*-linux-pam-*/lib/security" -print -quit)/pam_jit_pg.s
113
+ become : yes
114
+ when : stage2_nix and not is_psql_15
115
+
98
116
- name : Set ownership and permissions for /etc/ssl/private
99
117
become : yes
100
118
file :
Original file line number Diff line number Diff line change @@ -30,14 +30,14 @@ buildGoModule {
30
30
31
31
buildPhase = ''
32
32
runHook preBuild
33
- go build -buildmode=c-shared -o pam_jwt_pg .so
33
+ go build -buildmode=c-shared -o pam_jit_pg .so
34
34
runHook postBuild
35
35
'' ;
36
36
37
37
installPhase = ''
38
38
runHook preInstall
39
39
mkdir -p $out/lib/security
40
- cp pam_jwt_pg .so $out/lib/security/
40
+ cp pam_jit_pg .so $out/lib/security/
41
41
runHook postInstall
42
42
'' ;
43
43
You can’t perform that action at this time.
0 commit comments