Page MenuHomeFreeBSD

D61439.1794715621.diff
No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None

D61439.1794715621.diff

diff --git a/crypto/openssh/servconf.c b/crypto/openssh/servconf.c
--- a/crypto/openssh/servconf.c
+++ b/crypto/openssh/servconf.c
@@ -245,18 +245,12 @@
free(def_sig);
}
-static const char *defaultkey = "[default]";
-
void
servconf_add_hostkey(const char *file, const int line,
ServerOptions *options, const char *path, int userprovided)
{
char *apath = derelativise_path(path);
- if (file == defaultkey && access(apath, R_OK) != 0) {
- free(apath);
- return;
- }
opt_array_append2(file, line, "HostKey",
&options->host_key_files, &options->host_key_file_userprovided,
&options->num_host_key_files, apath, userprovided);
@@ -332,17 +326,15 @@
if (options->num_host_key_files == 0) {
/* fill default hostkeys */
- servconf_add_hostkey(defaultkey, 0, options,
+ servconf_add_hostkey("[default]", 0, options,
_PATH_HOST_RSA_KEY_FILE, 0);
- servconf_add_hostkey(defaultkey, 0, options,
+ servconf_add_hostkey("[default]", 0, options,
_PATH_HOST_ECDSA_KEY_FILE, 0);
- servconf_add_hostkey(defaultkey, 0, options,
+ servconf_add_hostkey("[default]", 0, options,
_PATH_HOST_ED25519_KEY_FILE, 0);
- servconf_add_hostkey(defaultkey, 0, options,
+ servconf_add_hostkey("[default]", 0, options,
_PATH_HOST_MLDSA44_ED25519_KEY_FILE, 0);
}
- if (options->num_host_key_files == 0)
- fatal("No host key files found");
/* No certificates by default */
if (options->num_ports == 0)
options->ports[options->num_ports++] = SSH_DEFAULT_PORT;
@@ -405,11 +397,11 @@
if (options->per_source_penalty.penalty_max < 0.0)
options->per_source_penalty.penalty_max = 600.0;
if (options->num_authkeys_files == 0) {
- opt_array_append(defaultkey, 0, "AuthorizedKeysFiles",
+ opt_array_append("[default]", 0, "AuthorizedKeysFiles",
&options->authorized_keys_files,
&options->num_authkeys_files,
_PATH_SSH_USER_PERMITTED_KEYS);
- opt_array_append(defaultkey, 0, "AuthorizedKeysFiles",
+ opt_array_append("[default]", 0, "AuthorizedKeysFiles",
&options->authorized_keys_files,
&options->num_authkeys_files,
_PATH_SSH_USER_PERMITTED_KEYS2);

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 15, 4:07 AM (3 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41678276
Default Alt Text
D61439.1794715621.diff (2 KB)

Event Timeline