aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mars-attacks.org>2013-06-27 20:52:46 +0200
committerNicolas Vigier <boklm@mars-attacks.org>2013-06-27 20:52:46 +0200
commita0c689eeb9a727cfc53acdbc26656b1d2ea3b168 (patch)
tree9952b68d68d1e4078ee1058aee9aad1d60413d81
parent0cb34163d8d758364caf2464968df4716812b652 (diff)
downloadmgagit-a0c689eeb9a727cfc53acdbc26656b1d2ea3b168.tar
mgagit-a0c689eeb9a727cfc53acdbc26656b1d2ea3b168.tar.gz
mgagit-a0c689eeb9a727cfc53acdbc26656b1d2ea3b168.tar.bz2
mgagit-a0c689eeb9a727cfc53acdbc26656b1d2ea3b168.tar.xz
mgagit-a0c689eeb9a727cfc53acdbc26656b1d2ea3b168.zip
Fix comparison of old and new ssh keys from ldap
-rw-r--r--NEWS2
-rw-r--r--lib/MGA/Git.pm4
2 files changed, 5 insertions, 1 deletions
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;