use strict vars;
#use Apache::Registry;
use CGI;
-use UUID;
+use Data::UUID;
use Digest::HMAC_SHA1 qw(hmac_sha1_hex);
use Util;
use English;
my $e = "<tr><td>$hosts</td>
<td>$status</td>
<td><small>not shown</small></td>
- <td><small><code>$uuid</code></small></td>
+ <!--<td><small><code>$uuid</code></small></td>-->
<td><input name=\"sudopassword-delete-$uuid\" type=\"checkbox\" value=\"delete\"> (delete)</td></tr>\n";
$sudopassword .= $e;
if ($status eq 'unconfirmed') {
- my $hmac = hmac_sha1_hex( join(':', 'confirm-new-password', $uuid, $hosts, $crypted), $hmac_key);
+ my $data = join(':', 'confirm-new-password', $uuid, $hosts, $crypted);
+ my $hmac = hmac_sha1_hex( $data, $hmac_key);
$confirmstring .= "confirm sudopassword $uuid $hosts $hmac\n";
}
};
my $data = $host_entries->{$dn};
my $host = $data->{'host'}->[0];
my $hostname = $data->{'hostname'}->[0];
- $sudopasswordhosts .= "<option value=\"$host\">$hostname\n";
+ $sudopasswordhosts .= "<option value=\"$hostname\">$host\n";
};
$sudopasswordhosts .= '</select>';
}
# create a md5 crypted password
my $newsudopassword = crypt($query->param('newsudopass'), &Util::CreateCryptSalt(1));
- my ($uuidbin, $uuid);
- UUID::generate($uuidbin);
- UUID::unparse($uuidbin, $uuid);
+ my $ug = new Data::UUID;
+ my $uuid = $ug->create_str();
$newsudo = "$uuid unconfirmed $host $newsudopassword";
$newsudo_hosts = $host;