Your message dated Sun, 29 Apr 2012 19:08:18 +0100
with message-id <[email protected]>
and subject line offlineimap: Race condition in kerberos
has caused the Debian Bug report #574634,
regarding Kerberos authentication does not work with maxconnections > 1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
574634: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=574634
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: offlineimap
Version: 6.2.0+nmu2
Severity: normal
Tags: patch

When specifying maxconnections > 1, Kerberos authentication does not work. This
is due to self.gss_step and self.gss_vc not being cleaned up after successful
authentication. However, when specifying maxconnections > 2, the problem happens
despite the attached patch. I suspect the threads getting into each others way,
then again, I don’t know enough about offlineimap’s internals to fix it.

So, the attached patch works for maxconnections = 2 (at least every time I
tried) and should give you an idea where the problem is.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32.8-midna-2 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages offlineimap depends on:
ii  python                        2.5.4-9    An interactive high-level object-o
ii  python-support                1.0.4      automated rebuilding support for P

offlineimap recommends no packages.

Versions of packages offlineimap suggests:
ii  python-kerberos         1.1+svn4895-1+b1 A GSSAPI interface module for Pyth

-- no debconf information
--- /usr/share/pyshared/offlineimap/imapserver.py       2010-03-19 
16:08:03.043844214 +0100
+++ /tmp/imapserver.py  2010-03-19 16:07:52.763844519 +0100
@@ -187,8 +187,10 @@
         imapobj.login(self.username, self.getpassword())
 
     def gssauth(self, response):
+       UIBase.getglobalui().debug('imap', 'gssapi step = %d' % self.gss_step)
         data = base64.b64encode(response)
         try:
+            reset_state = False
             if self.gss_step == self.GSS_STATE_STEP:
                 if not self.gss_vc:
                     rc, self.gss_vc = kerberos.authGSSClientInit('imap@' + 
@@ -202,7 +204,15 @@
                 response = kerberos.authGSSClientResponse(self.gss_vc)
                 rc = kerberos.authGSSClientWrap(self.gss_vc, response,
                                                 self.username)
+                UIBase.getglobalui().debug('imap', 'rc = %d' % rc)
+                if rc == kerberos.AUTH_GSS_COMPLETE:
+                    reset_state = True
             response = kerberos.authGSSClientResponse(self.gss_vc)
+
+            if reset_state:
+                self.gss_step = self.GSS_STATE_STEP
+                self.gss_vc = None
+                UIBase.getglobalui().debug('imap', 'reset step')
         except kerberos.GSSError, err:
             # Kerberos errored out on us, respond with None to cancel the
             # authentication

--- End Message ---
--- Begin Message ---
Version: 6.5.3.1-1

I believe this has been fixed in upstream v6.3.4-rc3 and later.
This fix is now in debian as well.
If you still encounter this problem, please reopen.

-- 
Regards,
Dmitrijs.

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply via email to