[openssh-commits] [openssh] 01/01: Error out if given RDomain if unsupported.
git+noreply at mindrot.org
git+noreply at mindrot.org
Fri Apr 24 15:11:26 AEST 2020
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 20819b962dc1467cd6fad5486a7020c850efdbee
Author: Darren Tucker <dtucker at dtucker.net>
Date: Fri Apr 24 15:07:55 2020 +1000
Error out if given RDomain if unsupported.
If the config contained 'RDomain %D' on a platform that did not support
it, the error would not be detected until runtime resulting in a broken
sshd. Detect this earlier and error out if found. bz#3126, based on a
patch from jjelen at redhat.com, tweaks and ok djm@
---
servconf.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/servconf.c b/servconf.c
index ce5572db..ba0a92c7 100644
--- a/servconf.c
+++ b/servconf.c
@@ -2332,6 +2332,10 @@ process_server_config_line_depth(ServerOptions *options, char *line,
goto parse_flag;
case sRDomain:
+#if !defined(__OpenBSD__) && !defined(HAVE_SYS_SET_PROCESS_RDOMAIN)
+ fatal("%s line %d: setting RDomain not supported on this "
+ "platform.", filename, linenum);
+#endif
charptr = &options->routing_domain;
arg = strdelim(&cp);
if (!arg || *arg == '\0')
@@ -2840,7 +2844,9 @@ dump_config(ServerOptions *o)
dump_cfg_string(sHostbasedAcceptedKeyTypes, o->hostbased_key_types);
dump_cfg_string(sHostKeyAlgorithms, o->hostkeyalgorithms);
dump_cfg_string(sPubkeyAcceptedKeyTypes, o->pubkey_key_types);
+#if defined(__OpenBSD__) || defined(HAVE_SYS_SET_PROCESS_RDOMAIN)
dump_cfg_string(sRDomain, o->routing_domain);
+#endif
/* string arguments requiring a lookup */
dump_cfg_string(sLogLevel, log_level_name(o->log_level));
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list