diff options
author | Andrew Bartlett <abartlet@samba.org> | 2010-03-16 14:52:39 +1100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2010-03-16 19:26:03 +1100 |
commit | 2de07761e071ccf09c0ea9e0fdc6a61303356549 (patch) | |
tree | 8d95f00365a32c81e001768fc2aa0aa8c866accb /source4/dsdb/samdb/ldb_modules/kludge_acl.c | |
parent | bf0b4d7ee3f52f77d706ccea12abb2f033b4abd9 (diff) | |
download | samba-2de07761e071ccf09c0ea9e0fdc6a61303356549.tar.gz samba-2de07761e071ccf09c0ea9e0fdc6a61303356549.tar.bz2 samba-2de07761e071ccf09c0ea9e0fdc6a61303356549.zip |
s4:dsdb Change dsdb_get_schema() callers to use new talloc argument
This choses an appropriate talloc context to attach the schema too,
long enough lived to ensure it does not go away before the operation
compleates.
Andrew Bartlett
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/kludge_acl.c')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/kludge_acl.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c index 3bdcaff2d0..72863adebd 100644 --- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c +++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c @@ -94,7 +94,8 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess { struct ldb_message_element *oc_el; struct ldb_message_element *allowedAttributes; - const struct dsdb_schema *schema = dsdb_get_schema(ldb); + /* We need to ensure that the strings returned are valid for as long as the msg is valid */ + const struct dsdb_schema *schema = dsdb_get_schema(ldb, msg); TALLOC_CTX *mem_ctx; const char **attr_list; unsigned int i; @@ -143,7 +144,9 @@ static int kludge_acl_childClasses(struct ldb_context *ldb, struct ldb_message * { struct ldb_message_element *oc_el; struct ldb_message_element *allowedClasses; - const struct dsdb_schema *schema = dsdb_get_schema(ldb); + + /* We need to ensure that the strings returned are valid for as long as the msg is valid */ + const struct dsdb_schema *schema = dsdb_get_schema(ldb, msg); const struct dsdb_class *sclass; unsigned int i, j; int ret; |