mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-18 19:51:17 +00:00
Restrict the length of container names
This commit is contained in:
parent
0ee569694c
commit
378006f0f2
|
@ -104,6 +104,10 @@ if ($action eq "create") {
|
||||||
|
|
||||||
die "$0: container ‘$containerName’ already exists\n" if -e $confFile;
|
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.
|
# Get an unused IP address.
|
||||||
my %usedIPs;
|
my %usedIPs;
|
||||||
foreach my $confFile2 (glob "/etc/containers/*.conf") {
|
foreach my $confFile2 (glob "/etc/containers/*.conf") {
|
||||||
|
|
Loading…
Reference in a new issue