sub rotate_authkey {
return if $authkey_lifetime == 0;
- cfs_lock_authkey(undef, sub {
+ PVE::Cluster::cfs_lock_authkey(undef, sub {
# re-check with lock to avoid double rotation in clusters
return if check_authkey();
my $secret_data = "$username:$path";
my ($rsa_pub, $rsa_mtime) = get_pubkey();
- if (!$rsa_pub || (time() - $rsa_mtime > $authkey_lifetime)) {
+ if (!$rsa_pub || (time() - $rsa_mtime > $authkey_lifetime && $authkey_lifetime > 0)) {
if ($noerr) {
return undef;
} else {