openbsd-ports/security/clamav/patches/patch-clamd_clamd_c
mbalmer fa0e2fef8f Update ClamAV to version 0.93, which fixes mostly security problems, at
least one highly critical (remote). See http://secunia.com/advisories/29000
for details.

Thanks to kurt@ for helping analyzing the threaded code issues.
2008-04-16 19:46:01 +00:00

23 lines
779 B
Plaintext

$OpenBSD: patch-clamd_clamd_c,v 1.1 2008/04/16 19:46:01 mbalmer Exp $
--- clamd/clamd.c.orig Thu Mar 6 19:41:03 2008
+++ clamd/clamd.c Mon Apr 14 21:54:34 2008
@@ -374,12 +374,18 @@ int main(int argc, char **argv)
/* fork into background */
if(!cfgopt(copt, "Foreground")->enabled) {
+ for (ret = 0; ret < nlsockets; ret++)
+ fcntl(lsockets[ret], F_SETFL, fcntl(lsockets[ret], F_GETFL)
+ | O_NONBLOCK);
if(daemonize() == -1) {
logg("!daemonize() failed\n");
logg_close();
freecfg(copt);
return 1;
}
+ for (ret = 0; ret < nlsockets; ret++)
+ fcntl(lsockets[ret], F_SETFL, fcntl(lsockets[ret], F_GETFL)
+ & ~O_NONBLOCK);
if(!debug_mode)
if(chdir("/") == -1)
logg("^Can't change current working directory to root\n");