From 2a9527430167a7886aff428edb04c79941236828 Mon Sep 17 00:00:00 2001 From: Joe Ferguson Date: Tue, 25 Oct 2016 15:35:16 -0700 Subject: [PATCH] Use gosu postgres when writing to hba.cnf so that drop-cap dac_override works --- 9.1/docker-entrypoint.sh | 2 +- 9.2/docker-entrypoint.sh | 2 +- 9.3/docker-entrypoint.sh | 2 +- 9.4/docker-entrypoint.sh | 2 +- 9.5/docker-entrypoint.sh | 2 +- 9.6/docker-entrypoint.sh | 2 +- docker-entrypoint.sh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/9.1/docker-entrypoint.sh b/9.1/docker-entrypoint.sh index 839868a230..75c449df28 100755 --- a/9.1/docker-entrypoint.sh +++ b/9.1/docker-entrypoint.sh @@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then authMethod=trust fi - { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" + { echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null # internal start of server in order to allow set-up using psql-client # does not listen on external TCP/IP and waits until start finishes diff --git a/9.2/docker-entrypoint.sh b/9.2/docker-entrypoint.sh index 839868a230..75c449df28 100755 --- a/9.2/docker-entrypoint.sh +++ b/9.2/docker-entrypoint.sh @@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then authMethod=trust fi - { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" + { echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null # internal start of server in order to allow set-up using psql-client # does not listen on external TCP/IP and waits until start finishes diff --git a/9.3/docker-entrypoint.sh b/9.3/docker-entrypoint.sh index 839868a230..75c449df28 100755 --- a/9.3/docker-entrypoint.sh +++ b/9.3/docker-entrypoint.sh @@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then authMethod=trust fi - { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" + { echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null # internal start of server in order to allow set-up using psql-client # does not listen on external TCP/IP and waits until start finishes diff --git a/9.4/docker-entrypoint.sh b/9.4/docker-entrypoint.sh index 839868a230..75c449df28 100755 --- a/9.4/docker-entrypoint.sh +++ b/9.4/docker-entrypoint.sh @@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then authMethod=trust fi - { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" + { echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null # internal start of server in order to allow set-up using psql-client # does not listen on external TCP/IP and waits until start finishes diff --git a/9.5/docker-entrypoint.sh b/9.5/docker-entrypoint.sh index 839868a230..75c449df28 100755 --- a/9.5/docker-entrypoint.sh +++ b/9.5/docker-entrypoint.sh @@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then authMethod=trust fi - { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" + { echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null # internal start of server in order to allow set-up using psql-client # does not listen on external TCP/IP and waits until start finishes diff --git a/9.6/docker-entrypoint.sh b/9.6/docker-entrypoint.sh index 839868a230..75c449df28 100755 --- a/9.6/docker-entrypoint.sh +++ b/9.6/docker-entrypoint.sh @@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then authMethod=trust fi - { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" + { echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null # internal start of server in order to allow set-up using psql-client # does not listen on external TCP/IP and waits until start finishes diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index 839868a230..75c449df28 100755 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -43,7 +43,7 @@ if [ "$1" = 'postgres' ]; then authMethod=trust fi - { echo; echo "host all all 0.0.0.0/0 $authMethod"; } >> "$PGDATA/pg_hba.conf" + { echo; echo "host all all 0.0.0.0/0 $authMethod"; } | gosu postgres tee -a "$PGDATA/pg_hba.conf" > /dev/null # internal start of server in order to allow set-up using psql-client # does not listen on external TCP/IP and waits until start finishes