Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!floyd!harpo!seismo!hao!hplabs!sri-unix!Satz@sri-tsc From: Satz%sri-tsc@sri-unix.UUCP Newsgroups: net.unix-wizards Subject: bug in syslog(8) Message-ID: <17443@sri-arpa.UUCP> Date: Sun, 11-Mar-84 21:24:00 EST Article-I.D.: sri-arpa.17443 Posted: Sun Mar 11 21:24:00 1984 Date-Received: Tue, 13-Mar-84 20:36:56 EST Lines: 70 From: Greg SatzDepending on the log message level, syslog(8) might try to wall a message to the list of users in /etc/syslog.conf or to all of the logged in users. Each forked process winds up hanging instead of sending the message. The gethostname() call has the second argument passed as an address instead of by value. Because of some large mailing lists, syslog dumped core unless MAXLINE was increased. My version of syslog has some fixes that allow it to run under 2.9 (4.1a). Drop me a note if you are interested. *** /tmp/,RCSt1013071 Sun Mar 11 17:57:59 1984 --- syslog.c Fri Feb 24 10:36:59 1984 *************** *** 30,36 # define NLOGS 10 /* max number of log files */ # define NSUSERS 10 /* max number of special users */ ! # define MAXLINE 256 /* maximum line length */ # define LOGHOSTNAME 1 /* log hostid on each line */ --- 30,36 ----- # define NLOGS 10 /* max number of log files */ # define NSUSERS 10 /* max number of special users */ ! # define MAXLINE 1024 /* maximum line length */ # define LOGHOSTNAME 1 /* log hostid on each line */ *************** *** 958,964 #ifdef LOG_IPC extern char *gethostname(); char hbuf[32]; - auto int hlen; #endif LOG_IPC /* open the user login file */ --- 969,974 ----- #ifdef LOG_IPC extern char *gethostname(); char hbuf[32]; #endif LOG_IPC /* open the user login file */ *************** *** 1021,1028 strcpy(sbuf, "\r\n\007Broadcast message from "); #ifdef LOG_IPC strcat(sbuf, "syslog@"); ! hlen = sizeof hbuf; ! gethostname(hbuf, &hlen); strcat(sbuf, hbuf); #else LOG_IPC strcat(sbuf, sysname); --- 1036,1042 ----- strcpy(sbuf, "\r\n\007Broadcast message from "); #ifdef LOG_IPC strcat(sbuf, "syslog@"); ! gethostname(hbuf, sizeof hbuf); strcat(sbuf, hbuf); #else LOG_IPC strcat(sbuf, sysname);