dovecot: Ignore spaces and TABs at the end of ACL lines.

dovecot at dovecot.org dovecot at dovecot.org
Sun Mar 2 06:40:37 EET 2008


details:   http://hg.dovecot.org/dovecot/rev/8ef6b651e2f8
changeset: 7312:8ef6b651e2f8
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Mar 02 06:40:34 2008 +0200
description:
Ignore spaces and TABs at the end of ACL lines.

diffstat:

1 file changed, 4 insertions(+), 2 deletions(-)
src/plugins/acl/acl-backend-vfile.c |    6 ++++--

diffs (23 lines):

diff -r 7f412e03ab8e -r 8ef6b651e2f8 src/plugins/acl/acl-backend-vfile.c
--- a/src/plugins/acl/acl-backend-vfile.c	Sun Mar 02 06:34:29 2008 +0200
+++ b/src/plugins/acl/acl-backend-vfile.c	Sun Mar 02 06:40:34 2008 +0200
@@ -157,7 +157,7 @@ acl_parse_rights(pool_t pool, const char
 		acl++;
 
 	t_array_init(&rights, 64);
-	for (; *acl != '\0' && *acl != ':'; acl++) {
+	while (*acl != '\0' && *acl != ' ' && *acl != '\t' && *acl != ':') {
 		for (i = 0; acl_letter_map[i].letter != '\0'; i++) {
 			if (acl_letter_map[i].letter == *acl)
 				break;
@@ -169,7 +169,9 @@ acl_parse_rights(pool_t pool, const char
 		}
 
 		array_append(&rights, &acl_letter_map[i].name, 1);
-	}
+		acl++;
+	}
+	while (*acl == ' ' || *acl == '\t') acl++;
 
 	if (*acl != '\0') {
 		/* parse our own extended ACLs */


More information about the dovecot-cvs mailing list