summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjwd <jwd@FreeBSD.org>2002-05-26 04:43:26 +0000
committerjwd <jwd@FreeBSD.org>2002-05-26 04:43:26 +0000
commitda8203a816e7d32a08b1a05af847a87122447654 (patch)
tree8ebbff48eb96d94d3f07cb3bcf0565d635c31a46 /usr.sbin
parentc4089dd4792c3315f0d31ea9b52973d244246322 (diff)
downloadFreeBSD-src-da8203a816e7d32a08b1a05af847a87122447654.zip
FreeBSD-src-da8203a816e7d32a08b1a05af847a87122447654.tar.gz
Log invalid config entries. Make the -d option actually log to
the terminal(-d fix from dwmalone). Approved by: dwmalone MFC after: 2 weeks
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/inetd/inetd.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c
index 57eae26..ee6e8b6 100644
--- a/usr.sbin/inetd/inetd.c
+++ b/usr.sbin/inetd/inetd.c
@@ -317,7 +317,7 @@ main(argc, argv)
const char *servname;
int error;
- openlog("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
+ openlog("inetd", LOG_PID | LOG_NOWAIT | LOG_PERROR, LOG_DAEMON);
while ((ch = getopt(argc, argv, "dlwWR:a:c:C:p:")) != -1)
switch(ch) {
@@ -434,6 +434,9 @@ main(argc, argv)
if (daemon(0, 0) < 0) {
syslog(LOG_WARNING, "daemon(0,0) failed: %m");
}
+ /* From now on we don't want syslog messages going to stderr. */
+ closelog();
+ openlog("inetd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
/*
* In case somebody has started inetd manually, we need to
* clear the logname, so that old servers run as root do not
@@ -1613,7 +1616,7 @@ more:
}
if (strncmp(sep->se_proto, "rpc/", 4) == 0) {
if (no_v4bind != 0) {
- syslog(LOG_INFO, "IPv4 bind is ignored for %s",
+ syslog(LOG_NOTICE, "IPv4 bind is ignored for %s",
sep->se_service);
freeconfig(sep);
goto more;
@@ -1654,7 +1657,7 @@ more:
#ifdef INET6
if (sep->se_proto[strlen(sep->se_proto) - 1] == '6') {
if (no_v6bind != 0) {
- syslog(LOG_INFO, "IPv6 bind is ignored for %s",
+ syslog(LOG_NOTICE, "IPv6 bind is ignored for %s",
sep->se_service);
freeconfig(sep);
goto more;
@@ -1686,7 +1689,7 @@ more:
#endif
{ /* default to v4 bind if not v6 bind */
if (no_v4bind != 0) {
- syslog(LOG_INFO, "IPv4 bind is ignored for %s",
+ syslog(LOG_NOTICE, "IPv4 bind is ignored for %s",
sep->se_service);
freeconfig(sep);
goto more;
OpenPOWER on IntegriCloud