]> git.proxmox.com Git - pmg-api.git/commitdiff
access control: add newline when dying on auth
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Apr 2021 05:59:43 +0000 (07:59 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 28 Apr 2021 05:59:45 +0000 (07:59 +0200)
to avoid the module-path + line suffixed in the error..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/PMG/AccessControl.pm

index 693e5ef110d182f110cf4554f5c4ce51a2287bcf..20f2c175a0ef61b0cd51fa9e19eddb97c6463f88 100644 (file)
@@ -138,12 +138,12 @@ sub authenticate_pam_user {
 
     if (($res = $pamh->pam_authenticate(0)) != PAM_SUCCESS) {
        my $err = $pamh->pam_strerror($res);
-       die "auth failed: $err";
+       die "auth failed: $err\n";
     }
 
     if (($res = $pamh->pam_acct_mgmt(0)) != PAM_SUCCESS) {
        my $err = $pamh->pam_strerror($res);
-       die "auth failed: $err";
+       die "auth failed: $err\n";
     }
 
     $pamh = 0; # call destructor