From: Fabian Grünbichler Date: Wed, 30 Mar 2016 10:09:12 +0000 (+0200) Subject: Fix uninitialized warning X-Git-Url: https://git.proxmox.com/?p=pve-access-control.git;a=commitdiff_plain;h=8978ab373c63fe92e4bfe17cc64fe593b3fd27f1 Fix uninitialized warning when shadow.cfg does not exist, parsing should return an empty hash instead of displaying a warning --- diff --git a/PVE/Auth/PVE.pm b/PVE/Auth/PVE.pm index 7147997..8714a6b 100755 --- a/PVE/Auth/PVE.pm +++ b/PVE/Auth/PVE.pm @@ -19,6 +19,8 @@ sub parse_shadow_passwd { my $shadow = {}; + return $shadow if !defined($raw); + while ($raw =~ /^\s*(.+?)\s*$/gm) { my $line = $1;