rpms/kdepim/devel kdepim-3.5.4-kde#126975.patch, NONE, 1.1 kdepim.spec, 1.106, 1.107

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Sep 20 12:08:28 UTC 2006


Author: than

Update of /cvs/dist/rpms/kdepim/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv957

Modified Files:
	kdepim.spec 
Added Files:
	kdepim-3.5.4-kde#126975.patch 
Log Message:
fix #126975, Refuse to LOGIN when hasCapability("LOGINDISABLED")



kdepim-3.5.4-kde#126975.patch:
 imap4.cc |   58 +++++++++++++++++++++++++++++++++-------------------------
 1 files changed, 33 insertions(+), 25 deletions(-)

--- NEW FILE kdepim-3.5.4-kde#126975.patch ---
Index: kioslaves/imap4/imap4.cc
===================================================================
--- kioslaves/imap4/imap4.cc	(Revision 586076)
+++ kioslaves/imap4/imap4.cc	(Revision 586077)
@@ -152,7 +152,7 @@
 #ifdef HAVE_LIBSASL2
   sasl_done();
 #endif
-  
+
   return 0;
 }
 
@@ -747,7 +747,7 @@
       }
 
       readBufferLen -= copyLen;
-      if (readBufferLen) 
+      if (readBufferLen)
         memmove(readBuffer, &readBuffer[copyLen], readBufferLen);
       if (buffer[buffer.size() - 1] == '\n') return TRUE;
     }
@@ -945,10 +945,10 @@
   if (type == ITYPE_BOX)
   {
     bool ask = ( aInfo.find( "ASKUSER" ) != -1 );
-    if ( ask && 
+    if ( ask &&
         messageBox(QuestionYesNo,
           i18n("The following folder will be created on the server: %1 "
-               "What do you want to store in this folder?").arg( aBox ), 
+               "What do you want to store in this folder?").arg( aBox ),
           i18n("Create Folder"),
           i18n("&Messages"), i18n("&Subfolders")) == KMessageBox::No )
     {
@@ -1212,7 +1212,7 @@
  * No-op: data = 'N'
  * Namespace: data = 'n'. Result shipped in infoMessage() signal
  *                        The format is: section=namespace=delimiter
- *                        Note that the namespace can be empty               
+ *                        Note that the namespace can be empty
  * Unsubscribe: data = 'U' + URL (KURL)
  * Subscribe: data = 'u' + URL (KURL)
  * Change the status: data = 'S' + URL (KURL) + Flags (QCString)
@@ -1264,7 +1264,7 @@
     break;
   }
   case 'n':
-  { 
+  {
     // namespace in the form "section=namespace=delimiter"
     // entries are separated by ,
     infoMessage( imapNamespaces.join(",") );
@@ -1313,7 +1313,7 @@
     finished();
     break;
   }
-  case 'A': 
+  case 'A':
   {
     // acl
     int cmd;
@@ -1325,7 +1325,7 @@
     }
     break;
   }
-  case 'M': 
+  case 'M':
   {
     // annotatemore
     int cmd;
@@ -1337,7 +1337,7 @@
     }
     break;
   }
-  case 'S': 
+  case 'S':
   {
     // status
     KURL _url;
@@ -1374,7 +1374,7 @@
     finished();
     break;
   }
-  case 'E': 
+  case 'E':
   {
     // search
     specialSearchCommand( stream );
@@ -1665,7 +1665,7 @@
   QString aBox, aSequence, aLType, aSection, aValidity, aDelimiter, aInfo;
   // parseURL with caching
   enum IMAP_TYPE aType =
-    parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter, 
+    parseURL (_url, aBox, aSection, aLType, aSequence, aValidity, aDelimiter,
         aInfo, true);
 
   UDSEntry entry;
@@ -1924,16 +1924,24 @@
       } else completeQueue.removeRef(cmd);
     }
 
-    if (!myAuth.isEmpty () && myAuth != "*"
-        && !hasCapability (QString ("AUTH=") + myAuth))
-    {
-      error (ERR_COULD_NOT_LOGIN, i18n("The authentication method %1 is not "
-        "supported by the server.").arg(myAuth));
-      closeConnection();
-      return false;
+    if ( myAuth.isEmpty () || myAuth == "*" ) {
+      if ( hasCapability( QString( "LOGINDISABLED" ) ) ) {
+        error( ERR_COULD_NOT_LOGIN, i18n("LOGIN is disabled by the server.") );
+        closeConnection();
+        return false;
+      }
+      else {
+        if ( !hasCapability( QString( "AUTH=" ) + myAuth ) ) {
+          error( ERR_COULD_NOT_LOGIN,
+                 i18n("The authentication method %1 is not "
+                      "supported by the server.").arg( myAuth ) );
+          closeConnection();
+          return false;
+        }
+      }
     }
 
-    if (  greeting.contains(  QRegExp(  "Cyrus IMAP4 v2.1" ) ) ) {
+    if ( greeting.contains(  QRegExp(  "Cyrus IMAP4 v2.1" ) ) ) {
       removeCapability( "ANNOTATEMORE" );
     }
 
@@ -1961,7 +1969,7 @@
     }
     else
     {
-#ifdef HAVE_LIBSASL2      
+#ifdef HAVE_LIBSASL2
       if (!clientAuthenticate (this, authInfo, myHost, myAuth, mySSL, resultInfo))
         error(KIO::ERR_COULD_NOT_LOGIN, i18n("Unable to authenticate via %1.\n"
 	"The server %2 replied:\n%3").arg(myAuth).arg(myHost).arg(resultInfo));
@@ -2002,12 +2010,12 @@
       if ( it != listResponses.end() )
       {
         namespaceToDelimiter[QString::null] = (*it).hierarchyDelimiter();
-        kdDebug(7116) << "makeLogin - delimiter for empty ns='" << 
+        kdDebug(7116) << "makeLogin - delimiter for empty ns='" <<
           (*it).hierarchyDelimiter() << "'" << endl;
         if ( !hasCapability("NAMESPACE") )
         {
           // server does not support namespaces
-          QString nsentry = QString::number( 0 ) + "==" 
+          QString nsentry = QString::number( 0 ) + "=="
             + (*it).hierarchyDelimiter();
           imapNamespaces.append( nsentry );
         }
@@ -2336,7 +2344,7 @@
               }
             }
             // if we got no list response for the box see if it's a prefix
-            if ( retVal == ITYPE_UNKNOWN && 
+            if ( retVal == ITYPE_UNKNOWN &&
                  namespaceToDelimiter.contains(_box) ) {
               retVal = ITYPE_DIR;
             }
@@ -2354,7 +2362,7 @@
     else
       kdDebug(7116) << "IMAP4::parseURL: no login!" << endl;
 
-  } 
+  }
   else // empty box
   {
     // the root is just a dir
@@ -2383,7 +2391,7 @@
   if ( _hierarchyDelimiter.isEmpty() &&
        (_type == "LIST" || _type == "LSUB" || _type == "LSUBNOCHECK") )
   {
-    // this shouldn't happen but when the delimiter is really empty 
+    // this shouldn't happen but when the delimiter is really empty
     // we try to reconstruct it from the URL
     if (!_box.isEmpty())
     {


Index: kdepim.spec
===================================================================
RCS file: /cvs/dist/rpms/kdepim/devel/kdepim.spec,v
retrieving revision 1.106
retrieving revision 1.107
diff -u -r1.106 -r1.107
--- kdepim.spec	20 Sep 2006 11:03:09 -0000	1.106
+++ kdepim.spec	20 Sep 2006 12:08:25 -0000	1.107
@@ -42,6 +42,7 @@
 Patch107: kdepim-3.5.4-akregator-font.patch
 Patch108: kdepim-3.5.4-holidays-es.patch
 Patch109: kdepim-3.5.4-kde#134200.patch
+Patch110: kdepim-3.5.4-kde#126975.patch
 
 Requires: kdebase >= %{kdebase_epoch}:%{version}
 Requires(post): /sbin/ldconfig
@@ -106,6 +107,7 @@
 %patch107 -p0 -b .akregator-font
 %patch108 -p0 -b .holidays-es
 %patch109 -p0 -b .kde#134200
+%patch110 -p0 -b .kde#126975
 
 %build
 unset QTDIR || : ; . /etc/profile.d/qt.sh
@@ -210,6 +212,7 @@
    fix #133792, do not double-count days during weekly-summarized report
    remove a duplicated holiday
    fix #134200, always initialize mLineHeight and mFirstColumnWidth
+   fix #126975, Refuse to LOGIN when hasCapability("LOGINDISABLED")
 
 * Tue Sep 12 2006 Than Ngo <than at redhat.com> 6:3.5.4-4
 - apply upstream patches




More information about the fedora-cvs-commits mailing list