aboutsummaryrefslogtreecommitdiff
path: root/networking/fakeidentd.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-09-06 18:36:50 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-09-06 18:36:50 +0000
commit3538b9a8822421b7c8596a33a917dcf2f99c92b7 (patch)
tree768c23fe79bb81583de7376a4d744632d888d303 /networking/fakeidentd.c
parent5d725462d44268f9a86030daaa6f6396d32f796c (diff)
downloadbusybox-3538b9a8822421b7c8596a33a917dcf2f99c92b7.tar.gz
Implement optional syslog logging using ordinary
bb_xx_msg calls, and convert networking/* to it. The rest of bbox will be converted gradually.
Diffstat (limited to 'networking/fakeidentd.c')
-rw-r--r--networking/fakeidentd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/networking/fakeidentd.c b/networking/fakeidentd.c
index 29e09d13e..2d690edba 100644
--- a/networking/fakeidentd.c
+++ b/networking/fakeidentd.c
@@ -157,7 +157,6 @@ static int godaemon(void)
setsid();
- openlog(bb_applet_name, 0, LOG_DAEMON);
return 1;
}
@@ -219,6 +218,10 @@ static int checkInput(char *buf, int len, int l)
int fakeidentd_main(int argc, char **argv)
{
+ /* This applet is an inetd-style daemon */
+ openlog(bb_applet_name, 0, LOG_DAEMON);
+ logmode = LOGMODE_SYSLOG;
+
memset(conns, 0, sizeof(conns));
memset(&G, 0, sizeof(G));
FD_ZERO(&G.readfds);
@@ -286,7 +289,7 @@ deleteconn:
if (s < 0) {
if (errno != EINTR) /* EINTR */
- syslog(LOG_ERR, "accept: %s", strerror(errno));
+ bb_perror_msg("accept");
} else {
if (G.conncnt == MAXCONNS)
i = closeOldest();