[dovecot-cvs] dovecot/src/plugins/acl acl-mailbox-list.c, 1.6, 1.7 acl-mailbox.c, 1.6, 1.7 acl-storage.c, 1.7, 1.8
tss at dovecot.org
tss at dovecot.org
Sun May 13 20:11:04 EEST 2007
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/list mailbox-list-fs-iter.c, 1.5, 1.6 mailbox-list-fs.c, 1.8, 1.9 mailbox-list-maildir.c, 1.7, 1.8 subscription-file.c, 1.4, 1.5
- Next message: [dovecot-cvs] dovecot/src/plugins/convert convert-storage.c, 1.25, 1.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /var/lib/cvs/dovecot/src/plugins/acl
In directory talvi:/tmp/cvs-serv20721/plugins/acl
Modified Files:
acl-mailbox-list.c acl-mailbox.c acl-storage.c
Log Message:
Error handling rewrite.
Index: acl-mailbox-list.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/acl/acl-mailbox-list.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- acl-mailbox-list.c 11 Apr 2007 19:33:37 -0000 1.6
+++ acl-mailbox-list.c 13 May 2007 17:11:01 -0000 1.7
@@ -286,11 +286,11 @@
if (ret < 0)
return -1;
if (can_see) {
- mailbox_list_set_error(list,
- MAILBOX_LIST_ERR_NO_PERMISSION);
+ mailbox_list_set_error(list, MAIL_ERROR_PERM,
+ MAIL_ERRSTR_NO_PERMISSION);
} else {
- mailbox_list_set_error(list, t_strdup_printf(
- MAILBOX_LIST_ERR_MAILBOX_NOT_FOUND, name));
+ mailbox_list_set_error(list, MAIL_ERROR_NOTFOUND,
+ T_MAIL_ERR_MAILBOX_NOT_FOUND(name));
}
return -1;
}
@@ -313,11 +313,11 @@
if (ret < 0)
return -1;
if (can_see) {
- mailbox_list_set_error(list,
- MAILBOX_LIST_ERR_NO_PERMISSION);
+ mailbox_list_set_error(list, MAIL_ERROR_PERM,
+ MAIL_ERRSTR_NO_PERMISSION);
} else {
- mailbox_list_set_error(list, t_strdup_printf(
- MAILBOX_LIST_ERR_MAILBOX_NOT_FOUND, oldname));
+ mailbox_list_set_error(list, MAIL_ERROR_NOTFOUND,
+ T_MAIL_ERR_MAILBOX_NOT_FOUND(oldname));
}
return 0;
}
@@ -334,8 +334,8 @@
/* Note that if the mailbox didn't have LOOKUP
permission, this not reveals to user the mailbox's
existence. Can't help it. */
- mailbox_list_set_error(list,
- MAILBOX_LIST_ERR_NO_PERMISSION);
+ mailbox_list_set_error(list, MAIL_ERROR_PERM,
+ MAIL_ERRSTR_NO_PERMISSION);
}
return -1;
}
Index: acl-mailbox.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/acl/acl-mailbox.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- acl-mailbox.c 11 Apr 2007 11:02:31 -0000 1.6
+++ acl-mailbox.c 13 May 2007 17:11:01 -0000 1.7
@@ -48,7 +48,8 @@
return -1;
}
- mail_storage_set_error(box->storage, MAILBOX_LIST_ERR_NO_PERMISSION);
+ mail_storage_set_error(box->storage, MAIL_ERROR_PERM,
+ MAIL_ERRSTR_NO_PERMISSION);
return 0;
}
Index: acl-storage.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/plugins/acl/acl-storage.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- acl-storage.c 11 Apr 2007 19:33:37 -0000 1.7
+++ acl-storage.c 13 May 2007 17:11:01 -0000 1.8
@@ -110,11 +110,11 @@
if (ret < 0)
return NULL;
if (can_see) {
- mail_storage_set_error(storage,
- MAILBOX_LIST_ERR_NO_PERMISSION);
+ mail_storage_set_error(storage, MAIL_ERROR_PERM,
+ MAIL_ERRSTR_NO_PERMISSION);
} else {
- mail_storage_set_error(storage,
- MAILBOX_LIST_ERR_MAILBOX_NOT_FOUND, name);
+ mail_storage_set_error(storage, MAIL_ERROR_NOTFOUND,
+ T_MAIL_ERR_MAILBOX_NOT_FOUND(name));
}
return NULL;
}
@@ -145,8 +145,8 @@
/* Note that if the mailbox didn't have LOOKUP
permission, this not reveals to user the mailbox's
existence. Can't help it. */
- mail_storage_set_error(storage,
- MAILBOX_LIST_ERR_NO_PERMISSION);
+ mail_storage_set_error(storage, MAIL_ERROR_PERM,
+ MAIL_ERRSTR_NO_PERMISSION);
}
return -1;
}
- Previous message: [dovecot-cvs] dovecot/src/lib-storage/list mailbox-list-fs-iter.c, 1.5, 1.6 mailbox-list-fs.c, 1.8, 1.9 mailbox-list-maildir.c, 1.7, 1.8 subscription-file.c, 1.4, 1.5
- Next message: [dovecot-cvs] dovecot/src/plugins/convert convert-storage.c, 1.25, 1.26
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the dovecot-cvs
mailing list