Skip to content

Commit d6d1224

Browse files
committed
[SPARK-25275][K8S] require memberhip in wheel to run 'su' in dockerfiles
## What changes were proposed in this pull request? Add a PAM configuration in k8s dockerfile to require authentication into wheel to run as `su` ## How was this patch tested? Verify against CI that PAM config succeeds & causes no regressions Closes apache#22285 from erikerlandson/spark-25275. Authored-by: Erik Erlandson <[email protected]> Signed-off-by: Erik Erlandson <[email protected]>
1 parent a5fb5b6 commit d6d1224

File tree

1 file changed

+2
-1
lines changed
  • resource-managers/kubernetes/docker/src/main/dockerfiles/spark

1 file changed

+2
-1
lines changed

resource-managers/kubernetes/docker/src/main/dockerfiles/spark/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,13 @@ ARG img_path=kubernetes/dockerfiles
2929

3030
RUN set -ex && \
3131
apk upgrade --no-cache && \
32-
apk add --no-cache bash tini libc6-compat && \
32+
apk add --no-cache bash tini libc6-compat linux-pam && \
3333
mkdir -p /opt/spark && \
3434
mkdir -p /opt/spark/work-dir && \
3535
touch /opt/spark/RELEASE && \
3636
rm /bin/sh && \
3737
ln -sv /bin/bash /bin/sh && \
38+
echo "auth required pam_wheel.so use_uid" >> /etc/pam.d/su && \
3839
chgrp root /etc/passwd && chmod ug+rw /etc/passwd
3940

4041
COPY ${spark_jars} /opt/spark/jars

0 commit comments

Comments
 (0)