Fixes to log.c ---

1)  Fixes a lint flame.
2)  Cmd_line is now allocated enough space
3)  Cmd_line is truncated early enough so that syslog won't lose.

*** log.c.orig	Wed Aug 19 01:44:07 1987
--- log.c	Fri Nov 11 21:01:42 1988
***************
*** 17,23 ****
  	char wd[MAXPATHLEN];		/* 1024 */
  	char *buffp;
  	int i;
- 	int tty_iocbp;
  	char *tty_id;
  	char *cmd_string;
  	int cmd_len = 0;
--- 17,22 ----
***************
*** 33,39 ****
  	endpwent();
  	tty_id = ttyname(2);
  	if (tty_id == NULL) tty_id = "no tty";
! 	cmd_len += strlen(u_pwd->pw_name) + strlen(wd) + 6;
  	cmd_string = malloc(cmd_len);
  	if (cmd_string == NULL) {
  		perror("malloc");
--- 32,38 ----
  	endpwent();
  	tty_id = ttyname(2);
  	if (tty_id == NULL) tty_id = "no tty";
! 	cmd_len += strlen(u_pwd->pw_name) + strlen(wd) + strlen(tty_id) + 6;
  	cmd_string = malloc(cmd_len);
  	if (cmd_string == NULL) {
  		perror("malloc");
***************
*** 49,55 ****
  	}
  
  	/* syslog() can't handle lines over 1024 chars long... */
! 	if (cmd_len > 1000)
! 	     cmd_string[1000] = '\0';
  	syslog(LOG_INFO, "%s", cmd_string);
  }
--- 48,55 ----
  	}
  
  	/* syslog() can't handle lines over 1024 chars long... */
! 	/* This includes ~30 characters of syslog header */
! 	if (cmd_len > 950)
! 	     cmd_string[950] = '\0'; /* Let's be on the safe side... */
  	syslog(LOG_INFO, "%s", cmd_string);
  }
