bool has[11]={0,0,0,0,0,0,0,0,0,0}; /* parse IMAP ACL list */ while (*acl == ' ' || *acl == '\t') acl++; t_array_init(&rights, 64); 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; } if (acl_letter_map[i].letter == '\0') { if(*acl == 'c') { // FIXME if(!has[8]) { array_append(&rights, &acl_letter_map[8].name, 1); //k has[8]=1; } if(!has[9]) { array_append(&rights, &acl_letter_map[9].name, 1); //x has[9]=1; } acl++; continue; } else if(*acl == 'd') { // FIXME if(!has[7]) { array_append(&rights, &acl_letter_map[7].name, 1); //e has[7]=1; } if(!has[4]) { array_append(&rights, &acl_letter_map[4].name, 1); //t has[4]=1; } acl++; continue; } *error_r = t_strdup_printf("Unknown ACL '%c'", *acl); return NULL; } has[i]=1; array_append(&rights, &acl_letter_map[i].name, 1); acl++; }