Use the talloc context passed into all modules.
Remove one more talloc_autofree_context().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
struct auth_user_info_dc **user_info_dc,
uint8_t *pauthoritative);
NTSTATUS auth4_init(void);
-NTSTATUS auth_register(const struct auth_operations *ops);
+NTSTATUS auth_register(TALLOC_CTX *mem_ctx, const struct auth_operations *ops);
NTSTATUS server_service_auth_init(TALLOC_CTX *ctx);
NTSTATUS authenticate_ldap_simple_bind(TALLOC_CTX *mem_ctx,
struct tevent_context *ev,
The 'name' can be later used by other backends to find the operations
structure for this backend.
*/
-_PUBLIC_ NTSTATUS auth_register(const struct auth_operations *ops)
+_PUBLIC_ NTSTATUS auth_register(TALLOC_CTX *mem_ctx,
+ const struct auth_operations *ops)
{
struct auth_operations *new_ops;
return NT_STATUS_OBJECT_NAME_COLLISION;
}
- backends = talloc_realloc(talloc_autofree_context(), backends,
+ backends = talloc_realloc(mem_ctx, backends,
struct auth_backend, num_backends+1);
NT_STATUS_HAVE_NO_MEMORY(backends);
{
NTSTATUS ret;
- ret = auth_register(&anonymous_auth_ops);
+ ret = auth_register(ctx, &anonymous_auth_ops);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(0,("Failed to register 'anonymous' auth backend!\n"));
return ret;
{
NTSTATUS ret;
- ret = auth_register(&name_to_ntstatus_auth_ops);
+ ret = auth_register(ctx, &name_to_ntstatus_auth_ops);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(0,("Failed to register 'name_to_ntstatus' auth backend!\n"));
return ret;
{
NTSTATUS ret;
- ret = auth_register(&sam_ops);
+ ret = auth_register(ctx, &sam_ops);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(0,("Failed to register 'sam' auth backend!\n"));
return ret;
}
- ret = auth_register(&sam_ignoredomain_ops);
+ ret = auth_register(ctx, &sam_ignoredomain_ops);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(0,("Failed to register 'sam_ignoredomain' auth backend!\n"));
return ret;
}
- ret = auth_register(&sam_failtrusts_ops);
+ ret = auth_register(ctx, &sam_failtrusts_ops);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(0,("Failed to register 'sam_failtrusts' auth backend!\n"));
return ret;
{
NTSTATUS ret;
- ret = auth_register(&unix_ops);
+ ret = auth_register(ctx, &unix_ops);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(0,("Failed to register unix auth backend!\n"));
return ret;
{
NTSTATUS ret;
- ret = auth_register(&winbind_ops);
+ ret = auth_register(ctx, &winbind_ops);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(0,("Failed to register 'winbind' auth backend!\n"));
return ret;
}
- ret = auth_register(&winbind_rodc_ops);
+ ret = auth_register(ctx, &winbind_rodc_ops);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(0,("Failed to register 'winbind_rodc' auth backend!\n"));
return ret;
}
- ret = auth_register(&winbind_wbclient_ops);
+ ret = auth_register(ctx, &winbind_wbclient_ops);
if (!NT_STATUS_IS_OK(ret)) {
DEBUG(0,("Failed to register 'winbind_wbclient' auth backend!\n"));
return ret;