Fix: Bypass apparmor preventing dhcpd load inside privileged test containers.
If apparmor usr.sbin.dhcpd profile is present, then loading dhcpd inside container fails with -EPERM.
This patch prevents it.
Change-Id: I54ca8d1dc5c12ff02116926d386214d7c565969a
diff --git a/Dockerfile.tester b/Dockerfile.tester
index 26ddf33..2030ed2 100644
--- a/Dockerfile.tester
+++ b/Dockerfile.tester
@@ -18,6 +18,8 @@
RUN pip install -U scapy scapy-ssl_tls monotonic configObj docker-py pyyaml nsenter pyroute2 netaddr python-daemon
RUN mv /usr/sbin/tcpdump /sbin/
RUN ln -sf /sbin/tcpdump /usr/sbin/tcpdump
+RUN mv /usr/sbin/dhcpd /sbin/
+RUN ln -sf /sbin/dhcpd /usr/sbin/dhcpd
WORKDIR /root
RUN wget -nc http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_2.5.dfsg-2.1_amd64.deb \
http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/libbison-dev_2.5.dfsg-2.1_amd64.deb
diff --git a/src/test/setup/cord-test.py b/src/test/setup/cord-test.py
index d81e830..4c0e281 100755
--- a/src/test/setup/cord-test.py
+++ b/src/test/setup/cord-test.py
@@ -167,6 +167,8 @@
RUN pip install -U scapy scapy-ssl_tls monotonic configObj docker-py pyyaml nsenter pyroute2 netaddr python-daemon
RUN mv /usr/sbin/tcpdump /sbin/
RUN ln -sf /sbin/tcpdump /usr/sbin/tcpdump
+RUN mv /usr/sbin/dhcpd /sbin/
+RUN ln -sf /sbin/dhcpd /usr/sbin/dhcpd
WORKDIR /root
RUN wget -nc http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/bison_2.5.dfsg-2.1_amd64.deb \
http://de.archive.ubuntu.com/ubuntu/pool/main/b/bison/libbison-dev_2.5.dfsg-2.1_amd64.deb