mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
newconf: move SSL/TLS deprecation message from ERROR severity to WARNING severity
This commit is contained in:
parent
7baa37a9ef
commit
d84acbceca
2 changed files with 26 additions and 5 deletions
|
@ -69,6 +69,7 @@ int conf_start_block(char *, char *);
|
||||||
int conf_end_block(struct TopConf *);
|
int conf_end_block(struct TopConf *);
|
||||||
int conf_call_set(struct TopConf *, char *, conf_parm_t *);
|
int conf_call_set(struct TopConf *, char *, conf_parm_t *);
|
||||||
void conf_report_error(const char *, ...);
|
void conf_report_error(const char *, ...);
|
||||||
|
void conf_report_warning(const char *, ...);
|
||||||
void newconf_init(void);
|
void newconf_init(void);
|
||||||
int add_conf_item(const char *topconf, const char *name, int type, void (*func) (void *));
|
int add_conf_item(const char *topconf, const char *name, int type, void (*func) (void *));
|
||||||
int remove_conf_item(const char *topconf, const char *name);
|
int remove_conf_item(const char *topconf, const char *name);
|
||||||
|
|
|
@ -864,7 +864,7 @@ conf_set_listen_port_both(void *data, int ssl)
|
||||||
{
|
{
|
||||||
if (!ssl)
|
if (!ssl)
|
||||||
{
|
{
|
||||||
conf_report_error("listener 'ANY/%d': support for plaintext listeners is being deprecated and may be removed in a future release. "
|
conf_report_warning("listener 'ANY/%d': support for plaintext listeners may be removed in a future release per RFC 7194. "
|
||||||
"It is suggested that users be migrated to SSL/TLS connections.", args->v.number);
|
"It is suggested that users be migrated to SSL/TLS connections.", args->v.number);
|
||||||
}
|
}
|
||||||
add_listener(args->v.number, listener_address, AF_INET, ssl, ssl || yy_defer_accept);
|
add_listener(args->v.number, listener_address, AF_INET, ssl, ssl || yy_defer_accept);
|
||||||
|
@ -884,7 +884,7 @@ conf_set_listen_port_both(void *data, int ssl)
|
||||||
|
|
||||||
if (!ssl)
|
if (!ssl)
|
||||||
{
|
{
|
||||||
conf_report_error("listener '%s/%d': support for plaintext listeners is being deprecated and may be removed in a future release. "
|
conf_report_warning("listener '%s/%d': support for plaintext listeners may be removed in a future release per RFC 7194. "
|
||||||
"It is suggested that users be migrated to SSL/TLS connections.", listener_address, args->v.number);
|
"It is suggested that users be migrated to SSL/TLS connections.", listener_address, args->v.number);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2044,7 +2044,27 @@ conf_report_error(const char *fmt, ...)
|
||||||
}
|
}
|
||||||
|
|
||||||
ierror("\"%s\", line %d: %s", current_file, lineno + 1, msg);
|
ierror("\"%s\", line %d: %s", current_file, lineno + 1, msg);
|
||||||
sendto_realops_snomask(SNO_GENERAL, L_ALL, "\"%s\", line %d: %s", current_file, lineno + 1, msg);
|
sendto_realops_snomask(SNO_GENERAL, L_ALL, "error: \"%s\", line %d: %s", current_file, lineno + 1, msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
conf_report_warning(const char *fmt, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
char msg[IRCD_BUFSIZE + 1] = { 0 };
|
||||||
|
|
||||||
|
va_start(ap, fmt);
|
||||||
|
vsnprintf(msg, IRCD_BUFSIZE, fmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
|
||||||
|
if (testing_conf)
|
||||||
|
{
|
||||||
|
fprintf(stderr, "\"%s\", line %d: %s\n", current_file, lineno + 1, msg);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
iwarn("\"%s\", line %d: %s", current_file, lineno + 1, msg);
|
||||||
|
sendto_realops_snomask(SNO_GENERAL, L_ALL, "warning: \"%s\", line %d: %s", current_file, lineno + 1, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
|
Loading…
Reference in a new issue