if (*acl != '\0') {
/* parse our own extended ACLs */
- i_assert(*acl == ':');
+ if (*acl != ':') {
+ *error_r = "Missing ':' prefix in ACL extensions";
+ return NULL;
+ }
- names = t_strsplit_spaces(acl, ", ");
+ names = t_strsplit_spaces(acl + 1, ", ");
for (; *names != NULL; names++) {
const char *name = p_strdup(pool, *names);
array_append(&rights, &name, 1);
rights.global = global;
right_names = acl_parse_rights(aclobj->rights_pool, p, &error);
- if (*line != '-') {
+ if (*line != '-')
rights.rights = right_names;
- } else {
+ else {
line++;
rights.neg_rights = right_names;
}
if (acl_letter_map[j].name == NULL) {
/* fallback to full name */
str_append_c(dest, ' ');
- str_append(dest, rights[j]);
+ str_append(dest, rights[i]);
}
}
+ if (pos + 1 < str_len(dest)) {
+ c2[0] = ':';
+ str_insert(dest, pos + 1, c2);
+ }
}
static void