samba-cvs.cvs
[Top] [All Lists]

Re: svn commit: samba r25959 - in branches/SAMBA_4_0/source/lib/ldb/ldb_

Subject: Re: svn commit: samba r25959 - in branches/SAMBA_4_0/source/lib/ldb/ldb_tdb: .
From: "Stefan (metze) Metzmacher"
Date: Thu, 15 Nov 2007 10:34:43 +0100
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> +     
> +     /* possibly initialise the baseinfo */
> +     if (r == LDB_SUCCESS) {

this comment is wrong (cut-n-paste?)

>       }
> +
> +     if ((req->op.search.base == NULL) || 
> (ldb_dn_is_null(req->op.search.base) == true)) {
> +
> +             /* Check what we should do with a NULL dn */
> +             switch (req->op.search.scope) {
> +             case LDB_SCOPE_BASE:
> +                     ldb_asprintf_errstring(module->ldb, 
> +                                            "NULL Base DN invalid for a base 
> search");
> +                     ret = LDB_ERR_INVALID_DN_SYNTAX;
> +             case LDB_SCOPE_ONELEVEL:
> +                     ldb_asprintf_errstring(module->ldb, 
> +                                            "NULL Base DN invalid for a 
> one-level search");
> +                     ret = LDB_ERR_INVALID_DN_SYNTAX;        
> +             case LDB_SCOPE_SUBTREE:
> +             default:
> +                     /* We accept subtree searches from a NULL base DN, ie 
> over the whole DB */
> +                     ret = LDB_SUCCESS;
> +             }
> +     } else if (ldb_dn_is_valid(req->op.search.base) == false) {
> +
> +             /* We don't want invalid base DNs here */
> +             ldb_asprintf_errstring(module->ldb, 
> +                                    "Invalid Base DN: %s", 
> +                                    
> ldb_dn_get_linearized(req->op.search.base));
> +             ret = LDB_ERR_INVALID_DN_SYNTAX;
> +
> +     } else if (ldb_dn_is_null(req->op.search.base) == true) {
> +
> +             /* Check what we should do with a NULL dn */
> +             switch (req->op.search.scope) {

This is never reached as the first if also checks for this...

metze
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iD8DBQFHPBKzm70gjA5TCD8RAhxwAKCRr7oqjkjiyh391fvVjpH8PDOOMQCgiEum
m6JGpQvTOtrezosJAe/YPBw=
=lsul
-----END PGP SIGNATURE-----

<Prev in Thread] Current Thread [Next in Thread>