From a0c689eeb9a727cfc53acdbc26656b1d2ea3b168 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 27 Jun 2013 20:52:46 +0200 Subject: Fix comparison of old and new ssh keys from ldap --- NEWS | 2 ++ lib/MGA/Git.pm | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 43796e3..66c0018 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +- fix comparison of old and new ssh keys from ldap + Version 0.3 - ignore group members not matching user re diff --git a/lib/MGA/Git.pm b/lib/MGA/Git.pm index a9c0722..f6b9b7f 100644 --- a/lib/MGA/Git.pm +++ b/lib/MGA/Git.pm @@ -162,6 +162,7 @@ sub update_gitolite_keydir { } } foreach my $file (keys %users_old) { + chomp $users_old{$file}; if (!$users_new{$file}) { print "Removing $file\n"; unlink "$config->{pubkey_dir}/$file"; @@ -169,7 +170,8 @@ sub update_gitolite_keydir { } } foreach my $file (keys %users_new) { - if (!$users_old{$file} || chomp $users_old{$file} ne chomp $users_new{$file}) { + chomp $users_new{$file}; + if (!$users_old{$file} || $users_old{$file} ne $users_new{$file}) { print "Writing $file\n"; write_file("$config->{pubkey_dir}/$file", $users_new{$file}); $r->{keydir_changed} = 1; -- cgit v1.2.1