summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-25 11:02:34 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-25 09:06:04 +0000
commitedab363466256ab0357e4e43f2e38b25a509d711 (patch)
tree14d864a15fa68ccdbd93301c6bd664ca648749f6 /source4/dsdb/samdb/ldb_modules
parent9e6d07e1b32d3050cc3574f658be1ea6ff4e87d8 (diff)
downloadsamba-edab363466256ab0357e4e43f2e38b25a509d711.tar.gz
samba-edab363466256ab0357e4e43f2e38b25a509d711.tar.bz2
samba-edab363466256ab0357e4e43f2e38b25a509d711.zip
s4:samldb LDB module - use "uint32_t" for available krbtgt number
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c13
1 files changed, 8 insertions, 5 deletions
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;