]> git.sur5r.net Git - openldap/commitdiff
Look for the '@' in userid@realm in reverse so that a@b@c results
authorKurt Zeilenga <kurt@openldap.org>
Sat, 13 Dec 2003 17:25:59 +0000 (17:25 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 13 Dec 2003 17:25:59 +0000 (17:25 +0000)
in userid of a@b and realm of c.

servers/slapd/sasl.c

index 9f3046718f96b3b3482255dadf694a8623b51e5a..781020b0e9c47d4505a8931e503f0231205b36ab 100644 (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 ) {