svn commit: samba r19887 - in
branches/SAMBA_4_0/source/lib/ldb/common: .
idra at samba.org
idra at samba.org
Sat Nov 25 15:42:22 GMT 2006
Author: idra
Date: 2006-11-25 15:42:22 +0000 (Sat, 25 Nov 2006)
New Revision: 19887
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19887
Log:
return "" string only if the dn is a valid one
Modified:
branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c 2006-11-25 15:41:12 UTC (rev 19886)
+++ branches/SAMBA_4_0/source/lib/ldb/common/ldb_dn.c 2006-11-25 15:42:22 UTC (rev 19887)
@@ -630,7 +630,7 @@
if (dn->casefold) return dn->casefold;
- if (dn->special) {
+ if (dn->special) {
dn->casefold = talloc_strdup(dn, dn->linearized);
if (!dn->casefold) return NULL;
dn->valid_case = true;
@@ -642,10 +642,14 @@
}
if (dn->comp_num == 0) {
- dn->casefold = talloc_strdup(dn, "");
- if (!dn->casefold) return NULL;
- dn->valid_case = true;
- return dn->casefold;
+ if (dn->linearized && dn->linearized[0] == '\0') {
+ /* hmm a NULL dn, should we faild casefolding ? */
+ dn->casefold = talloc_strdup(dn, "");
+ return dn->casefold;
+ }
+ /* A DN must be NULL, special, or have components */
+ dn->invalid = true;
+ return NULL;
}
/* calculate maximum possible length of DN */
More information about the samba-cvs
mailing list