this is in glibc since 2.7, centos 6 has 2.12, debian 6 has 2.11,
ubuntu 12.04 has 2.15
so all 'old' templates have a version new enough
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
if (defined($opt_password)) {
if ($opt_password !~ m/^\$(?:1|2[axy]?|5|6)\$[a-zA-Z0-9.\/]{1,16}\$[a-zA-Z0-9.\/]+$/) {
my $time = substr (Digest::SHA::sha1_base64 (time), 0, 8);
- $opt_password = crypt(encode("utf8", $opt_password), "\$1\$$time\$");
+ $opt_password = crypt(encode("utf8", $opt_password), "\$6\$$time\$");
};
} else {
$opt_password = '*';