Ilja Booij wrote:
Paul J Stevens wrote:
Just an update. I've run the same test on a pristine dbmail
installation in an UML image. Same result. I've tried various compile
flags. No change. Sometimes it segfaults, sometimes it fails with an
internal dbase error. Ive attached the dumped dbmail database (very
small), and session log.
I thought I had found the possible answer, but as it turns out, I've
only found a bug in another function.
in db_listmailboxchildren() (used by IMAP DELETE and RENAME), the
mailbox_name string was used after it was freed.
There also was a memory leak in db_findmailbox_by_regex(), where the
regex_t struct was not freed.
Paul, I'm stilll looking into your problem. I've added a new debug
statement in _ic_list() in imapcommands.c, before the call to
db_getmailboxname().
Can you try to reproduce your error and show us the trace?
Did that. Same result: children[0] = 0 which it should be.
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: IMAPClientHandler(): line
read for PID 19781
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: COMMAND: [A01 LIST "" *]
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: arg[0]: ''
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: arg[1]: '*'
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: IMAPClientHandler():
Executing command list...
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: ic_list(): build the
pattern: [^.*$]
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: dbmysql.c,db_query:
executing query [SELECT mbx.name, mbx.mailbox_idnr, mbx.owner_idnr FROM
mailboxes mbx LEFT JOIN acl ON mbx.mailbox_idnr = acl.mailbox_id WHERE
(acl.user_id = '3' AND acl.lookup_flag = '1') OR mbx.owner_idnr = '3']
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: dbmysql.c,db_query:
executing query [SELECT userid FROM users WHERE user_idnr = '2']
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: authsql.c,auth_get_userid:
query_result = testuser1
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: authsql.c,auth_get_userid:
returning testuser1 as returnid
Mar 31 12:17:56 sarge dbmail/imap4d[19781]:
misc.c,mailbox_add_namespace: owner name = testuser1
Mar 31 12:17:56 sarge dbmail/imap4d[19781]:
misc.c,mailbox_add_namespace: returning fully qualified name
[#Users/testuser1/testbox]
Mar 31 12:17:56 sarge dbmail/imap4d[19781]:
db.c,db_list_mailboxes_by_regex: comparing mailbox
[#Users/testuser1/testbox] to regular expressionMar 31 12:17:56 sarge
dbmail/imap4d[19781]: db.c,db_list_mailboxes_by_regex: regex match
#Users/testuser1/testbox
Mar 31 12:17:56 sarge dbmail/imap4d[19781]:
db.c,db_list_mailboxes_by_regex: comparing mailbox [INBOX] to regular
expression
Mar 31 12:17:56 sarge dbmail/imap4d[19781]:
db.c,db_list_mailboxes_by_regex: regex match INBOX
Mar 31 12:17:56 sarge dbmail/imap4d[19781]:
db.c,db_list_mailboxes_by_regex: comparing mailbox [testbox] to regular
expression
Mar 31 12:17:56 sarge dbmail/imap4d[19781]:
db.c,db_list_mailboxes_by_regex: regex match testbox
Mar 31 12:17:56 sarge dbmail/imap4d[19781]:
db.c,db_findmailbox_by_regex: found [3] mailboxes
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: imapcommands.c,_ic_list:
children[0] = 0
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: dbmysql.c,db_query:
executing query [SELECT owner_idnr FROM mailboxes WHERE mailbox_idnr = '0']
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: dbmysql.c, db_get_result:
row = 0, field = 0, bigger than size of result set
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: db.c,db_getmailboxname:
error checking ownership of mailbox
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: IMAPClientHandler():
Finished command list
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: IMAPClientHandler(): Closing
connection for client from IP [172.16.3.2]
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: PerformChildTask(): client
handling complete, closing streams
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: PerformChildTask():
connection closed
Mar 31 12:17:56 sarge dbmail/imap4d[19781]: PerformChildTask(): waiting
for connection
--
________________________________________________________________
Paul Stevens mailto:[EMAIL PROTECTED]
NET FACILITIES GROUP PGP: finger [EMAIL PROTECTED]
The Netherlands________________________________http://www.nfg.nl