Subject: | work with pwdb that lacks groups |
MIME-Version: | 1.0 |
X-Mailer: | MIME-tools 5.427 (Entity 5.427) |
X-RT-Original-Encoding: | utf-8 |
Content-Type: | multipart/mixed; boundary="----------=_1313521693-22515-87" |
Content-Length: | 0 |
Content-Type: | text/plain; charset="UTF-8" |
Content-Disposition: | inline |
Content-Transfer-Encoding: | binary |
Content-Length: | 113 |
At some point I managed to have a pwdb file with missing groups;
Crypt::Pwsafe didn't like that.
Patch attached.
Subject: | group.patch |
MIME-Version: | 1.0 |
Content-Type: | application/octet-stream; name="group.patch" |
X-Mailer: | MIME-tools 5.427 (Entity 5.427) |
Content-Disposition: | inline; filename="group.patch" |
Content-Transfer-Encoding: | base64 |
Content-Length: | 496 |
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;