Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 839180

Summary: sys-auth/pam_ssh: automated shellcheck found errors
Product: Gentoo Linux Reporter: shellbugbot <d-shellbug>
Component: Current packagesAssignee: No maintainer - Look at https://wiki.gentoo.org/wiki/Project:Proxy_Maintainers if you want to take care of it <maintainer-needed>
Status: UNCONFIRMED ---    
Severity: normal CC: b4b1
Priority: Normal Keywords: PMASKED
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description shellbugbot 2022-04-18 11:06:01 UTC
Shellckeck found errors in one or more shellscripts provided by sys-auth/pam_ssh.

Kindly refer to the findings below and the shellcheck wiki for further details:

------------------------------------------------
script: /usr/portage/sys-auth/pam_ssh/pam_ssh-2.3.ebuild:64

	for i in "${REPLACING_VERSIONS}"; do
                 ^^^^^^^^^^^^^^^^^^^^^^^
error: Since you double quoted this, it will not word split, and the loop will only run once. (https://github.com/koalaman/shellcheck/wiki/SC2066)

This is an automated bug report. Conservative settings were used to minimize false-positives but there's still a chance that the above list contains non-issues.
Running shellcheck again with default settings could detect other possible issues.

References:
[1] this script: https://github.com/heeplr/gentoo-shellbug
[2] shellcheck: https://www.shellcheck.net/
Comment 1 Zentoo 2024-04-17 17:42:01 UTC
The pkg_preinst function can be replaced by this more simple code:

pkg_preinst() {
    if [[ "$REPLACED_BY_VERSION" == 1.* ]]; then
        ewarn "Upstream pam_ssh has changed where ssh keys live. Only keys in your"
        ewarn "~/.ssh/login-keys.d/ will be accepted for authentication."
    fi
}