timeout.tv_sec = FAX_TIMEOUT;
timeout.tv_usec = 0;
- if ( (rc = ldap_search_st( ld, dn, LDAP_SCOPE_BASE, "(objectclass=*)",
+ if ( (rc = ldap_search_st( ld, dn, LDAP_SCOPE_BASE, NULL,
attrs, 0, &timeout, &res )) != LDAP_SUCCESS ) {
if ( rc == LDAP_NO_SUCH_OBJECT ) {
add_error( err, nerr, E_BADMEMBER, dn, NULL );
for ( i = 0; dnlist[i] != NULL; i++ ) {
if ( (rc = ldap_search_st( ld, dnlist[i],
- LDAP_SCOPE_BASE, "(objectclass=*)", attrs, 0,
+ LDAP_SCOPE_BASE, NULL, attrs, 0,
&timeout, &res )) != LDAP_SUCCESS ) {
if ( rc != LDAP_NO_SUCH_OBJECT ) {
unbind_and_exit( EX_TEMPFAIL );
timeout.tv_usec = 0;
ldap_set_option(ld, LDAP_OPT_SIZELIMIT, &sizelimit);
if ( (rc = ldap_search_st( ld, dn, LDAP_SCOPE_ONELEVEL,
- "(objectClass=*)", attrs, 0, &timeout, &res ))
+ NULL, attrs, 0, &timeout, &res ))
== LDAP_SUCCESS || rc == LDAP_SIZELIMIT_EXCEEDED ) {
sizelimit = LDAP_NO_LIMIT;
ldap_set_option(ld, LDAP_OPT_SIZELIMIT, &sizelimit);
timeout.tv_sec = GO500GW_TIMEOUT;
timeout.tv_usec = 0;
- if ( ldap_search_st( ld, dn, LDAP_SCOPE_BASE, "objectClass=*",
+ if ( ldap_search_st( ld, dn, LDAP_SCOPE_BASE, NULL,
attrs, 0, &timeout, &res ) != LDAP_SUCCESS ) {
return( -1 );
}
timeout.tv_usec = 0;
for ( i = 0; dnlist[i]; i++ ) {
if ( (rc = ldap_search_st( ld, dnlist[i], LDAP_SCOPE_BASE,
- "(objectclass=*)", def_attr, 0,
+ NULL, def_attr, 0,
&timeout, &res )) != LDAP_SUCCESS ) {
if ( rc == LDAP_NO_SUCH_OBJECT ) {
add_error( err, nerr, E_BADMEMBER, dnlist[i], NULL );
/*
* Do a one level search at dn for children. For each, delete its children.
*/
- if ( ldap_search_s( ld, dn, LDAP_SCOPE_ONELEVEL, "(objectclass=*)", NULL, 0, &res ) == -1 )
+ if ( ldap_search_s( ld, dn, LDAP_SCOPE_ONELEVEL, NULL, NULL, 0, &res ) == -1 )
{
ldap_perror( ld, "ldap_search" );
ldap_get_option( ld, LDAP_OPT_ERROR_NUMBER, &rc );
int
vrfy( char *dn )
{
- LDAPMessage *results;
- static char *attrs[2] = { "objectClass", NULL };
+ LDAPMessage *results = NULL;
+ static char *attrs[2] = { "1.1", NULL };
int ld_errno = 0;
#ifdef DEBUG
printf("->vrfy(%s)\n", dn);
#endif
/* verify that this DN exists in the directory */
- (void) ldap_search_s(ld, dn, LDAP_SCOPE_BASE, "objectClass=*", attrs, TRUE, &results);
+ (void) ldap_search_s(ld, dn, LDAP_SCOPE_BASE, NULL, attrs, TRUE, &results);
(void) ldap_msgfree(results);
ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
char *namelist[MAX_NUM_NAMES]; /* names found */
char response[SMALL_BUF_SIZE]; /* results from user */
char *name = NULL; /* DN to lookup */
- LDAPMessage *mp;
+ LDAPMessage *mp = NULL;
int ld_errno = 0;
#ifdef DEBUG
printf(" ld = 0x%x\n", ld);
printf(" search base = %s\n", name);
printf(" scope = LDAP_SCOPE_BASE\n");
- printf(" filter = objectClass=*\n");
+ printf(" filter = (objectClass=*)\n");
for (i = 0; read_attrs[i] != NULL; i++)
printf(" read_attrs[%d] = %s\n", i, read_attrs[i]);
printf(" read_attrs[%d] = NULL\n", i);
printf(" &mp = 0x%x\n", &mp);
}
#endif
- if (ldap_search_s(ld, name, LDAP_SCOPE_BASE, "objectClass=*", read_attrs, FALSE, &mp) != LDAP_SUCCESS) {
+ if (ldap_search_s(ld, name, LDAP_SCOPE_BASE, NULL, read_attrs, FALSE, &mp) != LDAP_SUCCESS) {
ldap_perror(ld, "ldap_search_s");
Free(name);
ldap_msgfree(mp);
return(NULL);
} else if (matches == 1) {
dn = ldap_get_dn(ld, ldap_first_entry(ld, res));
- rc = ldap_search_s(ld, dn, LDAP_SCOPE_BASE, "objectClass=*", read_attrs, FALSE, &res);
+ rc = ldap_search_s(ld, dn, LDAP_SCOPE_BASE, NULL, read_attrs, FALSE, &res);
ldap_memfree(dn);
if (rc != LDAP_SUCCESS) {
int ld_errno = 0;
printf(" ld = 0x%x\n", ld);
printf(" dn = %s\n", dn);
printf(" scope = LDAP_SCOPE_BASE\n");
- printf(" filter = %s\n", "objectClass=*");
+ printf(" filter = %s\n", "(objectClass=*)");
for (i = 0; read_attrs[i] != NULL; i++)
printf(" read_attrs[%d] = %s\n", i, read_attrs[i]);
printf(" read_attrs[%d] = NULL\n", i);
printf(" &results = 0x%x\n", &res);
}
#endif
- if (ldap_search_s(ld, dn, LDAP_SCOPE_BASE, "objectClass=*", read_attrs, FALSE, &res) != LDAP_SUCCESS) {
+ if (ldap_search_s(ld, dn, LDAP_SCOPE_BASE, NULL, read_attrs, FALSE, &res) != LDAP_SUCCESS) {
ldap_perror(ld, "ldap_search_s");
ldap_msgfree(res);
res = NULL;
printf("->fetch_boolean_value(%s, %s)\n", who, attr.quipu_name);
#endif
attributes[0] = attr.quipu_name;
- if (ldap_search_s(ld, who, LDAP_SCOPE_BASE, "objectClass=*", attributes, FALSE, &result) != LDAP_SUCCESS) {
+ if (ldap_search_s(ld, who, LDAP_SCOPE_BASE, NULL, attributes, FALSE, &result) != LDAP_SUCCESS) {
int ld_errno = 0;
ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
if (ld_errno == LDAP_NO_SUCH_ATTRIBUTE)
* the user if they want to see more. They can also just
* type a number at that point too.
*/
- if (ldap_search_s(ld, *base, LDAP_SCOPE_ONELEVEL, "(|(objectClass=quipuNonLeafObject)(objectClass=externalNonLeafObject))", attrs, FALSE, &mp) != LDAP_SUCCESS) {
+ if (ldap_search_s(ld, *base, LDAP_SCOPE_ONELEVEL, NULL, attrs, FALSE, &mp) != LDAP_SUCCESS) {
int ld_errno = 0;
ldap_get_option(ld, LDAP_OPT_ERROR_NUMBER, &ld_errno);
if ((ld_errno == LDAP_TIMELIMIT_EXCEEDED) ||
int rc;
rc = ldap_search_s( ld, NULL, LDAP_SCOPE_BASE,
- "(objectclass=*)", attrs, 0, &res );
+ NULL, attrs, 0, &res );
if ( rc != LDAP_SUCCESS ) {
return ld->ld_errno;
#ifdef LDAP_CONNECTIONLESS
if ( LDAP_IS_CLDAP( ld ))
err = cldap_search_s( ld, dn, LDAP_SCOPE_BASE,
- "objectClass=*", ocattrs, 0, &ldmp, NULL );
+ NULL, ocattrs, 0, &ldmp, NULL );
else
#endif /* LDAP_CONNECTIONLESS */
err = ldap_search_st( ld, dn, LDAP_SCOPE_BASE,
- "objectClass=*", ocattrs, 0, &timeout, &ldmp );
+ NULL, ocattrs, 0, &timeout, &ldmp );
if ( err == LDAP_SUCCESS ) {
entry = ldap_first_entry( ld, ldmp );
#ifdef LDAP_CONNECTIONLESS
if ( LDAP_IS_CLDAP( ld ))
- err = cldap_search_s( ld, dn, LDAP_SCOPE_BASE, "objectClass=*",
+ err = cldap_search_s( ld, dn, LDAP_SCOPE_BASE, NULL,
fetchattrs, 0, &ldmp, NULL );
else
#endif /* LDAP_CONNECTIONLESS */
- err = ldap_search_st( ld, dn, LDAP_SCOPE_BASE, "objectClass=*",
+ err = ldap_search_st( ld, dn, LDAP_SCOPE_BASE, NULL,
fetchattrs, 0, &timeout, &ldmp );
if ( freedn ) {
return( NULL );
}
rc = ldap_search_st( ri->ri_ldp, ri->ri_bind_dn, LDAP_SCOPE_BASE,
- "objectclass=*", kattrs, 0, &kst, &result );
+ NULL, kattrs, 0, &kst, &result );
if ( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_ANY,
"Error: search failed getting krbnames for %s:%d: %s\n",