Displaying 1 result from an estimated 1 matches for "dc_count".
2006 May 15
1
dovecot ldap auth bind and different directories
...escape_func == NULL)
escape_func = escape_none;
- tab = t_malloc(sizeof(static_tab));
+ /* count the number of domain components
+ in the given auth_request->user string
+ so we can allocate the correct sized
+ array
+ */
+ int dc_count = 0;
+ str = strchr(auth_request->user, '@');
+ while (str != NULL && *str != '\0' && str++) {
+ if (*str == '.')
+ dc_count++;
+ if (dc_count == 9)
+ break;
+ }
+
+...