From 27b26607304d2e0899e08cb33e409e7835e6b60f Mon Sep 17 00:00:00 2001 From: Christoph Backhaus <106314951+NADOOITChristophBa@users.noreply.github.com> Date: Wed, 27 Nov 2024 15:42:58 +0100 Subject: [PATCH] Fix ShellCheck warnings in auth_methods.sh by disabling SC2029 and adding -r to read --- auth_methods.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/auth_methods.sh b/auth_methods.sh index 9d73be3..118ec73 100755 --- a/auth_methods.sh +++ b/auth_methods.sh @@ -43,6 +43,7 @@ setup_windows_hello() { # Configure PAM for Windows Hello echo -e "\n⚙️ Configuring PAM for Windows Hello..." + # shellcheck disable=SC2029 ssh "$admin_user@$server_ip" "sudo bash -c 'echo \"auth sufficient pam_webauthn.so\" >> /etc/pam.d/common-auth'" echo -e "\n${GREEN}✅ Windows Hello setup complete${NC}" @@ -73,7 +74,8 @@ setup_passkeys() { # Configure PAM echo -e "\n⚙️ Configuring PAM for Passkeys..." - ssh "$admin_user@$server_ip" "sudo bash -c 'echo \"auth sufficient pam_webauthn.so credential_source=file:///home/$admin_user/.config/webauthn/credentials.json\" >> /etc/pam.d/common-auth'" + # shellcheck disable=SC2029 + ssh "$admin_user@$server_ip" "sudo bash -c 'echo \"auth sufficient pam_webauthn.so credential_source=file:///home/\$admin_user/.config/webauthn/credentials.json\" >> /etc/pam.d/common-auth'" echo -e "\n${GREEN}✅ Passkey setup complete${NC}" } @@ -92,7 +94,7 @@ manage_auth_methods() { echo -e "4) 📱 Setup Passkeys" echo -e "5) ⬅️ Back to Main Menu" - read -p "Choose an option (1-5): " auth_choice + read -r -p "Choose an option (1-5): " auth_choice case "$auth_choice" in 1)