diff options
author | Eric Andersen | 2004-06-22 10:07:17 +0000 |
---|---|---|
committer | Eric Andersen | 2004-06-22 10:07:17 +0000 |
commit | 36adca81f54d9479a440865acd29fc2fbcfbaf1d (patch) | |
tree | 6ad08a59a2a1cd6a8c24fd9683c5f8df32f5054c /networking | |
parent | 78a5ddeff0352ee7a4f6a02333c07657f0b4ccc0 (diff) | |
download | busybox-36adca81f54d9479a440865acd29fc2fbcfbaf1d.zip busybox-36adca81f54d9479a440865acd29fc2fbcfbaf1d.tar.gz |
Patch from Bastian Blank:
On Sat, Jun 19, 2004 at 10:57:37PM +0200, Bastian Blank wrote:
> The following patch changes klogd to use openlog/syslog themself
> instead of calling syslog_msg which always calls the triple
> openlog/syslog/closelog.
Updated patch: get rid of syslog_msg entirely. Request from Erik Andersen.
Bastian
Diffstat (limited to 'networking')
-rw-r--r-- | networking/telnetd.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/networking/telnetd.c b/networking/telnetd.c index efb2988..724c7cf 100644 --- a/networking/telnetd.c +++ b/networking/telnetd.c @@ -1,4 +1,4 @@ -/* $Id: telnetd.c,v 1.11 2004/03/15 08:28:53 andersen Exp $ +/* $Id: telnetd.c,v 1.12 2004/06/22 10:07:17 andersen Exp $ * * Simple telnet server * Bjorn Wesen, Axis Communications AB (bjornw@axis.com) @@ -269,7 +269,7 @@ make_new_session(int sockfd) pty = getpty(tty_name); if (pty < 0) { - syslog_msg(LOG_USER, LOG_ERR, "All network ports in use!"); + syslog(LOG_ERR, "All network ports in use!"); return 0; } @@ -292,7 +292,7 @@ make_new_session(int sockfd) if ((pid = fork()) < 0) { - syslog_msg(LOG_USER, LOG_ERR, "Can`t forking"); + syslog(LOG_ERR, "Can`t forking"); } if (pid == 0) { /* In child, open the child's side of the tty. */ @@ -304,7 +304,7 @@ make_new_session(int sockfd) setsid(); if (open(tty_name, O_RDWR /*| O_NOCTTY*/) < 0) { - syslog_msg(LOG_USER, LOG_ERR, "Could not open tty"); + syslog(LOG_ERR, "Could not open tty"); exit(1); } dup(0); @@ -330,7 +330,7 @@ make_new_session(int sockfd) execv(loginpath, (char *const *)argv_init); /* NOT REACHED */ - syslog_msg(LOG_USER, LOG_ERR, "execv error"); + syslog(LOG_ERR, "execv error"); exit(1); } @@ -422,6 +422,8 @@ telnetd_main(int argc, char **argv) argv_init[0] = loginpath; + openlog(bb_applet_name, 0, LOG_USER); + #ifdef CONFIG_FEATURE_TELNETD_INETD maxfd = 1; sessions = make_new_session(); |