View | Details | Raw Unified | Return to bug 2705
Collapse All | Expand All

(-)a/readconf.c (-1 / +17 lines)
Lines 152-158 typedef enum { Link Here
152
	oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
152
	oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
153
	oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,
153
	oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression,
154
	oCompressionLevel, oTCPKeepAlive, oNumberOfPasswordPrompts,
154
	oCompressionLevel, oTCPKeepAlive, oNumberOfPasswordPrompts,
155
	oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs,
155
	oUsePrivilegedPort, oLogFacility, oLogLevel, oCiphers, oProtocol, oMacs,
156
	oPubkeyAuthentication,
156
	oPubkeyAuthentication,
157
	oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,
157
	oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,
158
	oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
158
	oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
Lines 265-270 static struct { Link Here
265
	{ "tcpkeepalive", oTCPKeepAlive },
265
	{ "tcpkeepalive", oTCPKeepAlive },
266
	{ "keepalive", oTCPKeepAlive },				/* obsolete */
266
	{ "keepalive", oTCPKeepAlive },				/* obsolete */
267
	{ "numberofpasswordprompts", oNumberOfPasswordPrompts },
267
	{ "numberofpasswordprompts", oNumberOfPasswordPrompts },
268
	{ "syslogfacility", oLogFacility },
268
	{ "loglevel", oLogLevel },
269
	{ "loglevel", oLogLevel },
269
	{ "dynamicforward", oDynamicForward },
270
	{ "dynamicforward", oDynamicForward },
270
	{ "preferredauthentications", oPreferredAuthentications },
271
	{ "preferredauthentications", oPreferredAuthentications },
Lines 830-835 process_config_line_depth(Options *options, struct passwd *pw, const char *host, Link Here
830
	u_int i, *uintptr, max_entries = 0;
831
	u_int i, *uintptr, max_entries = 0;
831
	int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0;
832
	int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0;
832
	LogLevel *log_level_ptr;
833
	LogLevel *log_level_ptr;
834
	SyslogFacility *log_facility_ptr;
833
	long long val64;
835
	long long val64;
834
	size_t len;
836
	size_t len;
835
	struct Forward fwd;
837
	struct Forward fwd;
Lines 1264-1269 parse_keytypes: Link Here
1264
			*log_level_ptr = (LogLevel) value;
1266
			*log_level_ptr = (LogLevel) value;
1265
		break;
1267
		break;
1266
1268
1269
	case oLogFacility:
1270
		log_facility_ptr = &options->log_facility;
1271
		arg = strdelim(&s);
1272
		value = log_facility_number(arg);
1273
		if (value == SYSLOG_FACILITY_NOT_SET)
1274
			fatal("%.200s line %d: unsupported log facility '%s'",
1275
			    filename, linenum, arg ? arg : "<NONE>");
1276
		if (*log_facility_ptr == -1)
1277
			*log_facility_ptr = (SyslogFacility) value;
1278
		break;
1279
1267
	case oLocalForward:
1280
	case oLocalForward:
1268
	case oRemoteForward:
1281
	case oRemoteForward:
1269
	case oDynamicForward:
1282
	case oDynamicForward:
Lines 1838-1843 initialize_options(Options * options) Link Here
1838
	options->num_local_forwards = 0;
1851
	options->num_local_forwards = 0;
1839
	options->remote_forwards = NULL;
1852
	options->remote_forwards = NULL;
1840
	options->num_remote_forwards = 0;
1853
	options->num_remote_forwards = 0;
1854
	options->log_facility = SYSLOG_FACILITY_NOT_SET;
1841
	options->log_level = SYSLOG_LEVEL_NOT_SET;
1855
	options->log_level = SYSLOG_LEVEL_NOT_SET;
1842
	options->preferred_authentications = NULL;
1856
	options->preferred_authentications = NULL;
1843
	options->bind_address = NULL;
1857
	options->bind_address = NULL;
Lines 2014-2019 fill_default_options(Options * options) Link Here
2014
	}
2028
	}
2015
	if (options->log_level == SYSLOG_LEVEL_NOT_SET)
2029
	if (options->log_level == SYSLOG_LEVEL_NOT_SET)
2016
		options->log_level = SYSLOG_LEVEL_INFO;
2030
		options->log_level = SYSLOG_LEVEL_INFO;
2031
	if (options->log_facility == SYSLOG_FACILITY_NOT_SET)
2032
		options->log_facility = SYSLOG_FACILITY_USER;
2017
	if (options->no_host_authentication_for_localhost == - 1)
2033
	if (options->no_host_authentication_for_localhost == - 1)
2018
		options->no_host_authentication_for_localhost = 0;
2034
		options->no_host_authentication_for_localhost = 0;
2019
	if (options->identities_only == -1)
2035
	if (options->identities_only == -1)
(-)a/readconf.h (+1 lines)
Lines 59-64 typedef struct { Link Here
59
	int     tcp_keep_alive;	/* Set SO_KEEPALIVE. */
59
	int     tcp_keep_alive;	/* Set SO_KEEPALIVE. */
60
	int	ip_qos_interactive;	/* IP ToS/DSCP/class for interactive */
60
	int	ip_qos_interactive;	/* IP ToS/DSCP/class for interactive */
61
	int	ip_qos_bulk;		/* IP ToS/DSCP/class for bulk traffic */
61
	int	ip_qos_bulk;		/* IP ToS/DSCP/class for bulk traffic */
62
	SyslogFacility log_facility;	/* Facility for system logging. */
62
	LogLevel log_level;	/* Level for logging. */
63
	LogLevel log_level;	/* Level for logging. */
63
64
64
	int     port;		/* Port to connect. */
65
	int     port;		/* Port to connect. */
(-)a/ssh.c (-3 / +6 lines)
Lines 1007-1014 main(int ac, char **av) Link Here
1007
	if (logfile != NULL)
1007
	if (logfile != NULL)
1008
		log_redirect_stderr_to(logfile);
1008
		log_redirect_stderr_to(logfile);
1009
	log_init(argv0,
1009
	log_init(argv0,
1010
	    options.log_level == -1 ? SYSLOG_LEVEL_INFO : options.log_level,
1010
	    options.log_level == SYSLOG_LEVEL_NOT_SET ? 
1011
	    SYSLOG_FACILITY_USER, !use_syslog);
1011
	    SYSLOG_LEVEL_INFO : options.log_level,
1012
	    options.log_facility == SYSLOG_FACILITY_NOT_SET ? 
1013
	    SYSLOG_FACILITY_USER : options.log_facility,
1014
	    !use_syslog);
1012
1015
1013
	if (debug_flag)
1016
	if (debug_flag)
1014
		logit("%s, %s", SSH_RELEASE,
1017
		logit("%s, %s", SSH_RELEASE,
Lines 1150-1156 main(int ac, char **av) Link Here
1150
#endif
1153
#endif
1151
1154
1152
	/* reinit */
1155
	/* reinit */
1153
	log_init(argv0, options.log_level, SYSLOG_FACILITY_USER, !use_syslog);
1156
	log_init(argv0, options.log_level, options.log_facility, !use_syslog);
1154
1157
1155
	if (options.request_tty == REQUEST_TTY_YES ||
1158
	if (options.request_tty == REQUEST_TTY_YES ||
1156
	    options.request_tty == REQUEST_TTY_FORCE)
1159
	    options.request_tty == REQUEST_TTY_FORCE)
(-)a/ssh_config.5 (-1 / +6 lines)
Lines 1101-1106 indicates that the listening port be bound for local use only, while an Link Here
1101
empty address or
1101
empty address or
1102
.Sq *
1102
.Sq *
1103
indicates that the port should be available from all interfaces.
1103
indicates that the port should be available from all interfaces.
1104
.It Cm SyslogFacility
1105
Gives the facility code that is used when logging messages from
1106
.Xr ssh 1 .
1107
The possible values are: DAEMON, USER, AUTH, LOCAL0, LOCAL1, LOCAL2,
1108
LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7.
1109
The default is USER.
1104
.It Cm LogLevel
1110
.It Cm LogLevel
1105
Gives the verbosity level that is used when logging messages from
1111
Gives the verbosity level that is used when logging messages from
1106
.Xr ssh 1 .
1112
.Xr ssh 1 .
1107
- 

Return to bug 2705