Restrict the length of container names

This commit is contained in:
Eelco Dolstra 2015-01-28 16:12:05 +01:00
parent 0ee569694c
commit 378006f0f2

View File

@ -104,6 +104,10 @@ if ($action eq "create") {
die "$0: container $containerName already exists\n" if -e $confFile;
# Due to interface name length restrictions, container names must
# be restricted too.
die "$0: container name $containerName is too long\n" if length $containerName > 11;
# Get an unused IP address.
my %usedIPs;
foreach my $confFile2 (glob "/etc/containers/*.conf") {