Your Cyrus imapd ACL patch
Greg Banks
gnb at fastmail.fm
Sun Aug 14 23:14:02 EDT 2011
On 12/08/11 21:46, Kristóf Katus wrote:
> Hi there,
>
> so I git pulled the cyrus-imapd master branch, built the code, installed it,
> and ran cyrus-imapd with valgrind: "valgrind --show-reachable=yes --undef-
> value-errors=yes --track-origins=yes --trace-children=yes --leak-check=full
> /usr/cyrus/bin/cyrus-master"
>
> I tested the mboxlist.c:mboxlist_setacl codepath by hand, by using cyradm as
> user "admin", e.g. executing the "setacl user/base admin lrswipkxtecda"
> command amongst others. I was not able to reproduce Greg's valgrind output.
> Maybe I'm doing something wrong.
>
> Greg, could you please clarify what did you exactly do to produce that
> valgrind output, how did you use this test suite, what version of cyrus are
> you using etc?
>
I just tried again, and saw the same thing.
The Cyrus version was the cmu master branch at commit
4412656e218a42559964ccdce06e8daefb8197c5 which is Guilherme's patch,
plus a5caf503c7060b4f1ec546e4dc6fe75e5b9c4029 to enable the tests to run.
I narrowed down the tests that cause the problem, and found that this
set of IMAP commands
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE AUTH=LOGIN AUTH=PLAIN
AUTH=DIGEST-MD5 SASL-IR] gnb-desktop Cyrus IMAP git2.5+0 server ready
1 login admin #########
1 OK [CAPABILITY IMAP4rev1 LITERAL+ ID ENABLE ACL RIGHTS=kxte QUOTA
MAILBOX-REFERRALS NAMESPACE UIDPLUS NO_ATOMIC_RENAME UNSELECT CHILDREN
MULTIAPPEND BINARY CATENATE CONDSTORE ESEARCH SORT SORT=MODSEQ
THREAD=ORDEREDSUBJECT THREAD=REFERENCES ANNOTATEMORE METADATA
LIST-EXTENDED WITHIN QRESYNC SCAN XLIST SPECIAL-USE CREATE-SPECIAL-USE
URLAUTH URLAUTH=BINARY LOGINDISABLED COMPRESS=DEFLATE IDLE] User logged
in SESSIONID=<casscmd-18613-1313377245-1>
2 create user.base
2 OK Completed
3 setacl user.base admin lrswipkxtecda
3 OK Completed
is sufficient to trigger the following Valgrind errors
==18613== Conditional jump or move depends on uninitialised value(s)
==18613== at 0x449031: mboxlist_is_owner (mboxlist.c:1292)
==18613== by 0x449500: mboxlist_setacl (mboxlist.c:1389)
==18613== by 0x41C373: cmd_setacl (imapd.c:6415)
==18613== by 0x40D9BB: cmdloop (imapd.c:1889)
==18613== by 0x40A847: service_main (imapd.c:945)
==18613== by 0x4093DC: main (service.c:581)
==18613==
==18613== Conditional jump or move depends on uninitialised value(s)
==18613== at 0x449047: mboxlist_is_owner (mboxlist.c:1292)
==18613== by 0x449500: mboxlist_setacl (mboxlist.c:1389)
==18613== by 0x41C373: cmd_setacl (imapd.c:6415)
==18613== by 0x40D9BB: cmdloop (imapd.c:1889)
==18613== by 0x40A847: service_main (imapd.c:945)
==18613== by 0x4093DC: main (service.c:581)
==18613==
==18613== Conditional jump or move depends on uninitialised value(s)
==18613== at 0x449031: mboxlist_is_owner (mboxlist.c:1292)
==18613== by 0x449542: mboxlist_setacl (mboxlist.c:1395)
==18613== by 0x41C373: cmd_setacl (imapd.c:6415)
==18613== by 0x40D9BB: cmdloop (imapd.c:1889)
==18613== by 0x40A847: service_main (imapd.c:945)
==18613== by 0x4093DC: main (service.c:581)
==18613==
==18613== Conditional jump or move depends on uninitialised value(s)
==18613== at 0x449047: mboxlist_is_owner (mboxlist.c:1292)
==18613== by 0x449542: mboxlist_setacl (mboxlist.c:1395)
==18613== by 0x41C373: cmd_setacl (imapd.c:6415)
==18613== by 0x40D9BB: cmdloop (imapd.c:1889)
==18613== by 0x40A847: service_main (imapd.c:945)
==18613== by 0x4093DC: main (service.c:581)
==18613==
My Valgrind is version 1:3.6.0~svn20100724-0ubuntu2 on Ubuntu 10.10, run
thus
# cat /var/tmp/cass/casscmd/conf/cyrus.conf
SERVICES {
imap listen=127.0.0.1:9100 cmd="/usr/bin/valgrind -q
--log-file=/var/tmp/cass/casscmd/vglogs/imapd.%p
--suppressions=/home/gnb/software/cyrus/cassandane/vg.supp
--tool=memcheck --leak-check=full /usr/cyrus/bin/imapd -C
/var/tmp/cass/casscmd/conf/imapd.conf"
}
and the imapd.conf is
# cat /var/tmp/cass/casscmd/conf/imapd.conf
allowplaintext: yes
sasl_mech_list: PLAIN LOGIN DIGEST-MD5
syslog_prefix: casscmd
expunge_mode: delayed
partition-default: /var/tmp/cass/casscmd/data
defaultpartition: default
sievedir: /var/tmp/cass/casscmd/conf/sieve
configdirectory: /var/tmp/cass/casscmd/conf
sasl_pwcheck_method: alwaystrue
admins: admin
delete_mode: delayed
--
Greg.
More information about the Cyrus-devel
mailing list