Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 763086 Details for
Bug 831762
net-misc/openssh: Modify OpenRC init script to enable control of SSH HostKey algorithm generation
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch against sshd-r2.initd to highlight core changes
sshd-initd.diff (text/plain), 1.87 KB, created by
Joshua Kinard
on 2022-01-22 00:33:07 UTC
(
hide
)
Description:
Patch against sshd-r2.initd to highlight core changes
Filename:
MIME Type:
Creator:
Joshua Kinard
Created:
2022-01-22 00:33:07 UTC
Size:
1.87 KB
patch
obsolete
>--- files/sshd-r2.initd 2021-06-19 18:07:56.959555000 -0400 >+++ /etc/init.d/sshd 2022-01-21 18:58:17.634927876 -0500 >@@ -1,5 +1,5 @@ > #!/sbin/openrc-run >-# Copyright 1999-2021 Gentoo Authors >+# Copyright 1999-2022 Gentoo Authors > # Distributed under the terms of the GNU General Public License v2 > > extra_commands="checkconfig" >@@ -10,6 +10,11 @@ extra_started_commands="reload" > : ${SSHD_PIDFILE:=${RC_PREFIX%/}/run/${SVCNAME}.pid} > : ${SSHD_BINARY:=${RC_PREFIX%/}/usr/sbin/sshd} > : ${SSHD_KEYGEN_BINARY:=${RC_PREFIX%/}/usr/bin/ssh-keygen} >+: ${SSHD_HOSTKEY_DSA_ENABLE="YES"} >+: ${SSHD_HOSTKEY_ECDSA_ENABLE="YES"} >+: ${SSHD_HOSTKEY_ED25519_ENABLE="YES"} >+: ${SSHD_HOSTKEY_RSA_ENABLE="YES"} >+: ${SSHD_HOSTKEY_XMSS_ENABLE="YES"} > > command="${SSHD_BINARY}" > pidfile="${SSHD_PIDFILE}" >@@ -46,17 +51,38 @@ depend() { > fi > } > >+gen_hostkey() { >+ local hkey_type="${1}" >+ [ -z ${hkey_type} ] && return 1 >+ >+ local hkey_file="${SSHD_CONFDIR}/ssh_host_${hkey_type}_key" >+ local hkey_type_upper="$(echo ${hkey_type} | tr "[:lower:]" "[:upper:]")" >+ local hkey_type_var="SSHD_HOSTKEY_${hkey_type_upper}_ENABLE" >+ local hkey_type_enable="$(eval echo "\$$hkey_type_var")" >+ >+ if yesno ${hkey_type_enable} && [ ! -f ${hkey_file} ] ; then >+ ${SSHD_KEYGEN_BINARY} -t ${hkey_type} -f ${hkey_file} -N '' || return 1 >+ fi >+} >+ > checkconfig() { > checkpath --mode 0755 --directory "${RC_PREFIX%/}/var/empty" > >+ # Check for sshd_config. > if [ ! -e "${SSHD_CONFIG}" ] ; then > eerror "You need an ${SSHD_CONFIG} file to run sshd" > eerror "There is a sample file in /usr/share/doc/openssh" > return 1 > fi > >- ${SSHD_KEYGEN_BINARY} -A || return 2 >+ # HostKey generation. >+ gen_hostkey "dsa" || return 2 >+ gen_hostkey "ecdsa" || return 2 >+ gen_hostkey "ed25519" || return 2 >+ gen_hostkey "rsa" || return 2 >+ gen_hostkey "xmss" || return 2 > >+ # Check sshd config file syntax > "${command}" -t ${command_args} || return 3 > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 831762
:
763086
|
763087
|
763088
|
763089
|
763442
|
763443
|
763444
|
763445
|
763446
|
763447