diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-25 10:55:11 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-25 09:06:04 +0000 |
commit | 9e6d07e1b32d3050cc3574f658be1ea6ff4e87d8 (patch) | |
tree | 87c6e92a4656c9a2ff47f29c448d37c2e381c743 /source4 | |
parent | adcfda92439f90c5c05fc80495dff53d9baa219f (diff) | |
download | samba-9e6d07e1b32d3050cc3574f658be1ea6ff4e87d8.tar.gz samba-9e6d07e1b32d3050cc3574f658be1ea6ff4e87d8.tar.bz2 samba-9e6d07e1b32d3050cc3574f658be1ea6ff4e87d8.zip |
s4:samldb LDB module - assign better memory contexts in some cases
Diffstat (limited to 'source4')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samldb.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index 2357ffd7d9..ffa21d6f98 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -298,12 +298,13 @@ found: return ldb_operr(ldb); } - ret = ldb_msg_add_fmt(ac->msg, "sAMAccountName", "krbtgt_%u", krbtgt_number); + ret = ldb_msg_add_fmt(ac->msg, "sAMAccountName", "krbtgt_%u", + krbtgt_number); if (ret != LDB_SUCCESS) { return ldb_operr(ldb); } - newpass = generate_random_password(ac, 128, 255); + newpass = generate_random_password(ac->msg, 128, 255); if (newpass == NULL) { return ldb_operr(ldb); } @@ -563,8 +564,8 @@ static int samldb_fill_object(struct samldb_ctx *ac) if (!ldb_msg_find_element(ac->msg, "lDAPDisplayName")) { /* the RDN has prefix "CN" */ ret = ldb_msg_add_string(ac->msg, "lDAPDisplayName", - samdb_cn_to_lDAPDisplayName(ac, - (const char *) rdn_value->data)); + samdb_cn_to_lDAPDisplayName(ac->msg, + (const char *) rdn_value->data)); if (ret != LDB_SUCCESS) { ldb_oom(ldb); return ret; @@ -605,7 +606,7 @@ static int samldb_fill_object(struct samldb_ctx *ac) ac->dn = ac->msg->dn; ret = ldb_msg_add_string(ac->msg, "defaultObjectCategory", - ldb_dn_alloc_linearized(ac, ac->dn)); + ldb_dn_alloc_linearized(ac->msg, ac->dn)); if (ret != LDB_SUCCESS) { ldb_oom(ldb); return ret; @@ -627,7 +628,7 @@ static int samldb_fill_object(struct samldb_ctx *ac) /* the RDN has prefix "CN" */ ret = ldb_msg_add_string(ac->msg, "lDAPDisplayName", samdb_cn_to_lDAPDisplayName(ac->msg, - (const char *) rdn_value->data)); + (const char *) rdn_value->data)); if (ret != LDB_SUCCESS) { ldb_oom(ldb); return ret; @@ -1055,7 +1056,7 @@ static int samldb_prim_group_change(struct samldb_ctx *ac) msg = talloc_zero(ac, struct ldb_message); msg->dn = new_prim_group_dn; - ret = samdb_msg_add_delval(ldb, ac, msg, "member", + ret = samdb_msg_add_delval(ldb, msg, msg, "member", ldb_dn_get_linearized(ac->msg->dn)); if (ret != LDB_SUCCESS) { return ret; @@ -1070,7 +1071,7 @@ static int samldb_prim_group_change(struct samldb_ctx *ac) msg = talloc_zero(ac, struct ldb_message); msg->dn = prev_prim_group_dn; - ret = samdb_msg_add_addval(ldb, ac, msg, "member", + ret = samdb_msg_add_addval(ldb, msg, msg, "member", ldb_dn_get_linearized(ac->msg->dn)); if (ret != LDB_SUCCESS) { return ret; |