diff options
author | Andrew Tridgell <tridge@samba.org> | 2005-11-09 05:19:57 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:45:55 -0500 |
commit | 9a52d1a467c9ba601ab85a064bdb3d8732f53efd (patch) | |
tree | af6cf790e2af455294ae435555b111a33d628ddb /source4/dsdb/samdb/ldb_modules | |
parent | 8aae0d3d63779f3921668c56fc9a237001ff53a8 (diff) | |
download | samba-9a52d1a467c9ba601ab85a064bdb3d8732f53efd.tar.gz samba-9a52d1a467c9ba601ab85a064bdb3d8732f53efd.tar.bz2 samba-9a52d1a467c9ba601ab85a064bdb3d8732f53efd.zip |
r11592: fixed a crash bug from the ldb_result changes (res was being used after being freed)
(This used to be commit 5c7f3fef3e2324f0d1edda0f0f06f662bbcf7e08)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samldb.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index bb69b86e1d..6f98298f6b 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -129,17 +129,15 @@ static struct ldb_dn *samldb_search_domain(struct ldb_module *module, TALLOC_CTX struct ldb_result *res = NULL; int ret = 0; - local_ctx = talloc_named(mem_ctx, 0, "samldb_search_domain memory conext"); + local_ctx = talloc_new(mem_ctx); if (local_ctx == NULL) return NULL; sdn = ldb_dn_copy(local_ctx, dn); do { ret = ldb_search(module->ldb, sdn, LDB_SCOPE_BASE, "objectClass=domain", NULL, &res); - talloc_free(res); - + talloc_steal(local_ctx, res); if (ret == LDB_SUCCESS && res->count == 1) break; - } while ((sdn = ldb_dn_get_parent(local_ctx, sdn))); if (ret != LDB_SUCCESS || res->count != 1) { @@ -451,6 +449,10 @@ static struct ldb_message *samldb_fill_user_or_computer_object(struct ldb_module return NULL; } + /* + useraccountcontrol: setting value 0 gives 0x200 for users + */ + /* TODO: objectCategory, userAccountControl, badPwdCount, codePage, countryCode, badPasswordTime, lastLogoff, lastLogon, pwdLastSet, primaryGroupID, accountExpires, logonCount */ return msg2; |