From 126a36fcec6a8a1f0bbb9e7c367b520e68e7af0e Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Wed, 3 Jul 2013 23:03:01 -0700 Subject: [PATCH] User.pm: fix some undefined variable warnings --- Girocco/User.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Girocco/User.pm b/Girocco/User.pm index 529c5b8..211c07b 100644 --- a/Girocco/User.pm +++ b/Girocco/User.pm @@ -33,6 +33,7 @@ BEGIN { sub _gen_uuid { my $self = shift; + $self->{uuid} = '' unless $self->{uuid}; my @md5 = unpack('C*', md5(time . $$ . rand() . join(':',%$self))); $md5[6] = 0x40 | ($md5[6] & 0x0F); # Version 4 -- random $md5[8] = 0x80 | ($md5[8] & 0x3F); # RFC 4122 specification @@ -81,8 +82,8 @@ sub _sshkey_path { sub _sshkey_load { my $self = shift; open F, "<".jailed_file($self->_sshkey_path) or die "sshkey load failed: $!"; - my @keys; - my $auth; + my @keys = (); + my $auth = ''; while () { chomp; if (/^ssh-(?:dss|rsa) /) { -- 2.11.4.GIT