diff -urpN busybox.4/libbb/setup_environment.c busybox.5/libbb/setup_environment.c
--- busybox.4/libbb/setup_environment.c	2006-09-04 01:25:26.000000000 +0200
+++ busybox.5/libbb/setup_environment.c	2006-09-04 20:08:16.000000000 +0200
@@ -60,10 +60,7 @@ void setup_environment ( const char *she
 		 * Some systems default to HOME=/
 		 */
 		if ( chdir ( pw-> pw_dir )) {
-			if ( chdir ( "/" )) {
-				syslog ( LOG_WARNING, "unable to cd to %s' for user %s'\n", pw-> pw_dir, pw-> pw_name );
-				bb_error_msg_and_die ( "cannot cd to home directory or /" );
-			}
+			xchdir ( "/" );
 			fputs ( "warning: cannot change to home directory\n", stderr );
 		}
 
diff -urpN busybox.4/libbb/vinfo_msg.c busybox.5/libbb/vinfo_msg.c
--- busybox.4/libbb/vinfo_msg.c	2006-09-04 01:25:26.000000000 +0200
+++ busybox.5/libbb/vinfo_msg.c	2006-09-04 20:27:31.000000000 +0200
@@ -16,10 +16,15 @@
 
 void bb_vinfo_msg(const char *s, va_list p)
 {
+	/* va_copy is used because it is not portable
+	 * to use va_list p twice */
+	va_list p2;
+	va_copy(p2, p);
 	if (bb_logmode & LOGMODE_STDIO) {
 		vprintf(s, p);
 		putchar('\n');
 	}
 	if (bb_logmode & LOGMODE_SYSLOG)
-		vsyslog(LOG_INFO, s, p);
+		vsyslog(LOG_INFO, s, p2);
+	va_end(p2);
 }
diff -urpN busybox.4/networking/fakeidentd.c busybox.5/networking/fakeidentd.c
--- busybox.4/networking/fakeidentd.c	2006-09-04 01:25:26.000000000 +0200
+++ busybox.5/networking/fakeidentd.c	2006-09-04 20:08:16.000000000 +0200
@@ -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 fakeidentd_main(int argc, char **argv)
 {
+	/* This applet is an inetd-style daemon */
+	openlog(bb_applet_name, 0, LOG_DAEMON);
+	bb_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();
diff -urpN busybox.4/networking/telnetd.c busybox.5/networking/telnetd.c
--- busybox.4/networking/telnetd.c	2006-09-04 01:25:26.000000000 +0200
+++ busybox.5/networking/telnetd.c	2006-09-04 20:08:16.000000000 +0200
@@ -263,7 +263,7 @@ make_new_session(int sockfd)
 	pty = getpty(tty_name);
 
 	if (pty < 0) {
-		syslog(LOG_ERR, "All terminals in use!");
+		bb_error_msg("all terminals in use");
 		return 0;
 	}
 
@@ -285,7 +285,7 @@ make_new_session(int sockfd)
 	send_iac(ts, WILL, TELOPT_SGA);
 
 	if ((pid = fork()) < 0) {
-		syslog(LOG_ERR, "Could not fork");
+		bb_perror_msg("fork");
 	}
 	if (pid == 0) {
 		/* In child, open the child's side of the tty.  */
@@ -296,10 +296,7 @@ make_new_session(int sockfd)
 		/* make new process group */
 		setsid();
 
-		if (open(tty_name, O_RDWR /*| O_NOCTTY*/) < 0) {
-			syslog(LOG_ERR, "Could not open tty");
-			exit(1);
-		}
+		xopen(tty_name, O_RDWR /*| O_NOCTTY*/);
 		dup(0);
 		dup(0);
 
@@ -323,8 +320,7 @@ make_new_session(int sockfd)
 		execv(loginpath, (char *const *)argv_init);
 
 		/* NOT REACHED */
-		syslog(LOG_ERR, "execv error");
-		exit(1);
+		bb_perror_msg_and_die("execv");
 	}
 
 	ts->shell_pid = pid;
@@ -390,6 +386,14 @@ telnetd_main(int argc, char **argv)
 	loginpath = DEFAULT_SHELL;
 #endif
 
+	/* We use inetd-style operation unconditionally
+	 * (no --foreground option), user most likely will
+	 * look into syslog for all errors, even early ones.
+	 * Direct all output to syslog at once.
+	 */
+	openlog(bb_applet_name, 0, LOG_USER);
+	bb_logmode = LOGMODE_SYSLOG;
+
 	for (;;) {
 		c = getopt( argc, argv, options);
 		if (c == EOF) break;
@@ -415,13 +419,11 @@ telnetd_main(int argc, char **argv)
 	}
 
 	if (access(loginpath, X_OK) < 0) {
-		bb_error_msg_and_die ("'%s' unavailable.", loginpath);
+		bb_error_msg_and_die("'%s' unavailable", loginpath);
 	}
 
 	argv_init[0] = loginpath;
 
-	openlog(bb_applet_name, 0, LOG_USER);
-
 #ifdef CONFIG_FEATURE_TELNETD_INETD
 	maxfd = 1;
 	sessions = make_new_session();
diff -urpN busybox.4/networking/zcip.c busybox.5/networking/zcip.c
--- busybox.4/networking/zcip.c	2006-09-04 19:39:28.000000000 +0200
+++ busybox.5/networking/zcip.c	2006-09-04 20:26:27.000000000 +0200
@@ -274,6 +274,7 @@ int zcip_main(int argc, char *argv[])
 
 	// daemonize now; don't delay system startup
 	if (!FOREGROUND) {
+		setsid();
 		xdaemon(0, 0);
 		bb_info_msg("start, interface %s", intf);
 	}
