Skip to content

Commit 40a1104

Browse files
We don't implement dnsmasq's logging to stderr
Signed-off-by: darkexplosiveqwx <101737077+darkexplosiveqwx@users.noreply.github.com>
1 parent 5d41ff7 commit 40a1104

3 files changed

Lines changed: 1 addition & 13 deletions

File tree

src/config/config.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1378,7 +1378,7 @@ void initConfig(struct config *conf)
13781378
conf->files.log.dnsmasq.t = CONF_STRING;
13791379
conf->files.log.dnsmasq.f = FLAG_RESTART_FTL;
13801380
conf->files.log.dnsmasq.d.s = (char*)"/var/log/pihole/pihole.log";
1381-
conf->files.log.dnsmasq.c = validate_filepath_dash;
1381+
conf->files.log.dnsmasq.c = validate_filepath;
13821382

13831383
conf->files.log.webserver.k = "files.log.webserver";
13841384
conf->files.log.webserver.h = "The log file used by the webserver";

src/config/validator.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -339,17 +339,6 @@ bool validate_filepath_empty(union conf_value *val, const char *key, char err[VA
339339
return validate_filepath(val, key, err);
340340
}
341341

342-
// Validate file path (dash allowed), used by files.log.dnsmasq
343-
bool validate_filepath_dash(union conf_value *val, const char *key, char err[VALIDATOR_ERRBUF_LEN])
344-
{
345-
// Dash is allowed, this enabled printing to stderr
346-
if(strlen(val->s) == 1 && val->s[0] == '-')
347-
return true;
348-
349-
// else:
350-
return validate_filepath(val, key, err);
351-
}
352-
353342
// Validate the web server log file path. In addition to the regular file-path
354343
// checks, reject a path inside webserver.paths.webroot: a log file served from
355344
// the web server's document root can be read - and, if the path matches the

src/config/validator.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ bool validate_domain(union conf_value *val, const char *key, char err[VALIDATOR_
2323
bool validate_filepath(union conf_value *val, const char *key, char err[VALIDATOR_ERRBUF_LEN]);
2424
bool validate_filepath_two_slash(union conf_value *val, const char *key, char err[VALIDATOR_ERRBUF_LEN]);
2525
bool validate_filepath_empty(union conf_value *val, const char *key, char err[VALIDATOR_ERRBUF_LEN]);
26-
bool validate_filepath_dash(union conf_value *val, const char *key, char err[VALIDATOR_ERRBUF_LEN]);
2726
bool validate_webserver_logfile(union conf_value *val, const char *key, char err[VALIDATOR_ERRBUF_LEN]);
2827
bool validate_regex_array(union conf_value *val, const char *key, char err[VALIDATOR_ERRBUF_LEN]);
2928
bool validate_dns_revServers(union conf_value *val, const char *key, char err[VALIDATOR_ERRBUF_LEN]);

0 commit comments

Comments
 (0)