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

(-)a/auth.c (+1 lines)
Lines 661-666 getpwnamallow(const char *user) Link Here
661
661
662
	ci->user = user;
662
	ci->user = user;
663
	parse_server_match_config(&options, ci);
663
	parse_server_match_config(&options, ci);
664
	log_change_level(options.log_level);
664
665
665
#if defined(_AIX) && defined(HAVE_SETAUTHDB)
666
#if defined(_AIX) && defined(HAVE_SETAUTHDB)
666
	aix_setauthdb(user);
667
	aix_setauthdb(user);
(-)a/log.c (-15 / +18 lines)
Lines 256-273 log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr) Link Here
256
256
257
	argv0 = av0;
257
	argv0 = av0;
258
258
259
	switch (level) {
259
	if (log_change_level(level) != 0) {
260
	case SYSLOG_LEVEL_QUIET:
261
	case SYSLOG_LEVEL_FATAL:
262
	case SYSLOG_LEVEL_ERROR:
263
	case SYSLOG_LEVEL_INFO:
264
	case SYSLOG_LEVEL_VERBOSE:
265
	case SYSLOG_LEVEL_DEBUG1:
266
	case SYSLOG_LEVEL_DEBUG2:
267
	case SYSLOG_LEVEL_DEBUG3:
268
		log_level = level;
269
		break;
270
	default:
271
		fprintf(stderr, "Unrecognized internal syslog level code %d\n",
260
		fprintf(stderr, "Unrecognized internal syslog level code %d\n",
272
		    (int) level);
261
		    (int) level);
273
		exit(1);
262
		exit(1);
Lines 340-352 log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr) Link Here
340
#endif
329
#endif
341
}
330
}
342
331
343
void
332
int
344
log_change_level(LogLevel new_log_level)
333
log_change_level(LogLevel new_log_level)
345
{
334
{
346
	/* no-op if log_init has not been called */
335
	/* no-op if log_init has not been called */
347
	if (argv0 == NULL)
336
	if (argv0 == NULL)
348
		return;
337
		return 0;
349
	log_init(argv0, new_log_level, log_facility, log_on_stderr);
338
339
	switch (new_log_level) {
340
	case SYSLOG_LEVEL_QUIET:
341
	case SYSLOG_LEVEL_FATAL:
342
	case SYSLOG_LEVEL_ERROR:
343
	case SYSLOG_LEVEL_INFO:
344
	case SYSLOG_LEVEL_VERBOSE:
345
	case SYSLOG_LEVEL_DEBUG1:
346
	case SYSLOG_LEVEL_DEBUG2:
347
	case SYSLOG_LEVEL_DEBUG3:
348
		log_level = new_log_level;
349
		return 0;
350
	default:
351
		return -1;
352
	}
350
}
353
}
351
354
352
int
355
int
(-)a/log.h (-1 / +1 lines)
Lines 49-55 typedef enum { Link Here
49
typedef void (log_handler_fn)(LogLevel, const char *, void *);
49
typedef void (log_handler_fn)(LogLevel, const char *, void *);
50
50
51
void     log_init(char *, LogLevel, SyslogFacility, int);
51
void     log_init(char *, LogLevel, SyslogFacility, int);
52
void     log_change_level(LogLevel);
52
int      log_change_level(LogLevel);
53
int      log_is_on_stderr(void);
53
int      log_is_on_stderr(void);
54
void     log_redirect_stderr_to(const char *);
54
void     log_redirect_stderr_to(const char *);
55
55
(-)a/monitor_wrap.c (+1 lines)
Lines 295-300 out: Link Here
295
#undef M_CP_STRARRAYOPT
295
#undef M_CP_STRARRAYOPT
296
296
297
	copy_set_server_options(&options, newopts, 1);
297
	copy_set_server_options(&options, newopts, 1);
298
	log_change_level(options.log_level);
298
	free(newopts);
299
	free(newopts);
299
300
300
	buffer_free(&m);
301
	buffer_free(&m);
(-)a/servconf.c (-2 / +3 lines)
Lines 449-455 static struct { Link Here
449
	{ "keyregenerationinterval", sDeprecated, SSHCFG_GLOBAL },
449
	{ "keyregenerationinterval", sDeprecated, SSHCFG_GLOBAL },
450
	{ "permitrootlogin", sPermitRootLogin, SSHCFG_ALL },
450
	{ "permitrootlogin", sPermitRootLogin, SSHCFG_ALL },
451
	{ "syslogfacility", sLogFacility, SSHCFG_GLOBAL },
451
	{ "syslogfacility", sLogFacility, SSHCFG_GLOBAL },
452
	{ "loglevel", sLogLevel, SSHCFG_GLOBAL },
452
	{ "loglevel", sLogLevel, SSHCFG_ALL },
453
	{ "rhostsauthentication", sDeprecated, SSHCFG_GLOBAL },
453
	{ "rhostsauthentication", sDeprecated, SSHCFG_GLOBAL },
454
	{ "rhostsrsaauthentication", sDeprecated, SSHCFG_ALL },
454
	{ "rhostsrsaauthentication", sDeprecated, SSHCFG_ALL },
455
	{ "hostbasedauthentication", sHostbasedAuthentication, SSHCFG_ALL },
455
	{ "hostbasedauthentication", sHostbasedAuthentication, SSHCFG_ALL },
Lines 1345-1351 process_server_config_line(ServerOptions *options, char *line, Link Here
1345
		if (value == SYSLOG_LEVEL_NOT_SET)
1345
		if (value == SYSLOG_LEVEL_NOT_SET)
1346
			fatal("%.200s line %d: unsupported log level '%s'",
1346
			fatal("%.200s line %d: unsupported log level '%s'",
1347
			    filename, linenum, arg ? arg : "<NONE>");
1347
			    filename, linenum, arg ? arg : "<NONE>");
1348
		if (*log_level_ptr == -1)
1348
		if (*activep && *log_level_ptr == -1)
1349
			*log_level_ptr = (LogLevel) value;
1349
			*log_level_ptr = (LogLevel) value;
1350
		break;
1350
		break;
1351
1351
Lines 1989-1994 copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth) Link Here
1989
	M_CP_INTOPT(ip_qos_bulk);
1989
	M_CP_INTOPT(ip_qos_bulk);
1990
	M_CP_INTOPT(rekey_limit);
1990
	M_CP_INTOPT(rekey_limit);
1991
	M_CP_INTOPT(rekey_interval);
1991
	M_CP_INTOPT(rekey_interval);
1992
	M_CP_INTOPT(log_level);
1992
1993
1993
	/*
1994
	/*
1994
	 * The bind_mask is a mode_t that may be unsigned, so we can't use
1995
	 * The bind_mask is a mode_t that may be unsigned, so we can't use
(-)a/sshd_config.5 (+1 lines)
Lines 1066-1071 Available keywords are Link Here
1066
.Cm IPQoS ,
1066
.Cm IPQoS ,
1067
.Cm KbdInteractiveAuthentication ,
1067
.Cm KbdInteractiveAuthentication ,
1068
.Cm KerberosAuthentication ,
1068
.Cm KerberosAuthentication ,
1069
.Cm LogLevel ,
1069
.Cm MaxAuthTries ,
1070
.Cm MaxAuthTries ,
1070
.Cm MaxSessions ,
1071
.Cm MaxSessions ,
1071
.Cm PasswordAuthentication ,
1072
.Cm PasswordAuthentication ,

Return to bug 2717