diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-02-01 10:04:55 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:51:42 -0500 |
commit | 5bb38cf7e6b1647a88b0f2233bf5a513f8b4c881 (patch) | |
tree | cc5ceecbc0181508ae934f90e5116a82e9d1b005 /source4/dsdb/samdb | |
parent | ce927996c99818e508663ac90d5a782e5cc9da10 (diff) | |
download | samba-5bb38cf7e6b1647a88b0f2233bf5a513f8b4c881.tar.gz samba-5bb38cf7e6b1647a88b0f2233bf5a513f8b4c881.tar.bz2 samba-5bb38cf7e6b1647a88b0f2233bf5a513f8b4c881.zip |
r13282: Indentation, and ensure we handle the talloc_free in the right place
all the time.
Andrew Bartlett
(This used to be commit 2aa9fefbb30959f29e9d5a79c4880f33a747b68c)
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/cracknames.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/cracknames.c b/source4/dsdb/samdb/cracknames.c index 8cc95e503c..d886894483 100644 --- a/source4/dsdb/samdb/cracknames.c +++ b/source4/dsdb/samdb/cracknames.c @@ -66,9 +66,9 @@ static enum drsuapi_DsNameStatus LDB_lookup_spn_alias(krb5_context context, stru return DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR; } - service_dn = ldb_dn_string_compose(tmp_ctx, samdb_base_dn(mem_ctx), - "CN=Directory Service,CN=Windows NT" - ",CN=Services,CN=Configuration"); + service_dn = ldb_dn_string_compose(tmp_ctx, samdb_base_dn(tmp_ctx), + "CN=Directory Service,CN=Windows NT" + ",CN=Services,CN=Configuration"); service_dn_str = ldb_dn_linearize(tmp_ctx, service_dn); ret = ldb_search(ldb_ctx, service_dn, LDB_SCOPE_BASE, "(objectClass=nTDSService)", @@ -77,7 +77,7 @@ static enum drsuapi_DsNameStatus LDB_lookup_spn_alias(krb5_context context, stru if (ret != LDB_SUCCESS) { DEBUG(1, ("ldb_search: dn: %s not found: %s", service_dn_str, ldb_errstring(ldb_ctx))); return DRSUAPI_DS_NAME_STATUS_RESOLVE_ERROR; - } else if (res->count > 1) { + } else if (res->count != 1) { talloc_free(res); DEBUG(1, ("ldb_search: dn: %s found %d times!", service_dn_str, res->count)); return DRSUAPI_DS_NAME_STATUS_NOT_FOUND; |