/*
* Portions Copyright 1998 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Copyright (c) 1990 Regents of the University of Michigan.
* All rights reserved.
*
*/
#ifndef lint
static char copyright[] = "@(#) Copyright (c) 1990 Regents of the University of Michigan.\nAll rights reserved.\n";
#endif
#include <stdio.h>
#include <string.h>
#ifdef MACOS
#include "macos.h"
#endif /* MACOS */
#endif
#include "lber.h"
#include "ldap.h"
#include "ldap-private.h"
#include "ldap-int.h"
{
/* The compare request looks like this:
* CompareRequest ::= SEQUENCE {
* entry DistinguishedName,
* ava SEQUENCE {
* type AttributeType,
* value AttributeValue
* }
* }
* and must be wrapped in an LDAPMessage.
*/
/* create a message to send */
return( NULLBER );
}
return( NULLBER );
}
/* LDAPv3 */
/* Code controls if any */
if (serverctrls && serverctrls[0]) {
return( NULLBER );
}
/* Otherwise, is there any global server ctrls ? */
return( NULLBER );
}
}
return (NULLBER);
}
return (ber);
}
/*
* ldap_compare - perform an ldap (and X.500) compare operation. The dn
* of the entry to compare to and the attribute and value to compare (in
* attr and value) are supplied. The msgid of the response is returned.
*
* Example:
* ldap_compare( ld, "c=us@cn=bob", "userPassword", "secret" )
*/
int
{
int rv;
/* The compare request looks like this:
* CompareRequest ::= SEQUENCE {
* entry DistinguishedName,
* ava SEQUENCE {
* type AttributeType,
* value AttributeValue
* }
* }
* and must be wrapped in an LDAPMessage.
*/
#ifdef _REENTRANT
#endif
#ifdef _REENTRANT
#endif
return (-1);
}
#ifndef NO_CACHE
#ifdef _REENTRANT
#endif
}
}
#endif /* NO_CACHE */
/* send the message */
#ifdef _REENTRANT
#endif
return (rv);
}
int
{
int msgid;
}
/* LDAPv3 API extensions */
{
int rv;
/* The compare request looks like this:
* CompareRequest ::= SEQUENCE {
* entry DistinguishedName,
* ava SEQUENCE {
* type AttributeType,
* value AttributeValue
* }
* }
* and must be wrapped in an LDAPMessage.
*/
#ifdef _REENTRANT
#endif
if (rv == LDAP_SUCCESS)
rv = LDAP_OTHER;
#ifdef _REENTRANT
#endif
return (rv);
}
#ifndef NO_CACHE
#ifdef _REENTRANT
#endif
return( LDAP_SUCCESS );
}
}
#endif /* NO_CACHE */
/* send the message */
if (rv == -1) {
if (rv == LDAP_SUCCESS){
rv = LDAP_OTHER;
}
#ifdef _REENTRANT
#endif
return (rv);
}
#ifdef _REENTRANT
#endif
return (LDAP_SUCCESS);
}
{
if ( (retcode = ldap_compare_ext( ld, dn, attr, bvalue, serverctrls, clientctrls, &msgid )) != LDAP_SUCCESS )
return( retcode );
#ifdef _REENTRANT
#endif
if (retcode == LDAP_SUCCESS)
#ifdef _REENTRANT
#endif
return (retcode);
}