diff --git a/agent/alpine/Dockerfile b/agent/alpine/Dockerfile index 5b303a0b1..db010b87e 100644 --- a/agent/alpine/Dockerfile +++ b/agent/alpine/Dockerfile @@ -43,6 +43,7 @@ RUN apk update && \ zabbix_revision=`svn info ${ZBX_SOURCES} |grep "Last Changed Rev"|awk '{print $4;}'` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ ./bootstrap.sh 1>/dev/null && \ + export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \ ./configure \ --prefix=/usr \ --silent \ diff --git a/agent/ubuntu/Dockerfile b/agent/ubuntu/Dockerfile index c14098a8f..fb2401ec6 100644 --- a/agent/ubuntu/Dockerfile +++ b/agent/ubuntu/Dockerfile @@ -50,6 +50,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ zabbix_revision=`svn info ${ZBX_SOURCES} |grep "Last Changed Rev"|awk '{print $4;}'` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ ./bootstrap.sh 1>/dev/null && \ + export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \ ./configure \ --prefix=/usr \ --silent \ diff --git a/proxy-mysql/alpine/Dockerfile b/proxy-mysql/alpine/Dockerfile index 471db6e2c..a60cd4a2e 100644 --- a/proxy-mysql/alpine/Dockerfile +++ b/proxy-mysql/alpine/Dockerfile @@ -68,6 +68,7 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ zabbix_revision=`svn info ${ZBX_SOURCES} |grep "Last Changed Rev"|awk '{print $4;}'` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ ./bootstrap.sh 1>/dev/null && \ + export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \ ./configure \ --prefix=/usr \ --silent \ diff --git a/proxy-mysql/ubuntu/Dockerfile b/proxy-mysql/ubuntu/Dockerfile index a0f75e2c5..5ac42f8e4 100644 --- a/proxy-mysql/ubuntu/Dockerfile +++ b/proxy-mysql/ubuntu/Dockerfile @@ -76,6 +76,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ zabbix_revision=`svn info ${ZBX_SOURCES} |grep "Last Changed Rev"|awk '{print $4;}'` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ ./bootstrap.sh 1>/dev/null && \ + export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \ ./configure \ --prefix=/usr \ --silent \ diff --git a/proxy-sqlite3/alpine/Dockerfile b/proxy-sqlite3/alpine/Dockerfile index f555a0b91..23060ca5a 100644 --- a/proxy-sqlite3/alpine/Dockerfile +++ b/proxy-sqlite3/alpine/Dockerfile @@ -64,6 +64,7 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ zabbix_revision=`svn info ${ZBX_SOURCES} |grep "Last Changed Rev"|awk '{print $4;}'` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ ./bootstrap.sh 1>/dev/null && \ + export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \ ./configure \ --prefix=/usr \ --silent \ diff --git a/proxy-sqlite3/ubuntu/Dockerfile b/proxy-sqlite3/ubuntu/Dockerfile index b3f4d0820..3e57df8e8 100644 --- a/proxy-sqlite3/ubuntu/Dockerfile +++ b/proxy-sqlite3/ubuntu/Dockerfile @@ -74,6 +74,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ zabbix_revision=`svn info ${ZBX_SOURCES} |grep "Last Changed Rev"|awk '{print $4;}'` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ ./bootstrap.sh 1>/dev/null && \ + export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \ ./configure \ --prefix=/usr \ --silent \ diff --git a/server-mysql/alpine/Dockerfile b/server-mysql/alpine/Dockerfile index 6712d8921..dd39a6d58 100644 --- a/server-mysql/alpine/Dockerfile +++ b/server-mysql/alpine/Dockerfile @@ -69,6 +69,7 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ zabbix_revision=`svn info ${ZBX_SOURCES} |grep "Last Changed Rev"|awk '{print $4;}'` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ ./bootstrap.sh 1>/dev/null && \ + export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \ ./configure \ --prefix=/usr \ --silent \ diff --git a/server-mysql/ubuntu/Dockerfile b/server-mysql/ubuntu/Dockerfile index 919b1c871..0d03e6142 100644 --- a/server-mysql/ubuntu/Dockerfile +++ b/server-mysql/ubuntu/Dockerfile @@ -77,6 +77,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ zabbix_revision=`svn info ${ZBX_SOURCES} |grep "Last Changed Rev"|awk '{print $4;}'` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ ./bootstrap.sh 1>/dev/null && \ + export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \ ./configure \ --prefix=/usr \ --silent \ diff --git a/server-pgsql/alpine/Dockerfile b/server-pgsql/alpine/Dockerfile index 7dc5a03c3..e54f47498 100644 --- a/server-pgsql/alpine/Dockerfile +++ b/server-pgsql/alpine/Dockerfile @@ -69,6 +69,7 @@ RUN apk add ${APK_FLAGS_DEV} --virtual build-dependencies \ zabbix_revision=`svn info ${ZBX_SOURCES} |grep "Last Changed Rev"|awk '{print $4;}'` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ ./bootstrap.sh 1>/dev/null && \ + export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \ ./configure \ --prefix=/usr \ --silent \ diff --git a/server-pgsql/ubuntu/Dockerfile b/server-pgsql/ubuntu/Dockerfile index f55c39244..d1982362d 100644 --- a/server-pgsql/ubuntu/Dockerfile +++ b/server-pgsql/ubuntu/Dockerfile @@ -77,6 +77,7 @@ RUN apt-get ${APT_FLAGS_COMMON} update && \ zabbix_revision=`svn info ${ZBX_SOURCES} |grep "Last Changed Rev"|awk '{print $4;}'` && \ sed -i "s/{ZABBIX_REVISION}/$zabbix_revision/g" include/version.h && \ ./bootstrap.sh 1>/dev/null && \ + export CFLAGS="-fPIC -pie -Wl,-z,relro -Wl,-z,now" && \ ./configure \ --prefix=/usr \ --silent \