From: Stefan Metzmacher Date: Mon, 27 Nov 2017 12:48:34 +0000 (+0100) Subject: s4:auth_winbind: remove unused 'winbind_rodc' backend X-Git-Tag: talloc-2.1.11~218 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b72d0b7e57e8094bd8fe0d2c25bba85c372223d;p=thirdparty%2Fsamba.git s4:auth_winbind: remove unused 'winbind_rodc' backend This is no longer useful as the 'winbind' backend also handles the rodc case now. Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source4/auth/ntlm/auth_winbind.c b/source4/auth/ntlm/auth_winbind.c index 018940f4260..40e6bcf7570 100644 --- a/source4/auth/ntlm/auth_winbind.c +++ b/source4/auth/ntlm/auth_winbind.c @@ -49,48 +49,6 @@ static NTSTATUS winbind_want_check(struct auth_method_context *ctx, return NT_STATUS_OK; } -static NTSTATUS winbind_rodc_want_check(struct auth_method_context *ctx, - TALLOC_CTX *mem_ctx, - const struct auth_usersupplied_info *user_info) -{ - int ret; - bool am_rodc; - - if (!user_info->mapped.account_name || !*user_info->mapped.account_name) { - return NT_STATUS_NOT_IMPLEMENTED; - } - - if (ctx->auth_ctx->sam_ctx == NULL) { - DBG_ERR("ctx->auth_ctx->sam_ctx == NULL, don't check.\n"); - return NT_STATUS_NOT_IMPLEMENTED; - } - - ret = samdb_rodc(ctx->auth_ctx->sam_ctx, &am_rodc); - if (ret != LDB_SUCCESS) { - DBG_ERR("samdb_rodc() failed %d %s, don't check.\n", - ret, ldb_errstring(ctx->auth_ctx->sam_ctx)); - return NT_STATUS_NOT_IMPLEMENTED; - } - - if (!am_rodc) { - /* - * We don't support trusts yet and we - * don't want to add them using the - * semi-async irpc call that uses - * a nested event loop. - */ - return NT_STATUS_NOT_IMPLEMENTED; - } - - /* - * We're a RODC, so we forward the request to our winbind. - * As the RODC is not yet production ready anyway, we keep - * the semi-async behavior with nested event loops in order - * to keep autobuild happy. - */ - return NT_STATUS_OK; -} - struct winbind_check_password_state { struct auth_method_context *ctx; const struct auth_usersupplied_info *user_info; @@ -440,13 +398,6 @@ static const struct auth_operations winbind_ops = { .check_password_recv = winbind_check_password_recv }; -static const struct auth_operations winbind_rodc_ops = { - .name = "winbind_rodc", - .want_check = winbind_rodc_want_check, - .check_password_send = winbind_check_password_send, - .check_password_recv = winbind_check_password_recv -}; - static const struct auth_operations winbind_wbclient_ops = { .name = "winbind_wbclient", .want_check = winbind_want_check, @@ -463,12 +414,6 @@ _PUBLIC_ NTSTATUS auth4_winbind_init(TALLOC_CTX *ctx) return ret; } - 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(ctx, &winbind_wbclient_ops); if (!NT_STATUS_IS_OK(ret)) { DEBUG(0,("Failed to register 'winbind_wbclient' auth backend!\n"));