|
Lines 5847-5853
Link Here
|
| 5847 |
memset(&tmp, 0, sizeof(struct buf)); |
5847 |
memset(&tmp, 0, sizeof(struct buf)); |
| 5848 |
memset(&user, 0, sizeof(struct buf)); |
5848 |
memset(&user, 0, sizeof(struct buf)); |
| 5849 |
|
5849 |
|
| 5850 |
prot_printf(pout, "ACL0 GETACL {%d+}\r\n%s\r\n", |
5850 |
prot_printf(pout, "ACL0 GETACL {%ld+}\r\n%s\r\n", |
| 5851 |
strlen(mailbox), mailbox); |
5851 |
strlen(mailbox), mailbox); |
| 5852 |
|
5852 |
|
| 5853 |
while(1) { |
5853 |
while(1) { |
|
Lines 5898-5904
Link Here
|
| 5898 |
|
5898 |
|
| 5899 |
snprintf(tagbuf, sizeof(tagbuf), "ACL%d", ++i); |
5899 |
snprintf(tagbuf, sizeof(tagbuf), "ACL%d", ++i); |
| 5900 |
|
5900 |
|
| 5901 |
prot_printf(pout, "%s DELETEACL {%d+}\r\n%s {%d+}\r\n%s\r\n", |
5901 |
prot_printf(pout, "%s DELETEACL {%ld+}\r\n%s {%ld+}\r\n%s\r\n", |
| 5902 |
tagbuf, strlen(mailbox), mailbox, |
5902 |
tagbuf, strlen(mailbox), mailbox, |
| 5903 |
strlen(user.s), user.s); |
5903 |
strlen(user.s), user.s); |
| 5904 |
if(c == '\r') { |
5904 |
if(c == '\r') { |
|
Lines 5975-5981
Link Here
|
| 5975 |
|
5975 |
|
| 5976 |
snprintf(tag, sizeof(tag), "SACL%d", tagnum++); |
5976 |
snprintf(tag, sizeof(tag), "SACL%d", tagnum++); |
| 5977 |
|
5977 |
|
| 5978 |
prot_printf(pout, "%s SETACL {%d+}\r\n%s {%d+}\r\n%s {%d+}\r\n%s\r\n", |
5978 |
prot_printf(pout, "%s SETACL {%d+}\r\n%s {%ld+}\r\n%s {%ld+}\r\n%s\r\n", |
| 5979 |
tag, |
5979 |
tag, |
| 5980 |
mailboxlen, mailbox, |
5980 |
mailboxlen, mailbox, |
| 5981 |
strlen(acl), acl, |
5981 |
strlen(acl), acl, |
|
Lines 6093-6102
Link Here
|
| 6093 |
if(!r) { |
6093 |
if(!r) { |
| 6094 |
if(topart) { |
6094 |
if(topart) { |
| 6095 |
/* need to send partition as an atom */ |
6095 |
/* need to send partition as an atom */ |
| 6096 |
prot_printf(be->out, "LC1 LOCALCREATE {%d+}\r\n%s %s\r\n", |
6096 |
prot_printf(be->out, "LC1 LOCALCREATE {%ld+}\r\n%s %s\r\n", |
| 6097 |
strlen(name), name, topart); |
6097 |
strlen(name), name, topart); |
| 6098 |
} else { |
6098 |
} else { |
| 6099 |
prot_printf(be->out, "LC1 LOCALCREATE {%d+}\r\n%s\r\n", |
6099 |
prot_printf(be->out, "LC1 LOCALCREATE {%ld+}\r\n%s\r\n", |
| 6100 |
strlen(name), name); |
6100 |
strlen(name), name); |
| 6101 |
} |
6101 |
} |
| 6102 |
r = getresult(be->in, "LC1"); |
6102 |
r = getresult(be->in, "LC1"); |
|
Lines 6131-6137
Link Here
|
| 6131 |
if(!r) { |
6131 |
if(!r) { |
| 6132 |
backout_mupdate = 1; |
6132 |
backout_mupdate = 1; |
| 6133 |
|
6133 |
|
| 6134 |
prot_printf(be->out, "D01 UNDUMP {%d+}\r\n%s ", strlen(name), name); |
6134 |
prot_printf(be->out, "D01 UNDUMP {%ld+}\r\n%s ", strlen(name), name); |
| 6135 |
|
6135 |
|
| 6136 |
r = dump_mailbox(NULL, mailboxname, path, acl, 0, be->in, be->out, |
6136 |
r = dump_mailbox(NULL, mailboxname, path, acl, 0, be->in, be->out, |
| 6137 |
imapd_authstate); |
6137 |
imapd_authstate); |
|
Lines 6176-6182
Link Here
|
| 6176 |
|
6176 |
|
| 6177 |
/* 6.5) Kick remote server to correct mupdate entry */ |
6177 |
/* 6.5) Kick remote server to correct mupdate entry */ |
| 6178 |
/* Note that we don't really care if this succeeds or not */ |
6178 |
/* Note that we don't really care if this succeeds or not */ |
| 6179 |
prot_printf(be->out, "MP1 MUPDATEPUSH {%d+}\r\n%s\r\n", |
6179 |
prot_printf(be->out, "MP1 MUPDATEPUSH {%ld+}\r\n%s\r\n", |
| 6180 |
strlen(name), name); |
6180 |
strlen(name), name); |
| 6181 |
rerr = getresult(be->in, "MP1"); |
6181 |
rerr = getresult(be->in, "MP1"); |
| 6182 |
if(rerr) { |
6182 |
if(rerr) { |
|
Lines 6215-6221
Link Here
|
| 6215 |
} |
6215 |
} |
| 6216 |
if(r && backout_remotebox) { |
6216 |
if(r && backout_remotebox) { |
| 6217 |
rerr = 0; |
6217 |
rerr = 0; |
| 6218 |
prot_printf(be->out, "LD1 LOCALDELETE {%d+}\r\n%s\r\n", |
6218 |
prot_printf(be->out, "LD1 LOCALDELETE {%ld+}\r\n%s\r\n", |
| 6219 |
strlen(name), name); |
6219 |
strlen(name), name); |
| 6220 |
rerr = getresult(be->in, "LD1"); |
6220 |
rerr = getresult(be->in, "LD1"); |
| 6221 |
if(rerr) { |
6221 |
if(rerr) { |
|
Lines 6426-6432
Link Here
|
| 6426 |
if(!r) { |
6426 |
if(!r) { |
| 6427 |
/* note use of + to force the setting of a nonexistant |
6427 |
/* note use of + to force the setting of a nonexistant |
| 6428 |
* quotaroot */ |
6428 |
* quotaroot */ |
| 6429 |
prot_printf(be->out, "Q01 SETQUOTA {%d+}\r\n" \ |
6429 |
prot_printf(be->out, "Q01 SETQUOTA {%ld+}\r\n" \ |
| 6430 |
"+%s (STORAGE %d)\r\n", |
6430 |
"+%s (STORAGE %d)\r\n", |
| 6431 |
strlen(name)+1, name, quota.limit); |
6431 |
strlen(name)+1, name, quota.limit); |
| 6432 |
r = getresult(be->in, "Q01"); |
6432 |
r = getresult(be->in, "Q01"); |
|
Lines 6972-6978
Link Here
|
| 6972 |
|
6972 |
|
| 6973 |
/* if it's too long, literal it */ |
6973 |
/* if it's too long, literal it */ |
| 6974 |
if (*p || len >= 1024) { |
6974 |
if (*p || len >= 1024) { |
| 6975 |
prot_printf(imapd_out, "{%u}\r\n%s", strlen(s), s); |
6975 |
prot_printf(imapd_out, "{%lu}\r\n%s", strlen(s), s); |
| 6976 |
} else { |
6976 |
} else { |
| 6977 |
prot_printf(imapd_out, "\"%s\"", s); |
6977 |
prot_printf(imapd_out, "\"%s\"", s); |
| 6978 |
} |
6978 |
} |
|
Lines 7002-7008
Link Here
|
| 7002 |
|
7002 |
|
| 7003 |
/* if it's too long, literal it */ |
7003 |
/* if it's too long, literal it */ |
| 7004 |
if (*p || len >= 1024) { |
7004 |
if (*p || len >= 1024) { |
| 7005 |
prot_printf(imapd_out, "{%u}\r\n%s", strlen(s), s); |
7005 |
prot_printf(imapd_out, "{%lu}\r\n%s", strlen(s), s); |
| 7006 |
} else { |
7006 |
} else { |
| 7007 |
prot_printf(imapd_out, "\"%s\"", s); |
7007 |
prot_printf(imapd_out, "\"%s\"", s); |
| 7008 |
} |
7008 |
} |