]> git.sur5r.net Git - openldap/commitdiff
objectclass=* -> NULL
authorKurt Zeilenga <kurt@openldap.org>
Wed, 12 Apr 2000 01:00:48 +0000 (01:00 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Wed, 12 Apr 2000 01:00:48 +0000 (01:00 +0000)
clients/fax500/main.c
clients/gopher/go500gw.c
clients/mail500/main.c
clients/tools/ldapdelete.c
clients/ud/find.c
clients/ud/main.c
libraries/libldap/sasl.c
libraries/libldap/tmplout.c
servers/slurpd/ldap_op.c

index 346ccc8bda774aadb77e0f744fd3d181206ef6fd..8362a7b520c26fdfbb9148178075ed4185d12c1e 100644 (file)
@@ -830,7 +830,7 @@ add_member(
 
        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 );
@@ -1464,7 +1464,7 @@ get_attributes_mail_dn( LDAPMessage *e, char *attr1, char *attr2 )
 
                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 );
index c390b283cdb76d69dee158d83a9a02b8ae63ac07..dfda607001f42358689535db12433571c8e4991e 100644 (file)
@@ -553,7 +553,7 @@ isnonleaf( LDAP *ld, char **oclist, char *dn )
                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);
@@ -703,7 +703,7 @@ make_scope( LDAP *ld, char *dn )
 
        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 );
        }
index 3fb309bf9f13a73c556bddae62faca58141fc04d..8cfd572aab836d8c44efb28b14f5e751a64bea82 100644 (file)
@@ -772,7 +772,7 @@ dn_search(
        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 );
index 6ad029a00f9246d432fa89cf64c7e7da346a57c0..c2fa16cbc205b59c48f07eecc1a7f5fb107f92bd 100644 (file)
@@ -284,7 +284,7 @@ static int deletechildren( LDAP *ld,
     /*
      * 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 );
index 5efa57f1940c818cf73c82d03b951d0f9a5a113b..59a89ebf15c75d0fefab63720c286842fc83396e 100644 (file)
@@ -36,8 +36,8 @@ static int num_picked = 0;    /* used when user picks entry at More prompt */
 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
@@ -45,7 +45,7 @@ vrfy( char *dn )
                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);
@@ -69,7 +69,7 @@ disambiguate( LDAPMessage *result, int matches, char **read_attrs, char *who )
        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
@@ -133,7 +133,7 @@ disambiguate( LDAPMessage *result, int matches, char **read_attrs, char *who )
                                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);
@@ -141,7 +141,7 @@ disambiguate( LDAPMessage *result, int matches, char **read_attrs, char *who )
                                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);
@@ -228,7 +228,7 @@ find( char *who, int quiet )
                        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;
@@ -307,7 +307,7 @@ find( char *who, int quiet )
                                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);
@@ -315,7 +315,7 @@ find( char *who, int quiet )
                                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;
@@ -466,7 +466,7 @@ fetch_boolean_value( char *who, struct attribute attr )
                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)
index 537280afe2772b5d84e9d054fcda8517237d6905..2aeb8e0c09eadf40cf51255a633528a47f550f04 100644 (file)
@@ -435,7 +435,7 @@ change_base( int type, char **base, char *s )
                 *  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) ||
index f4a1f786ed2534632e4adf2b8985ac4d6c9eb65c..f62fa997377e097a1272aeb6a6f90c41480687b4 100644 (file)
@@ -546,7 +546,7 @@ ldap_pvt_sasl_getmechs ( LDAP *ld, LDAP_CONST char *desired, char **pmechlist )
        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;
index e804fe0be74e32349653fd5b8fd69289caeea443..d42cc03ff439f625c4e8599696aa58f4b6aaf3a4 100644 (file)
@@ -478,11 +478,11 @@ do_entry2text_search(
 #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 );
@@ -511,11 +511,11 @@ do_entry2text_search(
 
 #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 ) {
index 6671ac6adefe25d4e04fdd051ab8354d52ea2161..dae3e8698a452191e1f464959591d794a9f011b5 100644 (file)
@@ -857,7 +857,7 @@ read_krbnames(
        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",