mirror of
https://github.com/samba-team/samba.git
synced 2025-01-15 23:24:37 +03:00
r20373: When adding a base to a "" DN, don't precede it with a comma (,)
Andrew Bartlett
This commit is contained in:
parent
4bd8dbcf41
commit
ef1ca30180
@ -988,7 +988,11 @@ bool ldb_dn_add_base(struct ldb_dn *dn, struct ldb_dn *base)
|
||||
}
|
||||
|
||||
if (dn->casefold && s) {
|
||||
t = talloc_asprintf(dn, "%s,%s", dn->casefold, s);
|
||||
if (*dn->casefold) {
|
||||
t = talloc_asprintf(dn, "%s,%s", dn->casefold, s);
|
||||
} else {
|
||||
t = talloc_strdup(dn, s);
|
||||
}
|
||||
LDB_FREE(dn->casefold);
|
||||
dn->casefold = t;
|
||||
}
|
||||
@ -1001,7 +1005,11 @@ bool ldb_dn_add_base(struct ldb_dn *dn, struct ldb_dn *base)
|
||||
return false;
|
||||
}
|
||||
|
||||
t = talloc_asprintf(dn, "%s,%s", dn->linearized, s);
|
||||
if (*dn->linearized) {
|
||||
t = talloc_asprintf(dn, "%s,%s", dn->linearized, s);
|
||||
} else {
|
||||
t = talloc_strdup(dn, s);
|
||||
}
|
||||
if ( ! t) {
|
||||
dn->invalid = true;
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user