]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
acl: Empty negative rights list should be the same as NULL negative rights list.
authorTimo Sirainen <tss@iki.fi>
Mon, 12 May 2014 09:18:46 +0000 (12:18 +0300)
committerTimo Sirainen <tss@iki.fi>
Mon, 12 May 2014 09:18:46 +0000 (12:18 +0300)
There may be other places where this should be fixed, but this at least
fixes errors with dsync where "-user" entry without any rights was attempted
to be synced in dovecot-acl (although such entry shouldn't really have
existed in the first place).

src/plugins/acl/acl-api.c

index fd266558921552c77b8867d8bcb1500ec6be5cde..e447a01e646167d7c6f670e7d53646893b31fa6d 100644 (file)
@@ -363,7 +363,7 @@ const char *acl_rights_export(const struct acl_rights *rights)
 
        if (rights->rights != NULL)
                str_append(str, t_strarray_join(rights->rights, " "));
-       if (rights->neg_rights != NULL) {
+       if (rights->neg_rights != NULL && rights->neg_rights[0] != NULL) {
                if (str_len(str) > 0)
                        str_append_c(str, ' ');
                str_append_c(str, '-');