summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/dsdb_dn.c3
-rw-r--r--source4/dsdb/samdb/ldb_modules/linked_attributes.c6
-rw-r--r--source4/dsdb/samdb/ldb_modules/partition.c3
-rw-r--r--source4/dsdb/samdb/ldb_modules/resolve_oids.c2
-rw-r--r--source4/dsdb/samdb/ldb_modules/samba_dsdb.c6
-rw-r--r--source4/dsdb/samdb/ldb_modules/simple_ldap_map.c3
-rw-r--r--source4/dsdb/samdb/ldb_modules/subtree_rename.c2
7 files changed, 5 insertions, 20 deletions
diff --git a/source4/dsdb/common/dsdb_dn.c b/source4/dsdb/common/dsdb_dn.c
index 0029f5d49e..ab42776226 100644
--- a/source4/dsdb/common/dsdb_dn.c
+++ b/source4/dsdb/common/dsdb_dn.c
@@ -76,7 +76,6 @@ struct dsdb_dn *dsdb_dn_parse(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
{
struct dsdb_dn *dsdb_dn;
struct ldb_dn *dn;
- const char *data;
size_t len;
TALLOC_CTX *tmp_ctx;
char *p1;
@@ -127,8 +126,6 @@ struct dsdb_dn *dsdb_dn_parse(TALLOC_CTX *mem_ctx, struct ldb_context *ldb,
if (tmp_ctx == NULL) {
return NULL;
}
-
- data = (const char *)dn_blob->data;
len = dn_blob->length - 2;
p1 = talloc_strndup(tmp_ctx, (const char *)dn_blob->data + 2, len);
diff --git a/source4/dsdb/samdb/ldb_modules/linked_attributes.c b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
index 6e08209bf3..a55ec87f0f 100644
--- a/source4/dsdb/samdb/ldb_modules/linked_attributes.c
+++ b/source4/dsdb/samdb/ldb_modules/linked_attributes.c
@@ -752,7 +752,7 @@ static int linked_attributes_fix_links(struct ldb_module *module,
/* find our DN in the values */
for (j=0; j<el2->num_values; j++) {
struct dsdb_dn *dsdb_dn2;
- struct GUID link_guid;
+ struct GUID link_guid2;
dsdb_dn2 = dsdb_dn_parse(msg, ldb, &el2->values[j], target->syntax->ldap_oid);
if (dsdb_dn2 == NULL) {
@@ -760,7 +760,7 @@ static int linked_attributes_fix_links(struct ldb_module *module,
return LDB_ERR_INVALID_DN_SYNTAX;
}
- ret = la_guid_from_dn(module, parent, dsdb_dn2->dn, &link_guid);
+ ret = la_guid_from_dn(module, parent, dsdb_dn2->dn, &link_guid2);
if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return ret;
@@ -776,7 +776,7 @@ static int linked_attributes_fix_links(struct ldb_module *module,
* more costly, but still give us a GUID.
* dbcheck will fix this if run.
*/
- if (!GUID_equal(&self_guid, &link_guid)) {
+ if (!GUID_equal(&self_guid, &link_guid2)) {
continue;
}
diff --git a/source4/dsdb/samdb/ldb_modules/partition.c b/source4/dsdb/samdb/ldb_modules/partition.c
index 435a791f1c..63835d8d62 100644
--- a/source4/dsdb/samdb/ldb_modules/partition.c
+++ b/source4/dsdb/samdb/ldb_modules/partition.c
@@ -1089,13 +1089,10 @@ int partition_sequence_number_from_partitions(struct ldb_module *module,
*/
static int partition_sequence_number(struct ldb_module *module, struct ldb_request *req)
{
- struct partition_private_data *data = talloc_get_type(ldb_module_get_private(module),
- struct partition_private_data);
struct ldb_extended *ext;
struct ldb_seqnum_request *seq;
struct ldb_seqnum_result *seqr;
uint64_t seq_number;
- struct dsdb_partition *p;
int ret;
seq = talloc_get_type_abort(req->op.extended.data, struct ldb_seqnum_request);
diff --git a/source4/dsdb/samdb/ldb_modules/resolve_oids.c b/source4/dsdb/samdb/ldb_modules/resolve_oids.c
index 71f9a30635..b5c5f8efee 100644
--- a/source4/dsdb/samdb/ldb_modules/resolve_oids.c
+++ b/source4/dsdb/samdb/ldb_modules/resolve_oids.c
@@ -412,11 +412,9 @@ struct resolve_oids_context {
static int resolve_oids_callback(struct ldb_request *req, struct ldb_reply *ares)
{
- struct ldb_context *ldb;
struct resolve_oids_context *ac;
ac = talloc_get_type_abort(req->context, struct resolve_oids_context);
- ldb = ldb_module_get_ctx(ac->module);
if (!ares) {
return ldb_module_done(ac->req, NULL, NULL,
diff --git a/source4/dsdb/samdb/ldb_modules/samba_dsdb.c b/source4/dsdb/samdb/ldb_modules/samba_dsdb.c
index d10d1bbee2..ee7f694c73 100644
--- a/source4/dsdb/samdb/ldb_modules/samba_dsdb.c
+++ b/source4/dsdb/samdb/ldb_modules/samba_dsdb.c
@@ -214,8 +214,8 @@ static int samba_dsdb_init(struct ldb_module *module)
static const char *openldap_backend_modules[] = {
"entryuuid", "paged_searches", "simple_dn", NULL };
- static const char *samba_dsdb_attrs[] = { "backendType", "serverRole", NULL };
- const char *backendType, *serverRole;
+ static const char *samba_dsdb_attrs[] = { "backendType", NULL };
+ const char *backendType;
if (!tmp_ctx) {
return ldb_oom(ldb);
@@ -245,10 +245,8 @@ static int samba_dsdb_init(struct ldb_module *module)
samba_dsdb_attrs, DSDB_FLAG_NEXT_MODULE, NULL);
if (ret == LDB_ERR_NO_SUCH_OBJECT) {
backendType = "ldb";
- serverRole = "domain controller";
} else if (ret == LDB_SUCCESS) {
backendType = ldb_msg_find_attr_as_string(res->msgs[0], "backendType", "ldb");
- serverRole = ldb_msg_find_attr_as_string(res->msgs[0], "serverRole", "domain controller");
} else {
talloc_free(tmp_ctx);
return ret;
diff --git a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
index 91852f03ad..97016b5f62 100644
--- a/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
+++ b/source4/dsdb/samdb/ldb_modules/simple_ldap_map.c
@@ -822,7 +822,6 @@ static int entryuuid_sequence_number(struct ldb_module *module, struct ldb_reque
struct ldb_context *ldb;
int ret;
struct map_private *map_private;
- struct entryuuid_private *entryuuid_private;
unsigned long long seq_num = 0;
struct ldb_request *search_req;
@@ -843,8 +842,6 @@ static int entryuuid_sequence_number(struct ldb_module *module, struct ldb_reque
map_private = talloc_get_type(ldb_module_get_private(module), struct map_private);
- entryuuid_private = talloc_get_type(map_private->caller_private, struct entryuuid_private);
-
/* All this to get the DN of the parition, so we can search the right thing */
partition_ctrl = ldb_request_get_control(req, DSDB_CONTROL_CURRENT_PARTITION_OID);
if (!partition_ctrl) {
diff --git a/source4/dsdb/samdb/ldb_modules/subtree_rename.c b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
index 2b13e5533d..ee787d19e4 100644
--- a/source4/dsdb/samdb/ldb_modules/subtree_rename.c
+++ b/source4/dsdb/samdb/ldb_modules/subtree_rename.c
@@ -52,10 +52,8 @@ struct subtree_rename_context {
static struct subtree_rename_context *subren_ctx_init(struct ldb_module *module,
struct ldb_request *req)
{
- struct ldb_context *ldb;
struct subtree_rename_context *ac;
- ldb = ldb_module_get_ctx(module);
ac = talloc_zero(req, struct subtree_rename_context);
if (ac == NULL) {