--- ./sysklogd/syslogd.c~ 2006-03-30 18:16:06.000000000 +0200 +++ ./sysklogd/syslogd.c 2006-03-30 21:42:34.000000000 +0200 @@ -110,6 +110,8 @@ static int doKernelLog = FALSE; #endif +static int doListenUnix = TRUE; /* we can disable unix socket listening */ + /* Make loging output smaller. */ static bool small = false; @@ -587,6 +589,8 @@ signal(SIGALRM, domark); alarm(MarkInterval); + if (doListenUnix) + { /* Create the syslog file so realpath() can work. */ if (realpath(_PATH_LOG, lfile) != NULL) { unlink(lfile); @@ -612,6 +616,7 @@ if (chmod(lfile, 0666) < 0) { bb_perror_msg_and_die("Could not set permission on " _PATH_LOG); } + } #ifdef CONFIG_FEATURE_SYSLOG_LISTEN_UDP if (doListenUDP) { @@ -654,8 +659,12 @@ for (;;) { int nbfd; FD_ZERO(&fds); - FD_SET(sock_fd, &fds); - nbfd = sock_fd + 1; + if (doListenUnix) { + FD_SET(sock_fd, &fds); + nbfd = sock_fd + 1; + } else + nbfd = 0; + #ifdef CONFIG_FEATURE_SYSLOG_LISTEN_UDP if (doListenUDP) { FD_SET(listen_udp_fd, &fds); @@ -685,7 +694,7 @@ #endif #define tmpbuf bb_common_bufsiz1 - if (FD_ISSET(sock_fd, &fds)) { + if (doListenUnix && FD_ISSET(sock_fd, &fds)) { int i; if ((i = recv(sock_fd, tmpbuf, TMP_BUF_SZ, 0)) > 0) { @@ -786,7 +795,7 @@ char *p; /* do normal option parsing */ - while ((opt = getopt(argc, argv, "m:nO:s:Sb:R:Ll:k:C::")) > 0) { + while ((opt = getopt(argc, argv, "m:nO:s:uSb:R:Ll:k:C::")) > 0) { switch (opt) { case 'm': MarkInterval = atoi(optarg) * 60; @@ -847,7 +856,10 @@ } circular_logging = TRUE; break; #endif + case 'u': + doListenUnix = FALSE; + break; case 'S': small = true; break; --- ./include/usage.h.orig 2006-03-30 21:51:39.000000000 +0200 +++ ./include/usage.h 2006-03-30 21:52:47.000000000 +0200 @@ -2907,6 +2907,7 @@ "\t-n\t\tRun as a foreground process\n" \ "\t-O FILE\t\tUse an alternate log file (default=/var/log/messages)\n" \ "\t-S\t\tMake logging output smaller." \ + "\n\t-u\t\tDo not bind to UNIX socket /dev/log." \ USAGE_ROTATE_LOGFILE( \ "\n\t-s SIZE\t\tMax size (KB) before rotate (default=200KB, 0=off)\n" \ "\t-b NUM\t\tNumber of rotated logs to keep (default=1, max=99, 0=purge)") \