summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-06 11:37:28 +0200
committerMatthias Dieter Wallnöfer <mdw@sn-devel-104.sn.samba.org>2010-10-06 10:20:45 +0000
commit8e5f8d71f22f0c102f46339427069d0571597ebf (patch)
tree987b7e22caf49bc52621aab206958870d5c40474
parent2db1987f5a3a4268ce64fe570ff598e3bf4ecc73 (diff)
downloadsamba-8e5f8d71f22f0c102f46339427069d0571597ebf.tar.gz
samba-8e5f8d71f22f0c102f46339427069d0571597ebf.tar.bz2
samba-8e5f8d71f22f0c102f46339427069d0571597ebf.zip
s4:samldb LDB module - remove "type" parameter of "samldb_fill_object"
It's a bit redundant given that we have the "type" variable on "ac". Autobuild-User: Matthias Dieter Wallnöfer <mdw@samba.org> Autobuild-Date: Wed Oct 6 10:20:45 UTC 2010 on sn-devel-104
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index f3a9e08e72..c67f2d06d6 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -612,7 +612,7 @@ static bool check_rodc_critical_attribute(struct ldb_message *msg)
}
-static int samldb_fill_object(struct samldb_ctx *ac, const char *type)
+static int samldb_fill_object(struct samldb_ctx *ac)
{
struct ldb_context *ldb;
struct loadparm_context *lp_ctx;
@@ -624,7 +624,6 @@ static int samldb_fill_object(struct samldb_ctx *ac, const char *type)
ldb = ldb_module_get_ctx(ac->module);
/* Add informations for the different account types */
- ac->type = type;
if (strcmp(ac->type, "user") == 0) {
ret = samdb_find_or_add_attribute(ldb, ac->msg,
"userAccountControl", "546");
@@ -1103,12 +1102,14 @@ static int samldb_add(struct ldb_module *module, struct ldb_request *req)
if (samdb_find_attribute(ldb, ac->msg,
"objectclass", "user") != NULL) {
- return samldb_fill_object(ac, "user");
+ ac->type = "user";
+ return samldb_fill_object(ac);
}
if (samdb_find_attribute(ldb, ac->msg,
"objectclass", "group") != NULL) {
- return samldb_fill_object(ac, "group");
+ ac->type = "group";
+ return samldb_fill_object(ac);
}
/* perhaps a foreignSecurityPrincipal? */
@@ -1126,7 +1127,8 @@ static int samldb_add(struct ldb_module *module, struct ldb_request *req)
return ret;
}
- return samldb_fill_object(ac, "classSchema");
+ ac->type = "classSchema";
+ return samldb_fill_object(ac);
}
if (samdb_find_attribute(ldb, ac->msg,
@@ -1137,7 +1139,8 @@ static int samldb_add(struct ldb_module *module, struct ldb_request *req)
return ret;
}
- return samldb_fill_object(ac, "attributeSchema");
+ ac->type = "attributeSchema";
+ return samldb_fill_object(ac);
}
talloc_free(ac);