254 |
254 |
255 |
255 |
256 // initialize group cache |
256 // initialize group cache |
257 authdb->groups.first = NULL; |
257 authdb->groups.first = NULL; |
258 authdb->groups.last = NULL; |
258 authdb->groups.last = NULL; |
259 authdb->groups.map = cxHashMapCreate(cfg->a, 32); |
259 authdb->groups.map = cxHashMapCreate(cfg->a, CX_STORE_POINTERS, 32); |
260 if(!authdb->groups.map) { |
260 if(!authdb->groups.map) { |
261 return NULL; |
261 return NULL; |
262 } |
262 } |
263 |
263 |
264 log_ereport(LOG_INFORM, "create authdb name=%s type=ldap resource=%s", name, resource.ptr); |
264 log_ereport(LOG_INFORM, "create authdb name=%s type=ldap resource=%s", name, resource.ptr); |
516 |
516 |
517 LDAPGroup *group = pool_malloc(sn->pool, sizeof(LDAPGroup)); |
517 LDAPGroup *group = pool_malloc(sn->pool, sizeof(LDAPGroup)); |
518 if(!group) { |
518 if(!group) { |
519 return NULL; |
519 return NULL; |
520 } |
520 } |
521 group->members = cxHashMapCreate(a, 32); |
521 group->members = cxHashMapCreate(a, CX_STORE_POINTERS, 32); |
522 if(!group->members) { |
522 if(!group->members) { |
523 pool_free(sn->pool, group); |
523 pool_free(sn->pool, group); |
524 return NULL; |
524 return NULL; |
525 } |
525 } |
526 group->name = pool_strdup(sn->pool, group_name); |
526 group->name = pool_strdup(sn->pool, group_name); |