mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
Use base64 to input DirSync cookie
This commit is contained in:
parent
c65cf6e6d7
commit
932edf8f43
1 changed files with 17 additions and 3 deletions
|
|
@ -679,10 +679,24 @@ handle_private_option( int i )
|
|||
*maxattrp++ = '\0';
|
||||
cookiep = strchr( maxattrp, '/' );
|
||||
if ( cookiep != NULL ) {
|
||||
*cookiep++ = '\0';
|
||||
if ( *cookiep != '\0' ) {
|
||||
ber_str2bv( cookiep, 0, 0, &dirSyncCookie );
|
||||
if ( cookiep[1] != '\0' ) {
|
||||
struct berval type;
|
||||
int freeval;
|
||||
char save1, save2;
|
||||
|
||||
/* dummy type "x"
|
||||
* to use ldif_parse_line2() */
|
||||
save1 = cookiep[ -1 ];
|
||||
save2 = cookiep[ -2 ];
|
||||
cookiep[ -2 ] = 'x';
|
||||
cookiep[ -1 ] = ':';
|
||||
cookiep[ 0 ] = ':';
|
||||
ldif_parse_line2( &cookiep[ -2 ], &type,
|
||||
&dirSyncCookie, &freeval );
|
||||
cookiep[ -1 ] = save1;
|
||||
cookiep[ -2 ] = save2;
|
||||
}
|
||||
*cookiep = '\0';
|
||||
}
|
||||
num = sscanf( cvalue, "%d", &tmp );
|
||||
if ( num != 1 ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue