summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_samr.c36
1 files changed, 33 insertions, 3 deletions
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,