dovecot-2.0: acl: Handle empty rights (no rights) properly.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jun 22 07:29:47 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/e8b202fe3ef8
changeset: 9504:e8b202fe3ef8
user: Timo Sirainen <tss at iki.fi>
date: Mon Jun 22 00:28:33 2009 -0400
description:
acl: Handle empty rights (no rights) properly.
diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
src/plugins/acl/acl-backend-vfile.c | 8 ++++----
diffs (27 lines):
diff -r fd7d2cb8fda6 -r e8b202fe3ef8 src/plugins/acl/acl-backend-vfile.c
--- a/src/plugins/acl/acl-backend-vfile.c Mon Jun 22 00:11:43 2009 -0400
+++ b/src/plugins/acl/acl-backend-vfile.c Mon Jun 22 00:28:33 2009 -0400
@@ -887,12 +887,9 @@ static bool modify_right_list(pool_t poo
return FALSE;
}
- if (old_rights == NULL)
- old_rights = &null;
-
switch (modify_mode) {
case ACL_MODIFY_MODE_REMOVE:
- if (*old_rights == NULL) {
+ if (old_rights == NULL || *old_rights == NULL) {
/* nothing to do */
return FALSE;
}
@@ -928,6 +925,9 @@ static bool modify_right_list(pool_t poo
}
*rightsp = new_rights;
+ if (old_rights == NULL)
+ return new_rights != NULL;
+
/* see if anything changed */
for (i = 0; old_rights[i] != NULL && new_rights[i] != NULL; i++) {
if (strcmp(old_rights[i], new_rights[i]) != 0)
More information about the dovecot-cvs
mailing list