Bugzilla – Attachment 2366 Details for
Bug 2166
sshd logs unnecessary messages if some of default host keys doesn't exist
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
do not use absent host keys for default HostKey value
check-existence-of-host-keys.patch (text/plain), 1.31 KB, created by
Petr Lautrbach
on 2013-10-29 23:56:40 AEDT
(
hide
)
Description:
do not use absent host keys for default HostKey value
Filename:
MIME Type:
Creator:
Petr Lautrbach
Created:
2013-10-29 23:56:40 AEDT
Size:
1.31 KB
patch
obsolete
>diff --git a/servconf.c b/servconf.c >index 8214672..18b7d74 100644 >--- a/servconf.c >+++ b/servconf.c >@@ -168,16 +168,20 @@ fill_default_server_options(ServerOptions *options) > if (options->num_host_key_files == 0) { > /* fill default hostkeys for protocols */ > if (options->protocol & SSH_PROTO_1) >- options->host_key_files[options->num_host_key_files++] = >- _PATH_HOST_KEY_FILE; >+ if (access(_PATH_HOST_KEY_FILE, F_OK) == 0) >+ options->host_key_files[options->num_host_key_files++] = >+ _PATH_HOST_KEY_FILE; > if (options->protocol & SSH_PROTO_2) { >- options->host_key_files[options->num_host_key_files++] = >- _PATH_HOST_RSA_KEY_FILE; >- options->host_key_files[options->num_host_key_files++] = >- _PATH_HOST_DSA_KEY_FILE; >+ if (access(_PATH_HOST_RSA_KEY_FILE, F_OK) == 0) >+ options->host_key_files[options->num_host_key_files++] = >+ _PATH_HOST_RSA_KEY_FILE; >+ if (access(_PATH_HOST_DSA_KEY_FILE, F_OK) == 0) >+ options->host_key_files[options->num_host_key_files++] = >+ _PATH_HOST_DSA_KEY_FILE; > #ifdef OPENSSL_HAS_ECC >- options->host_key_files[options->num_host_key_files++] = >- _PATH_HOST_ECDSA_KEY_FILE; >+ if (access(_PATH_HOST_ECDSA_KEY_FILE, F_OK) == 0) >+ options->host_key_files[options->num_host_key_files++] = >+ _PATH_HOST_ECDSA_KEY_FILE; > #endif > } > }
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 2166
:
2366
|
2367