Subject: bin/36: crond doesn't log executed commands
To: None <gnats-admin>
From: None <thomas@mathematik.uni-Bremen.de>
List: netbsd-bugs
Date: 12/05/1993 12:50:03
>Number:         36
>Category:       bin
>Synopsis:       crond doesn't log executed commands
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec  5 12:50:02 1993
>Originator:     Thomas Eberhardt
>Organization:
CeVis, University of Bremen, Germany
>Release:        
>Environment:
    	
System: NetBSD ed209 0.9a ED209#0 i386

Machine: i386
>Description:
	crond doesn't log executed commands since the conditional around
	the log_it call is only based on the definition of LOG_FILE instead
	of LOG_FILE or SYSLOG.  Also, if there is neither LOG_FILE nor SYSLOG
	defined calls to log_it are still issued but there is no log_it
	function defined (This doesn't affect us, since SYSLOG is defined
	in config.h).
>How-To-Repeat:
	
>Fix:
	
*** do_command.c-	Sun Nov  7 09:38:26 1993
--- do_command.c	Sun Dec  5 21:18:06 1993
***************
*** 168,174 ****
  		 * the actual user command shell was going to get and the
  		 * PID is part of the log message.
  		 */
! #ifdef LOG_FILE
  		{
  			extern char *mkprints();
  			char *x = mkprints(cmd, strlen(cmd));
--- 168,174 ----
  		 * the actual user command shell was going to get and the
  		 * PID is part of the log message.
  		 */
! #if defined(LOG_FILE) || defined(SYSLOG)
  		{
  			extern char *mkprints();
  			char *x = mkprints(cmd, strlen(cmd));
*** misc.c-	Sun Nov  7 09:38:28 1993
--- misc.c	Sun Dec  5 21:22:00 1993
***************
*** 526,532 ****
  }
  
  
- #if defined(LOG_FILE) || defined(SYSLOG)
  void
  log_it(username, pid, event, detail)
  	char	*username;
--- 526,531 ----
***************
*** 621,627 ****
  	}
  #endif
  }
- #endif /*LOG_FILE || SYSLOG */
  
  
  /* two warnings:
--- 620,625 ----
>Audit-Trail:
>Unformatted:

------------------------------------------------------------------------------