From 54e8f8bd578ce6c0df30eecde471190ee700dc32 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 9 Jun 2010 14:39:55 +0200 Subject: s3-winbind: Implemented samr backend function common_lockout_policy. --- source3/winbindd/winbindd_samr.c | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) (limited to 'source3') diff --git a/source3/winbindd/winbindd_samr.c b/source3/winbindd/winbindd_samr.c index ef825fdab4..12fe447bfe 100644 --- a/source3/winbindd/winbindd_samr.c +++ b/source3/winbindd/winbindd_samr.c @@ -1125,10 +1125,40 @@ error: static NTSTATUS common_lockout_policy(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx, - struct samr_DomInfo12 *policy) + struct samr_DomInfo12 *lockout_policy) { - /* TODO FIXME */ - return NT_STATUS_NOT_IMPLEMENTED; + struct rpc_pipe_client *samr_pipe; + struct policy_handle dom_pol; + union samr_DomainInfo *info = NULL; + TALLOC_CTX *tmp_ctx; + NTSTATUS status; + + DEBUG(3,("samr: lockout policy\n")); + + tmp_ctx = talloc_stackframe(); + if (tmp_ctx == NULL) { + return NT_STATUS_NO_MEMORY; + } + + status = open_internal_samr_conn(tmp_ctx, domain, &samr_pipe, &dom_pol); + if (!NT_STATUS_IS_OK(status)) { + goto error; + } + + status = rpccli_samr_QueryDomainInfo(samr_pipe, + mem_ctx, + &dom_pol, + 12, + &info); + if (!NT_STATUS_IS_OK(status)) { + goto error; + } + + *lockout_policy = info->info12; + +error: + TALLOC_FREE(tmp_ctx); + return status; } static NTSTATUS common_password_policy(struct winbindd_domain *domain, -- cgit