From: Kurt Zeilenga Date: Sat, 13 Dec 2003 17:25:59 +0000 (+0000) Subject: Look for the '@' in userid@realm in reverse so that a@b@c results X-Git-Tag: OPENLDAP_REL_ENG_2_1_MP~202 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=dbc37977f200e54610533e682e8010f72394e571;p=openldap Look for the '@' in userid@realm in reverse so that a@b@c results in userid of a@b and realm of c. --- diff --git a/servers/slapd/sasl.c b/servers/slapd/sasl.c index 9f3046718f..781020b0e9 100644 --- a/servers/slapd/sasl.c +++ b/servers/slapd/sasl.c @@ -1801,7 +1801,7 @@ int slap_sasl_getdn( Connection *conn, Operation *op, char *id, int len, * mostly doing strncpy's so we know how much * memory to copy ... */ - if( ( realm = strchr( dn->bv_val, '@') ) ) { + if( ( realm = strrchr( dn->bv_val, '@') ) ) { *realm++ = '\0'; len += sizeof(",cn=")-2; } else if( user_realm && *user_realm ) {