summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-06-09 14:39:55 +0200
committerAndreas Schneider <asn@samba.org>2010-07-05 15:59:07 +0200
commit54e8f8bd578ce6c0df30eecde471190ee700dc32 (patch)
tree98714d62cefcea665367d4fae1fadb4a296fe7b0
parentde7990bca160c1f54ce4c1ad848b2761b77c5960 (diff)
downloadsamba-54e8f8bd578ce6c0df30eecde471190ee700dc32.tar.gz
samba-54e8f8bd578ce6c0df30eecde471190ee700dc32.tar.bz2
samba-54e8f8bd578ce6c0df30eecde471190ee700dc32.zip
s3-winbind: Implemented samr backend function common_lockout_policy.
-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,