[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-167-g4319a8f

Stephen Gran steve at lobefin.net
Fri Jun 12 19:13:06 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 4319a8f4be2091d1e5ecd86c6af36cb34bd466a6
Merge: e47f3faa3ea4733c0e0cca71452a757c096f4893 7980dd35beeaa9f7217c8bbfa563b7ebe5de5299
Author: Stephen Gran <steve at lobefin.net>
Date:   Fri Jun 12 20:10:36 2009 +0100

    Merge branch 'debian/unstable' of ssh://git.debian.org/git/pkg-clamav/clamav into debian/unstable
    
    Conflicts:
    	debian/po/eu.po
    
    Signed-off-by: Stephen Gran <steve at lobefin.net>

diff --combined clamav-milter/clamav-milter.c
index 9a28c9d,77897c7..3e13e7f
--- a/clamav-milter/clamav-milter.c
+++ b/clamav-milter/clamav-milter.c
@@@ -51,13 -51,12 +51,13 @@@ int main(int argc, char **argv) 
      char *my_socket, *pt;
      const struct optstruct *opt;
      struct optstruct *opts;
 +    time_t currtime;
      int ret;
  
      memset(&descr, 0, sizeof(struct smfiDesc));
      descr.xxfi_name = "ClamAV";			/* filter name */
      descr.xxfi_version = SMFI_VERSION;		/* milter version */
 -    descr.xxfi_flags = SMFIF_CHGHDRS|SMFIF_QUARANTINE; /* flags */
 +    descr.xxfi_flags = SMFIF_QUARANTINE;	/* flags */
      descr.xxfi_connect = clamfi_connect;	/* connection info filter */
      descr.xxfi_envfrom = clamfi_envfrom;	/* envelope sender filter */
      descr.xxfi_envrcpt = clamfi_envrcpt;	/* envelope recipient filter */
@@@ -161,6 -160,7 +161,6 @@@
      logg_verbose = mprintf_verbose = optget(opts, "LogVerbose")->enabled;
  
      if((opt = optget(opts, "LogFile"))->enabled) {
 -	time_t currtime;
  	logg_file = opt->strarg;
  	if(strlen(logg_file) < 2 || logg_file[0] != '/') {
  	    fprintf(stderr, "ERROR: LogFile requires full path.\n");
@@@ -168,6 -168,13 +168,6 @@@
  	    optfree(opts);
  	    return 1;
  	}
 -	time(&currtime);
 -	if(logg("#+++ Started at %s", ctime(&currtime))) {
 -	    fprintf(stderr, "ERROR: Can't initialize the internal logger\n");
 -	    logg_close();
 -	    optfree(opts);
 -	    return 1;
 -	}
      } else
  	logg_file = NULL;
  
@@@ -188,13 -195,6 +188,13 @@@
      }
  #endif
  
 +    time(&currtime);
 +    if(logg("#+++ Started at %s", ctime(&currtime))) {
 +	fprintf(stderr, "ERROR: Can't initialize the internal logger\n");
 +	logg_close();
 +	optfree(opts);
 +	return 1;
 +    }
      if((opt = optget(opts, "TemporaryDirectory"))->enabled)
  	tempdir = opt->strarg;
  
@@@ -219,8 -219,7 +219,8 @@@
  	return 1;
      }
  
 -    if(optget(opts, "AddHeader")->enabled) {
 +    pt = optget(opts, "AddHeader")->strarg;
 +    if(strcasecmp(pt, "No")) {
  	char myname[255];
  
  	if(!gethostname(myname, sizeof(myname))) {
@@@ -231,15 -230,7 +231,15 @@@
  	    snprintf(xvirushdr, sizeof(xvirushdr), "clamav-milter %s", get_version());
  	    xvirushdr[sizeof(xvirushdr)-1] = '\0';
  	}
 -	addxvirus = 1;
 +
 +	descr.xxfi_flags |= SMFIF_ADDHDRS;
 +
 +	if(strcasecmp(pt, "Add")) { /* Replace or Yes */
 +	    descr.xxfi_flags |= SMFIF_CHGHDRS;
 +	    addxvirus = 1;
 +	} else { /* Add */
 +	    addxvirus = 2;
 +	}
      }
      
      if(!(my_socket = optget(opts, "MilterSocket")->strarg)) {
@@@ -306,7 -297,7 +306,7 @@@
  
      if((opt = optget(opts, "PidFile"))->enabled) {
  	FILE *fd;
- 	mode_t old_umask = umask(0006);
+ 	mode_t old_umask = umask(0002);
  
  	if((fd = fopen(opt->strarg, "w")) == NULL) {
  	    logg("!Can't save PID in file %s\n", opt->strarg);
diff --combined clamd/server-th.c
index 59d62e0,38484f3..eecee09
--- a/clamd/server-th.c
+++ b/clamd/server-th.c
@@@ -313,7 -313,7 +313,7 @@@ struct acceptdata 
      int syncpipe_wake_accept[2];
  };
  
 -#define ACCEPTDATA_INIT { FDS_INIT, FDS_INIT, PTHREAD_COND_INITIALIZER, 0, 0, {-1, -1}, {-1, -1}}
 +#define ACCEPTDATA_INIT(mutex1, mutex2) { FDS_INIT(mutex1), FDS_INIT(mutex2), PTHREAD_COND_INITIALIZER, 0, 0, {-1, -1}, {-1, -1}}
  
  static void *acceptloop_th(void *arg)
  {
@@@ -325,7 -325,7 +325,7 @@@
      int max_queue = data->max_queue;
      int commandtimeout = data->commandtimeout;
  
 -    pthread_mutex_lock(&fds->buf_mutex);
 +    pthread_mutex_lock(fds->buf_mutex);
      for (;;) {
  	/* Block waiting for data to become available for reading */
  	int new_sd = fds_poll_recv(fds, -1, 0);
@@@ -367,17 -367,17 +367,17 @@@
  
  	    /* don't accept unlimited number of connections, or
  	     * we'll run out of file descriptors */
 -	    pthread_mutex_lock(&recv_fds->buf_mutex);
 -	    while (recv_fds->nfds > max_queue) {
 +	    pthread_mutex_lock(recv_fds->buf_mutex);
 +	    while (recv_fds->nfds > (unsigned)max_queue) {
  		pthread_mutex_lock(&exit_mutex);
  		if(progexit) {
  		    pthread_mutex_unlock(&exit_mutex);
  		    break;
  		}
  		pthread_mutex_unlock(&exit_mutex);
 -		pthread_cond_wait(&data->cond_nfds, &recv_fds->buf_mutex);
 +		pthread_cond_wait(&data->cond_nfds, recv_fds->buf_mutex);
  	    }
 -	    pthread_mutex_unlock(&recv_fds->buf_mutex);
 +	    pthread_mutex_unlock(recv_fds->buf_mutex);
  
  	    pthread_mutex_lock(&exit_mutex);
  	    if(progexit) {
@@@ -406,9 -406,9 +406,9 @@@
  		logg("^Nonblocking sockets not available!\n");
  #endif
  		logg("$Got new connection, FD %d\n", new_sd);
 -		pthread_mutex_lock(&recv_fds->buf_mutex);
 +		pthread_mutex_lock(recv_fds->buf_mutex);
  		ret = fds_add(recv_fds, new_sd, 0, commandtimeout);
 -		pthread_mutex_unlock(&recv_fds->buf_mutex);
 +		pthread_mutex_unlock(recv_fds->buf_mutex);
  
  		if (ret == -1) {
  		    logg("!fds_add failed\n");
@@@ -443,7 -443,7 +443,7 @@@
  	}
  	pthread_mutex_unlock(&exit_mutex);
      }
 -    pthread_mutex_unlock(&fds->buf_mutex);
 +    pthread_mutex_unlock(fds->buf_mutex);
  
      for (i=0;i < fds->nfds; i++) {
  	if (fds->buf[i].fd == -1)
@@@ -641,7 -641,7 +641,7 @@@ static int handle_stream(client_conn_t 
  		    pos = 4;
  		    memmove (buf->buffer, &buf->buffer[pos], buf->off - pos);
  		    buf->off -= pos;
 -		    pos = 0;
 +		    *ppos = 0;
  		    buf->id++;
  		    return 0;
  		}
@@@ -651,7 -651,6 +651,7 @@@
  		     (unsigned long)buf->chunksize, (unsigned long)buf->quota);
  		conn_reply_error(conn, "INSTREAM size limit exceeded.");
  		*error = 1;
 +		*ppos = pos;
  		return -1;
  	    } else {
  		buf->quota -= buf->chunksize;
@@@ -699,9 -698,7 +699,9 @@@ int recvloop_th(int *socketds, unsigne
  	unsigned long long val;
  	size_t i, j, rr_last = 0;
  	pthread_t accept_th;
 -	struct acceptdata acceptdata = ACCEPTDATA_INIT;
 +	pthread_mutex_t fds_mutex = PTHREAD_MUTEX_INITIALIZER;
 +	pthread_mutex_t recvfds_mutex = PTHREAD_MUTEX_INITIALIZER;
 +	struct acceptdata acceptdata = ACCEPTDATA_INIT(&fds_mutex, &recvfds_mutex);
  	struct fd_data *fds = &acceptdata.recv_fds;
  	time_t start_time, current_time;
  	unsigned int selfchk;
@@@ -927,7 -924,7 +927,7 @@@
      mainpid = getpid();
      if((opt = optget(opts, "PidFile"))->enabled) {
  	    FILE *fd;
- 	old_umask = umask(0006);
+ 	old_umask = umask(0002);
  	if((fd = fopen(opt->strarg, "w")) == NULL) {
  	    logg("!Can't save PID in file %s\n", opt->strarg);
  	} else {
@@@ -1079,12 -1076,12 +1079,12 @@@
      for(;;) {
  	int new_sd;
  	/* Block waiting for connection on any of the sockets */
 -	pthread_mutex_lock(&fds->buf_mutex);
 +	pthread_mutex_lock(fds->buf_mutex);
  	fds_cleanup(fds);
  	/* signal that we can accept more connections */
 -	if (fds->nfds <= max_queue)
 +	if (fds->nfds <= (unsigned)max_queue)
  	    pthread_cond_signal(&acceptdata.cond_nfds);
 -	new_sd = fds_poll_recv(fds, selfchk ? selfchk : -1, 1);
 +	new_sd = fds_poll_recv(fds, selfchk ? (int)selfchk : -1, 1);
  
  	if (!fds->nfds) {
  	    /* at least the dummy/sync pipe should have remained */
@@@ -1092,7 -1089,7 +1092,7 @@@
  	    pthread_mutex_lock(&exit_mutex);
  	    progexit = 1;
  	    pthread_mutex_unlock(&exit_mutex);
 -	    pthread_mutex_unlock(&fds->buf_mutex);
 +	    pthread_mutex_unlock(fds->buf_mutex);
  	    break;
  	}
  
@@@ -1148,6 -1145,9 +1148,6 @@@
  		   buf->mode != MODE_WAITANCILL) {
  		client_conn_t conn;
  		const unsigned char *cmd = NULL;
 -		size_t cmdlen = 0;
 -		char term = '\n';
 -		int oldstyle = 0;
  		int rc;
  		/* New data available to read on socket. */
  
@@@ -1209,13 -1209,13 +1209,13 @@@
  		buf->fd = -1;
  	    }
  	}
 -	pthread_mutex_unlock(&fds->buf_mutex);
 +	pthread_mutex_unlock(fds->buf_mutex);
  
  	/* handle progexit */
  	pthread_mutex_lock(&exit_mutex);
  	if (progexit) {
  	    pthread_mutex_unlock(&exit_mutex);
 -	    pthread_mutex_lock(&fds->buf_mutex);
 +	    pthread_mutex_lock(fds->buf_mutex);
  	    for (i=0;i < fds->nfds; i++) {
  		if (fds->buf[i].fd == -1)
  		    continue;
@@@ -1227,7 -1227,7 +1227,7 @@@
  		    fds->buf[i].fd = -1;
  		}
  	    }
 -	    pthread_mutex_unlock(&fds->buf_mutex);
 +	    pthread_mutex_unlock(fds->buf_mutex);
  	    break;
  	}
  	pthread_mutex_unlock(&exit_mutex);
diff --combined debian/changelog
index 56c37ee,e13efa5..3a0a807
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,30 -1,32 +1,54 @@@
 +clamav (0.95.2+dfsg-1) unstable; urgency=low
 +
 +  * New upstream version
 +  * Should fix crash on unofficial sigs (closes: #525483)
 +  * Get rid of ridiculous home rolled suid (closes: #522106)
 +  * Freshclam gets 0400 or 0444 config file (closes: #524356)
 +  * Debconf templates and debian/control reviewed by the debian-l10n-
 +    english team as part of the Smith review project. Closes: #523573
 +  * [Debconf translation updates]
 +    - Swedish. Closes: #525044
 +    - Japanese. Closes: #525084
 +    - French. Closes: #526024
 +    - Portuguese. Closes: #526644
 +    - Russian. Closes: #526727
 +    - German. Closes: #526730
 +    - Dutch. Closes: #526745
 +    - Galician. Closes: #527320
 +  * Define status_of_proc in the event that it's not in lsb/init-functions
 +    (closes: #527903)
 +
 + -- Stephen Gran <sgran at debian.org>  Fri, 12 Jun 2009 19:54:36 +0100
 +
  clamav (0.95.1+dfsg-3) unstable; urgency=low
+   
+   [ Michael Tautschnig ]
+   * Unignored make check results on ia64, sparc (alpha still broken): tell
+     electric-fence that the alignment is at least 8 bytes (thanks Aurelien
+     Jarno).
  
+   [ Stephen Gran ]
    * Fix wrong variable useage in milter init script
  
-  -- Stephen Gran <sgran at debian.org>  Fri, 24 Apr 2009 23:21:59 +0100
+   [ Michael Meskes ]
+   * Applied patch assembled by Christian Perrier <bubulle at debian.org>:
+     - Debconf templates and debian/control reviewed by the debian-l10n-
+       english team as part of the Smith review project. Closes: #523573
+     - [Debconf translation updates]
+       - Swedish. Closes: #525044
+       - Japanese. Closes: #525084
+       - French. Closes: #526024
+       - Portuguese. Closes: #526644
+       - Russian. Closes: #526727
+       - German. Closes: #526730
+       - Dutch. Closes: #526745
+       - Galician. Closes: #527320
+       - Basque. Closes: #530854
+   * Made pid files word readable. There doesn't seem to be any sense in not
+     doing this given that the information is available for everyone anyway.
+     Closes: #527901
+ 
+  -- Michael Meskes <meskes at debian.org>  Thu, 28 May 2009 14:10:22 +0200
  
  clamav (0.95.1+dfsg-2) unstable; urgency=low
  
diff --combined freshclam/freshclam.c
index b9cecac,0e2fd3f..0a08350
--- a/freshclam/freshclam.c
+++ b/freshclam/freshclam.c
@@@ -102,7 -102,7 +102,7 @@@ static void writepid(const char *pidfil
  {
  	FILE *fd;
  	int old_umask;
-     old_umask = umask(0006);
+     old_umask = umask(0002);
      if((fd = fopen(pidfile, "w")) == NULL) {
  	logg("!Can't save PID to file %s: %s\n", pidfile, strerror(errno));
      } else {
@@@ -308,7 -308,7 +308,7 @@@ int main(int argc, char **argv
  
      /* initialize some important variables */
  
 -    if(optget(opts, "Debug")->enabled)
 +    if(optget(opts, "Debug")->enabled || optget(opts, "debug")->enabled)
  	cl_debug();
  
      if(optget(opts, "verbose")->enabled)
@@@ -459,7 -459,7 +459,7 @@@
  		    arg = opt->strarg;
  
  		if(arg)
 -		    execute("OnErrorExecute", arg, opt);
 +		    execute("OnErrorExecute", arg, opts);
  
  		arg = NULL;
  	    }

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list