Changeset 165
- Timestamp:
- 09/04/07 16:53:53 (20 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
c2s/authreg_ldap.c (modified) (6 diffs)
-
etc/c2s.xml.dist.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/c2s/authreg_ldap.c
r164 r165 42 42 #define AR_LDAP_FLAGS_RECONNECT (0x8) 43 43 #define AR_LDAP_FLAGS_DISABLE_REFERRALS (0x10) 44 #define AR_LDAP_FLAGS_APPEND_REALM (0x20) 44 45 45 46 /** internal structure, holds our data */ … … 199 200 } 200 201 201 snprintf(filter, 1024, "(%s=%s)", data->uidattr, username); 202 if (data->flags & AR_LDAP_FLAGS_APPEND_REALM) { 203 snprintf(filter, 1024, "(%s=%s@%s)", data->uidattr, username, realm); 204 } else { 205 snprintf(filter, 1024, "(%s=%s)", data->uidattr, username); 206 } 202 207 203 208 if(ldap_set_rebind_proc(data->ld, &rebindProc, data)) { … … 402 407 if(config_get(ar->c2s->config, ldap_entry) != NULL) 403 408 data->flags |= AR_LDAP_FLAGS_V3; 409 404 410 if (l>0) 405 411 snprintf(ldap_entry,sizeof(ldap_entry), "authreg.ldap%d.startls", l ); … … 408 414 if(config_get(ar->c2s->config, ldap_entry) != NULL) 409 415 data->flags |= AR_LDAP_FLAGS_STARTTLS; 416 410 417 if (l>0) 411 418 snprintf(ldap_entry,sizeof(ldap_entry), "authreg.ldap%d.ssl", l ); … … 414 421 if(config_get(ar->c2s->config, ldap_entry) != NULL) 415 422 data->flags |= AR_LDAP_FLAGS_SSL; 423 416 424 if (l>0) 417 425 snprintf(ldap_entry,sizeof(ldap_entry), "authreg.ldap%d.disablereferrals", l ); … … 420 428 if(config_get(ar->c2s->config, ldap_entry) != NULL) 421 429 data->flags |= AR_LDAP_FLAGS_DISABLE_REFERRALS; 430 431 if (l>0) 432 snprintf(ldap_entry,sizeof(ldap_entry), "authreg.ldap%d.append-realm", l ); 433 else 434 snprintf(ldap_entry, sizeof(ldap_entry), "authreg.ldap.append-realm"); 435 if(config_get(ar->c2s->config, ldap_entry) != NULL) 436 data->flags |= AR_LDAP_FLAGS_APPEND_REALM; 422 437 423 438 if((data->flags & AR_LDAP_FLAGS_STARTTLS) && (data->flags & AR_LDAP_FLAGS_SSL)) { -
trunk/etc/c2s.xml.dist.in
r162 r165 380 380 <uidattr>uid</uidattr> 381 381 382 <!-- Enable the append-realm element if you want to append 383 realm value (usernam@realm) to the uidattr value 384 <append-realm/> 385 --> 386 382 387 <!-- base DN of the tree. You should specify a DN for each 383 388 authentication realm declared in the <local/> section above,
