summaryrefslogtreecommitdiff
path: root/source4/dsdb/common/util.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2013-12-02 15:44:37 +1300
committerStefan Metzmacher <metze@samba.org>2014-04-02 17:12:47 +0200
commitafdd5fbd51b4dbde419da7bc64bab5eaf42a955d (patch)
tree1251bf0b92521cce210b8993e543c6840b61c117 /source4/dsdb/common/util.c
parentc91823028f67a4581d282c15422aab1e7f7f5c87 (diff)
downloadsamba-afdd5fbd51b4dbde419da7bc64bab5eaf42a955d.tar.gz
dsdb: check type with talloc_get_type_abort in samdb_set_password
Change-Id: Ie5b534c70dd87ecf58d6a830e38750ecf16eb855 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/dsdb/common/util.c')
-rw-r--r--source4/dsdb/common/util.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 1bb2fce7e58..9dbdbdd7b29 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -2153,8 +2153,11 @@ NTSTATUS samdb_set_password(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
ret = dsdb_autotransaction_request(ldb, req);
if (req->context != NULL) {
- pwd_stat = talloc_steal(mem_ctx,
- ((struct ldb_control *)req->context)->data);
+ struct ldb_control *control = talloc_get_type_abort(req->context,
+ struct ldb_control);
+ pwd_stat = talloc_get_type_abort(control->data,
+ struct dsdb_control_password_change_status);
+ talloc_steal(mem_ctx, pwd_stat);
}
talloc_free(req);