Group :: Sistema/Servidores
RPM: courier-imap
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
Patch: courier-imap-3.0.8-alt-tcpd.patch
Download
Download
diff -ruN courier-imap-3.0.8.20041120.orig/tcpd/couriertcpd.1 courier-imap-3.0.8.20041120/tcpd/couriertcpd.1
--- courier-imap-3.0.8.20041120.orig/tcpd/couriertcpd.1 2004-10-21 11:57:37 +1100
+++ courier-imap-3.0.8.20041120/tcpd/couriertcpd.1 2004-11-24 12:10:52 +1000
@@ -12,13 +12,13 @@
couriertcpd \- Courier TCP server daemon
.SH SYNOPSIS
-\fBcouriertcpd\fR \fB-pid=\fIpidfile\fB\fR [ \fB\fIoption\fB\fR\fI ...\fR ] \fB\fIlist\fB\fR \fB\fIprogram\fB\fR \fB\fIarg\fB\fR\fI ...\fR
+\fBcouriertcpd\fR \fB-pid=\fIpidfile\fB\fR \fB-lock=\fIlockfile\fB\fR [ \fB\fIoption\fB\fR\fI ...\fR ] \fB\fIlist\fB\fR \fB\fIprogram\fB\fR \fB\fIarg\fB\fR\fI ...\fR
-\fBcouriertcpd\fR \fB-pid=\fIpidfile\fB\fR \fB-stop\fR
+\fBcouriertcpd\fR \fB-pid=\fIpidfile\fB\fR \fB-lock=\fIlockfile\fB\fR \fB-stop\fR
-\fBcouriertcpd\fR \fB-pid=\fIpidfile\fB\fR \fB-restart\fR
+\fBcouriertcpd\fR \fB-pid=\fIpidfile\fB\fR \fB-lock=\fIlockfile\fB\fR \fB-restart\fR
.SH "DESCRIPTION"
.PP
@@ -148,6 +148,10 @@
file where \fBcouriertcpd\fR saves its process ID, usually
somewhere in \fI/var/run\fR\&.
.TP
+\fB-lock=\fIfilename\fB\fR
+\fBREQUIRED OPTION\fR: name of a lock file, usually
+somewhere in \fI/var/lock\fR.
+.TP
\fB-restart\fR
Send a SIGHUP to an existing \fBcouriertcpd\fR process. Specify
the same \fB-pid\fR
diff -ruN courier-imap-3.0.8.20041120.orig/tcpd/tcpd.c courier-imap-3.0.8.20041120/tcpd/tcpd.c
--- courier-imap-3.0.8.20041120.orig/tcpd/tcpd.c 2004-07-27 12:37:31 +1100
+++ courier-imap-3.0.8.20041120/tcpd/tcpd.c 2004-11-24 12:10:52 +1000
@@ -69,6 +69,7 @@
static const char *stderrarg=0;
static const char *stderrloggerarg=0;
static const char *pidarg=0;
+static const char *lockarg=0;
static const char *proxyarg=0;
static const char *restartarg=0;
static const char *stoparg=0;
@@ -92,6 +93,7 @@
{"nodnslookup", &nodnslookup},
{"noidentlookup", &noidentlookup},
{"pid", &pidarg},
+ {"lock", &lockarg},
{"restart", &restartarg},
{"stderr", &stderrarg},
{"stderrlogger", &stderrloggerarg},
@@ -519,13 +521,19 @@
return (-1);
}
- lockfilename=malloc(strlen(pidarg)+sizeof(".lock"));
+ if (lockarg == 0)
+ {
+ fprintf(stderr, "%s: -lock argument is required.\n", argv[0]);
+ return (-1);
+ }
+
+ lockfilename=malloc(strlen(lockarg));
if (!lockfilename)
{
perror("malloc");
return (-1);
}
- strcat(strcpy(lockfilename, pidarg), ".lock");
+ strcpy(lockfilename, lockarg);
if (stoparg)
{