Look for the '@' in userid@realm in reverse so that a@b@c results

in userid of a@b and realm of c.
This commit is contained in:
Kurt Zeilenga 2003-12-13 17:25:59 +00:00
parent 6e5ddd6420
commit dbc37977f2

View File

@ -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 ) {