build-unit-test-docker: Fix sudo umask
We don't want our install invocations to generate files that the user is
unable to modify. Setting the umask to 000 means that any files created
during our sudo invocations will be user modifiable.
Change-Id: Ibb452995037116b4e9df13d85db746c198fece0c
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/build-unit-test-docker.sh b/build-unit-test-docker.sh
index 998e58c..72ebf87 100755
--- a/build-unit-test-docker.sh
+++ b/build-unit-test-docker.sh
@@ -347,6 +347,7 @@
RUN grep -q ${GROUPS} /etc/group || groupadd -g ${GROUPS} ${USER}
RUN mkdir -p $(dirname ${HOME})
RUN grep -q ${UID} /etc/passwd || useradd -d ${HOME} -m -u ${UID} -g ${GROUPS} ${USER}
+RUN sed -i '1iDefaults umask=000' /etc/sudoers
RUN echo "${USER} ALL=(ALL) NOPASSWD: ALL" >>/etc/sudoers
RUN /bin/bash