fa0e2fef8f
least one highly critical (remote). See http://secunia.com/advisories/29000 for details. Thanks to kurt@ for helping analyzing the threaded code issues.
23 lines
779 B
Plaintext
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");
|