FreeBSD Bugzilla – Attachment 56763 Details for
Bug 85706
clamsmtp working only in debug mode (fix included)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.76 KB, created by
alexd
on 2005-09-04 09:20:11 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
alexd
Created:
2005-09-04 09:20:11 UTC
Size:
2.76 KB
patch
obsolete
>diff -urN clamsmtp.orig/Makefile clamsmtp/Makefile >--- clamsmtp.orig/Makefile Sun Sep 4 03:17:22 2005 >+++ clamsmtp/Makefile Sun Sep 4 11:56:09 2005 >@@ -7,7 +7,7 @@ > > PORTNAME= clamsmtp > PORTVERSION= 1.5 >-PORTREVISION= 1 >+PORTREVISION= 2 > CATEGORIES= security > MASTER_SITES= http://memberwebs.com/nielsen/software/clamsmtp/ > >diff -urN clamsmtp.orig/files/clamsmtpd.sh.tmpl clamsmtp/files/clamsmtpd.sh.tmpl >--- clamsmtp.orig/files/clamsmtpd.sh.tmpl Sun Sep 4 03:17:22 2005 >+++ clamsmtp/files/clamsmtpd.sh.tmpl Sun Sep 4 11:54:45 2005 >@@ -24,9 +24,8 @@ > clamsmtpd_enable=${clamsmtpd_enable-"NO"} > clamsmtpd_conf=${clamsmtpd_conf-"%%PREFIX%%/etc/clamsmtpd.conf"} > clamsmtpd_pid=${clamsmtpd_pid-"%%CLAMAV_PID_DIR%%/clamsmtpd.pid"} > clamsmtpd_debug=${clamsmtpd_debug-"4"} > >-command_args="-f ${clamsmtpd_conf} -p ${clamsmtpd_pid} -d ${clamsmtpd_debug}" >+command_args="-f ${clamsmtpd_conf} -p ${clamsmtpd_pid}" > > pidfile=${clamsmtpd_pid} > >diff -urN clamsmtp.orig/files/patch-smtppass.c clamsmtp/files/patch-smtppass.c >--- clamsmtp.orig/files/patch-smtppass.c Thu Jan 1 03:00:00 1970 >+++ clamsmtp/files/patch-smtppass.c Sun Sep 4 11:53:53 2005 >@@ -0,0 +1,57 @@ >+diff -ur ../clamsmtp-1.5-orig/common/smtppass.c common/smtppass.c >+--- common/smtppass.c Tue Aug 2 01:23:05 2005 >++++ common/smtppass.c Sun Sep 4 11:52:13 2005 >+@@ -275,6 +275,26 @@ >+ >+ sp_messagex(NULL, LOG_DEBUG, "starting up (%s)...", VERSION); >+ >++ /* Drop privileges before daemonizing */ >++ drop_privileges(); >++ >++ /* When set to this we daemonize */ >++ if(g_state.debug_level == -1) >++ { >++ /* Fork a daemon nicely here */ >++ if(daemon(0, 0) == -1) >++ { >++ sp_message(NULL, LOG_ERR, "couldn't run as daemon"); >++ exit(1); >++ } >++ >++ sp_messagex(NULL, LOG_DEBUG, "running as a daemon"); >++ g_state.daemonized = 1; >++ >++ /* Open the system log */ >++ openlog(g_state.name, 0, LOG_MAIL); >++ } >++ >+ /* Create the socket */ >+ sock = socket(SANY_TYPE(g_state.listenaddr), SOCK_STREAM, 0); >+ if(sock < 0) >+@@ -297,26 +317,6 @@ >+ exit(1); >+ } >+ >+- /* Drop privileges before daemonizing */ >+- drop_privileges(); >+- >+- /* When set to this we daemonize */ >+- if(g_state.debug_level == -1) >+- { >+- /* Fork a daemon nicely here */ >+- if(daemon(0, 0) == -1) >+- { >+- sp_message(NULL, LOG_ERR, "couldn't run as daemon"); >+- exit(1); >+- } >+- >+- sp_messagex(NULL, LOG_DEBUG, "running as a daemon"); >+- g_state.daemonized = 1; >+- >+- /* Open the system log */ >+- openlog(g_state.name, 0, LOG_MAIL); >+- } >+- >+ sp_messagex(NULL, LOG_DEBUG, "created socket: %s", g_state.listenname); >+ >+ /* Handle some signals */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 85706
: 56763