From 6a6f2463f6a3f3a5828b9df8cbc9594e3bc5189c Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 16 Feb 2006 13:18:17 +0000 Subject: r13522: Add SAMR_GET_USRDOM_PWINFO client-side. Guenther (This used to be commit 290a581b7567eab82b18fbadae9aa2ab29e95069) --- source3/rpc_client/cli_samr.c | 44 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'source3/rpc_client/cli_samr.c') diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index 8c59d2d3af..dd9a4ce67e 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -1880,6 +1880,50 @@ NTSTATUS rpccli_samr_get_dom_pwinfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem return result; } +/* Get domain password info */ + +NTSTATUS rpccli_samr_get_usrdom_pwinfo(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *pol, uint16 *min_pwd_length, + uint32 *password_properties, uint32 *unknown1) +{ + prs_struct qbuf, rbuf; + SAMR_Q_GET_USRDOM_PWINFO q; + SAMR_R_GET_USRDOM_PWINFO r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + DEBUG(10,("cli_samr_get_usrdom_pwinfo\n")); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Marshall data and send request */ + + init_samr_q_get_usrdom_pwinfo(&q, pol); + + CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_GET_USRDOM_PWINFO, + q, r, + qbuf, rbuf, + samr_io_q_get_usrdom_pwinfo, + samr_io_r_get_usrdom_pwinfo, + NT_STATUS_UNSUCCESSFUL); + + /* Return output parameters */ + + result = r.status; + + if (NT_STATUS_IS_OK(result)) { + if (min_pwd_length) + *min_pwd_length = r.min_pwd_length; + if (password_properties) + *password_properties = r.password_properties; + if (unknown1) + *unknown1 = r.unknown_1; + } + + return result; +} + + /* Lookup Domain Name */ NTSTATUS rpccli_samr_lookup_domain(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, -- cgit