Commit d169e795 authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

ITS#9413 fix slap_parse_user

parent 4e1f8027
Pipeline #1295 passed with stage
in 56 minutes and 40 seconds
...@@ -156,10 +156,9 @@ int slap_parse_user( struct berval *id, struct berval *user, ...@@ -156,10 +156,9 @@ int slap_parse_user( struct berval *id, struct berval *user,
user->bv_val++; user->bv_val++;
user->bv_len = id->bv_len - ( user->bv_val - id->bv_val ); user->bv_len = id->bv_len - ( user->bv_val - id->bv_val );
mech->bv_val = ber_bvchr( id, '.' ); if ( id->bv_val[1] == '.' ) {
if ( !BER_BVISNULL( mech ) ) { id->bv_val[1] = '\0';
mech->bv_val[ 0 ] = '\0'; mech->bv_val = id->bv_val + 2;
mech->bv_val++;
mech->bv_len = user->bv_val - mech->bv_val - 1; mech->bv_len = user->bv_val - mech->bv_val - 1;
realm->bv_val = ber_bvchr( mech, '/' ); realm->bv_val = ber_bvchr( mech, '/' );
...@@ -172,6 +171,7 @@ int slap_parse_user( struct berval *id, struct berval *user, ...@@ -172,6 +171,7 @@ int slap_parse_user( struct berval *id, struct berval *user,
} }
} else { } else {
BER_BVZERO( mech );
BER_BVZERO( realm ); BER_BVZERO( realm );
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment