]> git.proxmox.com Git - pve-access-control.git/commitdiff
ldap_delete_credentials: don't complain if already deleted
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 8 May 2020 07:38:34 +0000 (09:38 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 8 May 2020 07:38:34 +0000 (09:38 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/Auth/LDAP.pm

index 64250cb7af08c3a2e7c2c92c5b6538807ffe199b..9fa909500f3693d5626546ccf7b3369970eee1d6 100755 (executable)
@@ -411,6 +411,7 @@ sub ldap_delete_credentials {
     my ($realmid) = @_;
 
     if (my $cred_file = get_cred_file($realmid)) {
+       return if ! -e $cred_file; # nothing to do
        unlink($cred_file) or warn "removing LDAP credentials '$cred_file' failed: $!\n";
     }
 }