Common subdirectories: ../simscan-1.3.1.orig/cdb/CVS and cdb/CVS Common subdirectories: ../simscan-1.3.1.orig/contrib/CVS and contrib/CVS --- ../simscan-1.3.1.orig/simscan.c 2006-11-09 19:16:56.000000000 -0500 +++ simscan.c 2007-05-03 15:11:48.947823000 -0400 @@ -56,8 +56,6 @@ #define EXIT_54 54 /* Unable to read the message or envelope. */ #define EXIT_91 91 /* Envelope format error. */ - - /* 51 Out of memory. 52 Timeout. @@ -81,6 +79,13 @@ 91 Envelope format error. */ +#if HAVE_STRSEP!=1 +char *strsep (char **pp, char *delim); /* solaris -jkister 20070503 */ +#endif + +#ifndef INADDR_NONE +#define INADDR_NONE ((unsigned long) -1) /* solaris -jkister 20070503 */ +#endif #ifdef QUARANTINEDIR void quarantine_msg(char *message_name); @@ -225,6 +230,10 @@ #ifdef ENABLE_RECEIVED char runned_scanners[MAX_EMAIL]=""; void add_run_scanner(char *key); +struct tm *tm; +static char monthname[12][4] = { + "Jan","Feb","Mar","Apr","May","Jun", + "Jul","Aug","Sep","Oct","Nov","Dec" }; #endif #ifdef ENABLE_REGEX @@ -807,10 +816,13 @@ #ifdef ENABLE_RECEIVED gettimeofday(&stop,(struct timezone *) 0); utime=SECS(stop)-SECS(start); - snprintf(buffer,sizeof(buffer), -"Received: by simscan %s ppid: %d, pid: %d, t: %3.4fs\n scanners:%s\n", - VERSION,getppid(),getpid(),utime, - strlen(runned_scanners) > 0 ? runned_scanners : "none"); + + tm = gmtime(&start.tv_sec); + snprintf(buffer,sizeof(buffer), "Received: (simscan %s ppid %ld pid %d t %.4fs)\n" + " (scanners: %s); %02d %s %04d %02d:%02d:%02d -0000\n", + VERSION, getppid(), getpid(), utime, runned_scanners[0] ? runned_scanners : "none", + tm->tm_mday,monthname[tm->tm_mon],tm->tm_year,tm->tm_hour,tm->tm_min,tm->tm_sec); + if ( write(pim[1], buffer,strlen(buffer)) == -1 ) { if ( DebugFlag > 0 ) { fprintf(stderr, "simscan: error writing received line\n"); --- ../simscan-1.3.1.orig/simscanmk.c 2006-10-10 19:15:17.000000000 -0400 +++ simscanmk.c 2007-05-03 15:09:21.677336000 -0400 @@ -72,10 +72,12 @@ get_options(argc,argv); #ifdef ENABLE_RECEIVED if (buildversions){ - make_version_cdb(); + int xcode = make_version_cdb(); + if (xcode != 0) exit(xcode); } else { #endif - make_cdb(); + int xcode = make_cdb(); + if (xcode != 0) exit(xcode); #ifdef ENABLE_RECEIVED } #endif @@ -369,6 +371,7 @@ static char input[MAX_LINE]; uint32 h; + sleep(0); /* some NFS timing crazyness on solaris jkister 20061108 */ if ( (fs = fopen(ClearFile,"r")) == NULL) { printf("Not building simcontrol.cdb file. No %s/simcontrol text file\n",