Bug 31736

Summary: kmail lockfile call wrong
Product: [Retired] Red Hat Linux Reporter: Paul Gampe <pgampe>
Component: kdenetworkAssignee: Bernhard Rosenkraenzer <bero>
Status: CLOSED RAWHIDE QA Contact: Aaron Brown <abrown>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: pcormier
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2001-03-13 22:39:23 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Paul Gampe 2001-03-13 22:39:19 UTC
[pgampe@bob SOURCES]$ kmail --version
Qt: 2.2.4
KDE: 2.1
KMail: 1.2	

kmail version 1.2 does not use the new -ml/-mu options to lockfile when 
the procmail locking option is selected.  Subsequently data can be lost.  
The following patch fixes this:

diff -ruN kdenetwork-2.1.orig/kmail/kmfolder.cpp 
kdenetwork-2.1/kmail/kmfolder.cpp
--- kdenetwork-2.1.orig/kmail/kmfolder.cpp      Mon Feb 19 01:30:36 2001
+++ kdenetwork-2.1/kmail/kmfolder.cpp   Mon Mar 12 16:48:11 2001
@@ -338,7 +338,7 @@
       break;
 
     case procmail_lockfile:
-      cmd_str = "lockfile " + location() + ".lock";
+      cmd_str = "lockfile -ml";
       rc = system( cmd_str.latin1() );
       if( rc != 0 )
       {
@@ -437,7 +437,7 @@
       break;
 
     case procmail_lockfile:
-      cmd_str = "rm -f " + location() + ".lock";
+      cmd_str = "lockfile -mu";
       rc = system( cmd_str.latin1() );
       if( mIndexStream )
       {

Comment 1 Bernhard Rosenkraenzer 2001-03-16 11:55:23 UTC
Fixed in 2.1-6