#908368 isync: Does not work with GSSAPI authentication

Package:
isync
Source:
isync
Description:
IMAP and MailDir mailbox synchronizer
Submitter:
Tollef Fog Heen
Date:
2022-05-18 14:12:06 UTC
Severity:
important
#908368#5
Date:
2018-09-09 07:20:09 UTC
From:
To:
When I run mbsync against my Kerberos-enabled Dovecot installation, it
fails with a «buffer too small» error:

$ mbsync mail
C: 0/1  B: 0/0  M: +0/0 *0/0 #0/0  S: +0/0 *0/0 #0/0Fatal: buffer too small. Please report a bug.
zsh: abort      mbsync mail

This is very reproducible for me, the components are dovecot with gssapi
enabled, samba4 as the Kerberos server and mbsync with
libsasl2-modules-gssapi-mit installed.  An easy workaround is to
increase the size of the IMAP command buffer, I can provide a patch for
that if you'd like.

#908368#10
Date:
2018-09-09 09:25:48 UTC
From:
To:
please increase the buffer to whatever size works and then send me the
output of an -l session with the -D option, so i can see where i made
the wrong assumption.

#908368#15
Date:
2018-09-09 10:42:11 UTC
From:
To:
]] Oswald Buddenhagen

Hi,

Thanks for the quick response, I suspect the interesting bit of the log
is:

S: [ 3] Callback leave list_store
S: [ 3] Leave list_store
S: [ 2] Callback leave connect_store
S: [ 2] Leave connect_store
Connection is now encrypted
M: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=GSSAPI AUTH=PLAIN] Dovecot ready.
Logging in...
Authenticating with SASL mechanism GSSAPI...
M: >>> 1 AUTHENTICATE GSSAPI YIIE[around 1700 characters elided]

I've bumped size of buf in send_imap_cmd and imap_vprintf to 2048 bytes;
no other changes seems to be needed.

(I'd rather not provide the complete log as it includes folder names,
host names and so on.)

#908368#20
Date:
2018-09-09 11:46:37 UTC
From:
To:
ok, that seems convincing. i bumped it to 4KiB (just to be safe) on the
1.3 branch.

#908368#25
Date:
2018-09-09 12:40:49 UTC
From:
To:
]] Oswald Buddenhagen

Much appreciated, thank you! :-)

#908368#30
Date:
2022-05-17 14:14:53 UTC
From:
To:
fixed upstream in v1.4 for good (dynamic buffer).
for v1.3, see #1004979.

#908368#37
Date:
2022-05-18 14:02:23 UTC
From:
To:
fixed 908368 isync/1.4.3-1
thanks

Oswald Buddenhagen <oswald.buddenhagen@gmx.de> wrote on 17/05/2022 at 16:14:53+0200:

Thanks.