Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
49b8814f
Commit
49b8814f
authored
Jan 24, 2018
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix OPENSSH_EXPECTED_COMMAND in the geo:check rake task
parent
1f7b7c81
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
ee/lib/system_check/geo/authorized_keys_check.rb
ee/lib/system_check/geo/authorized_keys_check.rb
+1
-1
spec/ee/fixtures/system_check/sshd_config
spec/ee/fixtures/system_check/sshd_config
+1
-1
spec/ee/fixtures/system_check/sshd_config_invalid_user
spec/ee/fixtures/system_check/sshd_config_invalid_user
+1
-1
spec/ee/fixtures/system_check/sshd_config_no_user
spec/ee/fixtures/system_check/sshd_config_no_user
+1
-1
spec/ee/spec/lib/system_check/geo/authorized_keys_check_spec.rb
...e/spec/lib/system_check/geo/authorized_keys_check_spec.rb
+1
-1
No files found.
ee/lib/system_check/geo/authorized_keys_check.rb
View file @
49b8814f
...
...
@@ -22,7 +22,7 @@ module SystemCheck
\s
* # optional any amount of space character
(?:
\#
.*)?$ # optional start-comment symbol followed by optionally any character until end of line
}x
OPENSSH_EXPECTED_COMMAND
=
'/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check %u %k'
.
freeze
OPENSSH_EXPECTED_COMMAND
=
'/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check
git
%u %k'
.
freeze
def
multi_check
unless
openssh_config_exists?
...
...
spec/ee/fixtures/system_check/sshd_config
View file @
49b8814f
...
...
@@ -32,7 +32,7 @@ RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
#AuthorizedKeysCommand /opt/gitlab-shell/invalid_authorized_keys %u %k
AuthorizedKeysCommand /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check %u %k
AuthorizedKeysCommand /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check
git
%u %k
AuthorizedKeysCommandUser git
# Don't read the user's ~/.rhosts and ~/.shosts files
...
...
spec/ee/fixtures/system_check/sshd_config_invalid_user
View file @
49b8814f
...
...
@@ -4,5 +4,5 @@
RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
AuthorizedKeysCommand /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check %u %k # comment
AuthorizedKeysCommand /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check
git
%u %k # comment
AuthorizedKeysCommandUser anotheruser #comment with more stuff#
spec/ee/fixtures/system_check/sshd_config_no_user
View file @
49b8814f
...
...
@@ -5,5 +5,5 @@ RSAAuthentication yes
PubkeyAuthentication yes
#AuthorizedKeysFile %h/.ssh/authorized_keys
#AuthorizedKeysCommand /opt/gitlab-shell/invalid_authorized_keys %u %k
AuthorizedKeysCommand /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check %u %k
AuthorizedKeysCommand /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check
git
%u %k
#AuthorizedKeysCommandUser git
spec/ee/spec/lib/system_check/geo/authorized_keys_check_spec.rb
View file @
49b8814f
...
...
@@ -106,7 +106,7 @@ describe SystemCheck::Geo::AuthorizedKeysCheck do
it
'returns correct (uncommented) command'
do
override_sshd_config
(
'system_check/sshd_config'
)
expect
(
subject
.
extract_authorized_keys_command
).
to
eq
(
'/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check %u %k'
)
expect
(
subject
.
extract_authorized_keys_command
).
to
eq
(
'/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check
git
%u %k'
)
end
it
'returns command without comments and without quotes'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment