summaryrefslogtreecommitdiff
path: root/sshd.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2020-11-08 11:46:12 +0000
committerDarren Tucker <dtucker@dtucker.net>2020-11-09 00:02:27 +1100
commit4d94b031ff88b015f0db57e140f481bff7ae1a91 (patch)
tree3cd23c4816252f9e5b11bad31bbf0d335398582f /sshd.c
parent6d2564b94e51184eb0b73b97d13a36ad50b4f810 (diff)
downloadopenssh-git-4d94b031ff88b015f0db57e140f481bff7ae1a91.tar.gz
upstream: Replace WITH_OPENSSL ifdefs in log calls with a macro.
The log calls are themselves now macros, and preprocessor directives inside macro arguments are undefined behaviour which some compilers (eg old GCCs) choke on. It also makes the code tidier. ok deraadt@ OpenBSD-Commit-ID: cc12a9029833d222043aecd252d654965c351a69
Diffstat (limited to 'sshd.c')
-rw-r--r--sshd.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/sshd.c b/sshd.c
index bdb9c957..173fadd8 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshd.c,v 1.564 2020/10/18 11:32:02 djm Exp $ */
+/* $OpenBSD: sshd.c,v 1.565 2020/11/08 11:46:12 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -906,14 +906,7 @@ drop_connection(int sock, int startups)
static void
usage(void)
{
- fprintf(stderr, "%s, %s\n",
- SSH_RELEASE,
-#ifdef WITH_OPENSSL
- OpenSSL_version(OPENSSL_VERSION)
-#else
- "without OpenSSL"
-#endif
- );
+ fprintf(stderr, "%s, %s\n", SSH_RELEASE, SSH_OPENSSL_VERSION);
fprintf(stderr,
"usage: sshd [-46DdeiqTt] [-C connection_spec] [-c host_cert_file]\n"
" [-E log_file] [-f config_file] [-g login_grace_time]\n"
@@ -1772,13 +1765,7 @@ main(int ac, char **av)
exit(1);
}
- debug("sshd version %s, %s", SSH_VERSION,
-#ifdef WITH_OPENSSL
- OpenSSL_version(OPENSSL_VERSION)
-#else
- "without OpenSSL"
-#endif
- );
+ debug("sshd version %s, %s", SSH_VERSION, SSH_OPENSSL_VERSION);
/* Store privilege separation user for later use if required. */
privsep_chroot = use_privsep && (getuid() == 0 || geteuid() == 0);