From edab363466256ab0357e4e43f2e38b25a509d711 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Mon, 25 Oct 2010 11:02:34 +0200 Subject: s4:samldb LDB module - use "uint32_t" for available krbtgt number --- source4/dsdb/samdb/ldb_modules/samldb.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'source4/dsdb') diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index ffa21d6f98..fd5ac1503a 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -236,16 +236,19 @@ static int samldb_allocate_sid(struct samldb_ctx *ac) /* see if a krbtgt_number is available */ -static bool samldb_krbtgtnumber_available(struct samldb_ctx *ac, unsigned krbtgt_number) +static bool samldb_krbtgtnumber_available(struct samldb_ctx *ac, + uint32_t krbtgt_number) { TALLOC_CTX *tmp_ctx = talloc_new(ac); struct ldb_result *res; - const char *attrs[] = { NULL }; + const char *no_attrs[] = { NULL }; int ret; - ret = dsdb_module_search(ac->module, tmp_ctx, &res, NULL, LDB_SCOPE_SUBTREE, - attrs, DSDB_FLAG_NEXT_MODULE, - "msDC-SecondaryKrbTgtNumber=%u", krbtgt_number); + ret = dsdb_module_search(ac->module, tmp_ctx, &res, NULL, + LDB_SCOPE_SUBTREE, no_attrs, + DSDB_FLAG_NEXT_MODULE, + "(msDC-SecondaryKrbTgtNumber=%u)", + krbtgt_number); if (ret == LDB_SUCCESS && res->count == 0) { talloc_free(tmp_ctx); return true; -- cgit