Skip to content

Commit

Permalink
override check_authorized_key for solaris 10 using alternate grep
Browse files Browse the repository at this point in the history
  • Loading branch information
podenski committed Sep 18, 2013
1 parent 6b5b8c8 commit 36f937e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/serverspec/commands/solaris10.rb
Expand Up @@ -80,6 +80,11 @@ def check_belonging_group(user, group)
"id -ap #{escape(user)} | grep -- #{escape(group)}"
end

def check_authorized_key(user, key)
key.sub!(/\s+\S*$/, '') if key.match(/^\S+\s+\S+\s+\S*$/)
"/usr/xpg4/bin/grep -F -- #{escape(key)} ~#{escape(user)}/.ssh/authorized_keys"

This comment has been minimized.

Copy link
@podenski

podenski Sep 18, 2013

Author Owner

using alternate grep so that the -F option can be employed

end

end
end
end

0 comments on commit 36f937e

Please sign in to comment.