Subject: | work with pwdb that lacks groups |
At some point I managed to have a pwdb file with missing groups;
Crypt::Pwsafe didn't like that.
Patch attached.
Subject: | group.patch |
diff '--exclude=CVS' -wur Crypt/Pwsafe.pm Crypt/Pwsafe.pm
--- Crypt/Pwsafe.pm 2011-08-16 11:59:04.234375000 -0700
+++ Crypt/Pwsafe.pm 2011-03-06 20:16:41.893250000 -0800
@@ -200,6 +200,7 @@
$user = pack("U0C*", unpack("C*", $buf));
print " User=$user\n" if $DEBUG;
} elsif ($type == 0xff) { # End of Entry
+ $group = '' unless defined $group;
if (defined($title) and defined($user)) {
if (exists $pwsafe->{$group}) {
$pwsafe->{$group}->{"$user\@$title"} = $entry;