From 4abadc2b54f8d0a361113e0b8b61e872cc288681 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Sat, 2 Jun 2012 15:28:05 +0100 Subject: [PATCH] Grant shell access to all keys for shell users If a user has multiple keys, ssh-authkeys-shell-users will only add the "-s" flag to the first key it finds. Change the substitution to apply to all matching lines and hence grant shell access to all of the user's keys. Signed-off-by: John Keeping --- src/triggers/post-compile/ssh-authkeys-shell-users | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/triggers/post-compile/ssh-authkeys-shell-users b/src/triggers/post-compile/ssh-authkeys-shell-users index 35b7f90..176e450 100755 --- a/src/triggers/post-compile/ssh-authkeys-shell-users +++ b/src/triggers/post-compile/ssh-authkeys-shell-users @@ -19,7 +19,7 @@ my $sufile = $rc{SHELL_USERS_LIST} or exit 0; my $aktext = slurp($akfile); for my $su ( shell_users() ) { - $aktext =~ s(/gitolite-shell $su([" ].*?),no-pty )(/gitolite-shell -s $su$1 ); + $aktext =~ s(/gitolite-shell $su([" ].*?),no-pty )(/gitolite-shell -s $su$1 )g; } _print( $akfile, $aktext );