summaryrefslogtreecommitdiff
path: root/ssh.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2017-04-28 03:20:27 +0000
committerDamien Miller <djm@mindrot.org>2017-04-28 13:26:36 +1000
commit68d3a2a059183ebd83b15e54984ffaced04d2742 (patch)
tree9d1cf14d357079cb09f338f8d7efb6737da356d3 /ssh.c
parente13aad66e73a14b062d13aee4e98f1e21a3f6a14 (diff)
upstream commit
Add SyslogFacility option to ssh(1) matching the equivalent option in sshd(8). bz#2705, patch from erahn at arista.com, ok djm@ Upstream-ID: d5115c2c0193ceb056ed857813b2a7222abda9ed
Diffstat (limited to 'ssh.c')
-rw-r--r--ssh.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ssh.c b/ssh.c
index 32b27bbc..5db6ff25 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.451 2017/03/10 04:07:20 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.452 2017/04/28 03:20:27 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1007,8 +1007,11 @@ main(int ac, char **av)
if (logfile != NULL)
log_redirect_stderr_to(logfile);
log_init(argv0,
- options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level,
- SYSLOG_FACILITY_USER, !use_syslog);
+ options.log_level == SYSLOG_LEVEL_NOT_SET ?
+ SYSLOG_LEVEL_INFO : options.log_level,
+ options.log_facility == SYSLOG_FACILITY_NOT_SET ?
+ SYSLOG_FACILITY_USER : options.log_facility,
+ !use_syslog);
if (debug_flag)
logit("%s, %s", SSH_RELEASE,
@@ -1150,7 +1153,7 @@ main(int ac, char **av)
#endif
/* reinit */
- log_init(argv0, options.log_level, SYSLOG_FACILITY_USER, !use_syslog);
+ log_init(argv0, options.log_level, options.log_facility, !use_syslog);
if (options.request_tty == REQUEST_TTY_YES ||
options.request_tty == REQUEST_TTY_FORCE)