1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00

Don't allow sudo to disable core dumps in documentation.

Newer versions of sudo output this message to stdout when run in a container:

sudo: setrlimit(RLIMIT_CORE): Operation not permitted

See https://github.com/sudo-project/sudo/issues/42 for details.

A simple workaround is to prevent sudo from disabling core dumps. This seems safe enough because if sudo is segfaulting then core files are the least of our worries.
This commit is contained in:
David Steele 2020-05-07 07:23:15 -04:00
parent ad784e1997
commit 3a75589855

View File

@ -266,6 +266,9 @@
</variable> </variable>
<variable key="copy-ca-cert">COPY {[fake-cert-path-relative]}/ca.crt {[ca-cert-path]}/pgbackrest-ca.crt</variable> <variable key="copy-ca-cert">COPY {[fake-cert-path-relative]}/ca.crt {[ca-cert-path]}/pgbackrest-ca.crt</variable>
<!-- Don't allow sudo to disable core dump (suppresses errors, see https://github.com/sudo-project/sudo/issues/42) -->
<variable key="sudo-disable-core-dump">RUN echo "Set disable_coredump false" >> /etc/sudo.conf</variable>
</variable-list> </variable-list>
<!-- Setup hosts used to build the documentation <!-- Setup hosts used to build the documentation
@ -282,6 +285,8 @@
apt-get update &amp;&amp; \ apt-get update &amp;&amp; \
apt-get install -y sudo ssh wget vim gnupg lsb-release iputils-ping ca-certificates tzdata locales 2>&amp;1 apt-get install -y sudo ssh wget vim gnupg lsb-release iputils-ping ca-certificates tzdata locales 2>&amp;1
{[sudo-disable-core-dump]}
# Install CA certificate # Install CA certificate
RUN update-ca-certificates RUN update-ca-certificates
@ -318,6 +323,8 @@
# Install packages # Install packages
RUN yum install -y openssh-server openssh-clients sudo wget vim 2>&amp;1 RUN yum install -y openssh-server openssh-clients sudo wget vim 2>&amp;1
{[sudo-disable-core-dump]}
# Install CA certificate # Install CA certificate
RUN update-ca-trust enable &amp;&amp; \ RUN update-ca-trust enable &amp;&amp; \
update-ca-trust extract update-ca-trust extract