summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorLucas Kanashiro <lucas.kanashiro@collabora.com>2019-03-12 15:18:37 -0300
committerMax Illfelder <illfelder@users.noreply.github.com>2019-03-12 11:18:37 -0700
commit99d315eeb5c3b0fedd4660883aa5bbb4796db11b (patch)
tree795d83a5b51a16899849e9c0749fc2fb33aee90a /packages
parent54d35d37e25f4bca98018530689c818ba2a02b0f (diff)
downloadgoogle-compute-image-packages-99d315eeb5c3b0fedd4660883aa5bbb4796db11b.tar.gz
google_oslogin_control: fix some FreeBSD issues (#742)
* google_oslogin_control: fix some FreeBSD issues
Diffstat (limited to 'packages')
-rw-r--r--packages/google-compute-engine-oslogin/bin/google_oslogin_control7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/google-compute-engine-oslogin/bin/google_oslogin_control b/packages/google-compute-engine-oslogin/bin/google_oslogin_control
index 468ef96..75d43bf 100644
--- a/packages/google-compute-engine-oslogin/bin/google_oslogin_control
+++ b/packages/google-compute-engine-oslogin/bin/google_oslogin_control
@@ -37,7 +37,7 @@ modify_nsswitch_conf() {
$sed -i"" '/^passwd:/ s/$/ cache_oslogin oslogin/' "$nss_config"
fi
- if is_freebsd && grep -q '^passwd:.*compat'; then
+ if is_freebsd && grep -q '^passwd:.*compat' "$nss_config"; then
$sed -i"" '/^passwd:/ s/compat/files/' "$nss_config"
fi
}
@@ -61,6 +61,11 @@ modify_sshd_conf() (
local sshd_auth_methods="AuthenticationMethods publickey,keyboard-interactive"
local sshd_challenge="ChallengeResponseAuthentication yes"
+ # Update google_authorized_keys path in FreeBSD.
+ if is_freebsd; then
+ sshd_auth_keys_command="AuthorizedKeysCommand /usr/local/bin/google_authorized_keys"
+ fi
+
# Update directives for EL 6.
if grep -qs "release 6" /etc/redhat-release; then
sshd_auth_keys_command_user="AuthorizedKeysCommandRunAs root"