[Mimedefang] Re: Useful patch ? [PATCH] tcpwrappers support for mimedefang

Martin Blapp mb at imp.ch
Mon Jul 19 01:51:29 EDT 2004


There was a bug in this patch: (mfclose(ctx);) is missing
in the tmpfail case.

Martin

+	sd = ctx->ctx_sd;
+	request_init(&req, RQ_DAEMON, "mimedefang", RQ_FILE, sd, 0);
+        pthread_mutex_lock(&AllowMutex);
+	fromhost(&req);
+	if (!hosts_access(&req)) {
+		pthread_mutex_unlock(&AllowMutex);
+		syslog(LOG_WARNING, "Access denied by tcp wrapper");
++		mfclose(ctx);
+		return SMFIS_TEMPFAIL;
+	}
+    	pthread_mutex_unlock(&AllowMutex);
+    }
+#endif


More information about the MIMEDefang mailing list