Skip to content
Browse files

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 <john@keeping.me.uk>
  • Loading branch information...
1 parent db70595 commit 4abadc2b54f8d0a361113e0b8b61e872cc288681 @johnkeeping johnkeeping committed with Jun 2, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/triggers/post-compile/ssh-authkeys-shell-users
View
2 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 );

0 comments on commit 4abadc2

Please sign in to comment.
Something went wrong with that request. Please try again.