summaryrefslogtreecommitdiff
path: root/source4/dsdb/common
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb/common')
-rw-r--r--source4/dsdb/common/util.c4
-rw-r--r--source4/dsdb/common/util_samr.c14
2 files changed, 8 insertions, 10 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 21318cba33..7527f355b7 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -2311,8 +2311,8 @@ NTSTATUS samdb_create_foreign_security_principal(struct ldb_context *sam_ctx, TA
return NT_STATUS_NO_MEMORY;
}
- ret = samdb_msg_add_string(sam_ctx, msg, msg,
- "objectClass", "foreignSecurityPrincipal");
+ ret = ldb_msg_add_string(msg, "objectClass",
+ "foreignSecurityPrincipal");
if (ret != LDB_SUCCESS) {
talloc_free(sidstr);
return NT_STATUS_NO_MEMORY;
diff --git a/source4/dsdb/common/util_samr.c b/source4/dsdb/common/util_samr.c
index 02b412e433..deaea2e07f 100644
--- a/source4/dsdb/common/util_samr.c
+++ b/source4/dsdb/common/util_samr.c
@@ -140,10 +140,8 @@ NTSTATUS dsdb_add_user(struct ldb_context *ldb,
return NT_STATUS_FOOBAR;
}
- samdb_msg_add_string(ldb, tmp_ctx, msg, "sAMAccountName",
- account_name);
- samdb_msg_add_string(ldb, tmp_ctx, msg, "objectClass",
- obj_class);
+ ldb_msg_add_string(msg, "sAMAccountName", account_name);
+ ldb_msg_add_string(msg, "objectClass", obj_class);
/* create the user */
ret = ldb_add(ldb, msg);
@@ -289,8 +287,8 @@ NTSTATUS dsdb_add_domain_group(struct ldb_context *ldb,
talloc_free(tmp_ctx);
return NT_STATUS_NO_MEMORY;
}
- samdb_msg_add_string(ldb, tmp_ctx, msg, "sAMAccountName", groupname);
- samdb_msg_add_string(ldb, tmp_ctx, msg, "objectClass", "group");
+ ldb_msg_add_string(msg, "sAMAccountName", groupname);
+ ldb_msg_add_string(msg, "objectClass", "group");
/* create the group */
ret = ldb_add(ldb, msg);
@@ -369,8 +367,8 @@ NTSTATUS dsdb_add_domain_alias(struct ldb_context *ldb,
return NT_STATUS_NO_MEMORY;
}
- samdb_msg_add_string(ldb, mem_ctx, msg, "sAMAccountName", alias_name);
- samdb_msg_add_string(ldb, mem_ctx, msg, "objectClass", "group");
+ ldb_msg_add_string(msg, "sAMAccountName", alias_name);
+ ldb_msg_add_string(msg, "objectClass", "group");
samdb_msg_add_int(ldb, mem_ctx, msg, "groupType", GTYPE_SECURITY_DOMAIN_LOCAL_GROUP);
/* create the alias */