rm tempfile before we use it, to avoid attack via symlink
This commit is contained in:
1 parent
86644f7615
commit
0ed57bad67
1 file changed
+1
@@ -121,6 +121,7 @@ configure_container_networking() {
|
||||
LOCAL_IFNAME="v${CONTAINER_IFNAME}pl${NSPID}"
|
||||
GUEST_IFNAME="v${CONTAINER_IFNAME}pg${NSPID}"
|
||||
IP_TMPFILE=/tmp/weave_ip_output_$$
|
||||
rm -f $IP_TMPFILE
|
||||
if ip link add name $LOCAL_IFNAME mtu $MTU type veth peer name $GUEST_IFNAME mtu $MTU >$IP_TMPFILE 2>&1 ; then
|
||||
if (ip link set $LOCAL_IFNAME master $BRIDGE &&
|
||||
ip link set $LOCAL_IFNAME up &&
|
||||
|
||||
Reference in new issue
Block a user