diff options
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r-- | source4/dsdb/common/util.c | 4 | ||||
-rw-r--r-- | source4/dsdb/common/util_samr.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index d0efa057e7..2563b40ebd 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -3761,9 +3761,9 @@ int dsdb_search_by_dn_guid(struct ldb_context *ldb, int ret; dn = ldb_dn_new_fmt(tmp_ctx, ldb, "<GUID=%s>", GUID_string(tmp_ctx, guid)); - if (!ldb_dn_validate(dn)) { + if (dn == NULL) { talloc_free(tmp_ctx); - return LDB_ERR_INVALID_DN_SYNTAX; + return ldb_oom(ldb); } ret = dsdb_search_dn(ldb, mem_ctx, _res, dn, attrs, dsdb_flags); diff --git a/source4/dsdb/common/util_samr.c b/source4/dsdb/common/util_samr.c index deaea2e07f..7a4f644123 100644 --- a/source4/dsdb/common/util_samr.c +++ b/source4/dsdb/common/util_samr.c @@ -507,7 +507,7 @@ NTSTATUS dsdb_lookup_rids(struct ldb_context *ldb, dom_sid_string(tmp_ctx, dom_sid_add_rid(tmp_ctx, domain_sid, rids[i]))); - if (!dn || !ldb_dn_validate(dn)) { + if (dn == NULL) { talloc_free(tmp_ctx); return NT_STATUS_NO_MEMORY; } |