Skip to content

Commit 0e2913c

Browse files
authored
Merge pull request #79 from cybertec-postgresql/nss_wrapper
Nss wrapper
2 parents d109e94 + 466a21b commit 0e2913c

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ postgres-build:
8787
--build-arg OLD_PG_VERSIONS="$(OLD_PG_VERSIONS)" \
8888
--build-arg PGVERSION=$(PGVERSION) \
8989
--build-arg ETCD_VERSION=$(ETCD_VERSION) \
90-
--build-arg PGVERSION=$(PGVERSION) \
9190
--build-arg ARCH=$(ARCH)
9291

9392
postgres: postgres-build

docker/postgres-gis/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,10 @@ COPY launcher/postgres/launch.sh /
202202

203203
ENTRYPOINT ["/scripts/nss_wrapper/nss_wrapper.sh"]
204204

205+
ENV LD_PRELOAD=/usr/lib64/libnss_wrapper.so \
206+
NSS_WRAPPER_PASSWD=/tmp/nss_wrapper/passwd \
207+
NSS_WRAPPER_GROUP=/tmp/nss_wrapper/group
208+
205209
USER postgres
206210

207211
CMD ["/bin/sh", "/launch.sh", "init"]

docker/postgres/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ ENV LC_ALL=en_US.utf-8 \
138138
PGHOME=/home/postgres \
139139
RW_DIR=/run \
140140
TIMESCALEDB=$TIMESCALEDB \
141-
DEMO=$DEMO
141+
DEMO=$DEMO
142142

143143
ENV LOG_ENV_DIR=$RW_DIR/etc/log.d/env \
144144
PGROOT=$PGHOME/pgdata/pgroot
@@ -199,6 +199,10 @@ COPY launcher/postgres/launch.sh /
199199

200200
ENTRYPOINT ["/scripts/nss_wrapper/nss_wrapper.sh"]
201201

202+
ENV LD_PRELOAD=/usr/lib64/libnss_wrapper.so \
203+
NSS_WRAPPER_PASSWD=/tmp/nss_wrapper/passwd \
204+
NSS_WRAPPER_GROUP=/tmp/nss_wrapper/group
205+
202206
USER postgres
203207

204208
CMD ["/bin/sh", "/launch.sh", "init"]

scripts/nss_wrapper/nss_wrapper.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,4 @@ if [[ ! $(cat "${NSS_GROUP}") =~ ${NSS_USERNAME}:x:${CURRENT_USER} ]]; then
3838
echo "Group was added via nss_wrapper"
3939
fi
4040

41-
export LD_PRELOAD=/usr/lib64/libnss_wrapper.so
42-
export NSS_WRAPPER_PASSWD="${NSS_PASSWD}"
43-
export NSS_WRAPPER_GROUP="${NSS_GROUP}"
44-
4541
exec "$@"

0 commit comments

Comments
 (0)