s4:kdc/db-glue: make use of dsdb_trust_search_tdo()
authorStefan Metzmacher <metze@samba.org>
Mon, 30 Mar 2015 08:17:51 +0000 (10:17 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 8 Jul 2015 16:38:21 +0000 (18:38 +0200)
dsdb_trust_search_tdo() is almost the same as sam_get_results_trust(),
so we can remove sam_get_results_trust() later.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source4/kdc/db-glue.c

index ba6db7dd9ee2a0f84bb1aa249982024199afaa2d..aaac0ec7e397418753c111502e5ce4ed729f0c02 100644 (file)
@@ -1414,12 +1414,11 @@ static krb5_error_code samba_kdc_lookup_trust(krb5_context context, struct ldb_c
        NTSTATUS status;
        const char * const *attrs = trust_attrs;
 
-       status = sam_get_results_trust(ldb_ctx,
-                                      mem_ctx, realm, realm, attrs,
-                                      pmsg);
+       status = dsdb_trust_search_tdo(ldb_ctx, realm, realm,
+                                      attrs, mem_ctx, pmsg);
        if (NT_STATUS_IS_OK(status)) {
                return 0;
-       } else if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_FOUND)) {
+       } else if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
                return HDB_ERR_NOENTRY;
        } else if (NT_STATUS_EQUAL(status, NT_STATUS_NO_MEMORY)) {
                int ret = ENOMEM;