time_t o_time; /* time op was initiated */
char *o_dn; /* dn bound when op was initiated */
char *o_ndn; /* normalized dn bound when op was initiated */
- char *o_suffix; /* suffix if aliased */
- char *o_suffixAliased; /* pending suffix translation */
int o_authtype; /* auth method used to bind dn */
/* values taken from ldap.h */
/* LDAP_AUTH_* */
if(dn == NULL) return NULL;
dnLength = strlen ( dn );
- op->o_suffix = NULL;
- op->o_suffixAliased = NULL;
for ( i = 0;
be->be_suffixAlias != NULL && be->be_suffixAlias[i] != NULL;
i += 2) {
if (!strcasecmp(be->be_suffixAlias[i],
dn + (dnLength - aliasLength))) {
char *oldDN = dn;
- op->o_suffixAliased = ch_strdup ( be->be_suffixAlias[i] );
dn = ch_malloc ( (dnLength - aliasLength) +
strlen (be->be_suffixAlias[ i+1 ]) + 1);
strncpy (dn, oldDN, dnLength - aliasLength);
strcpy (dn + (dnLength - aliasLength), be->be_suffixAlias[ i+1 ]);
- op->o_suffix = ch_strdup (dn);
Debug( LDAP_DEBUG_ARGS, "ALIAS: converted %s to %s", oldDN, dn, 0);
free (oldDN);
break;