diff options
author | Volker Lendecke <vlendec@samba.org> | 2003-06-12 16:21:22 +0000 |
---|---|---|
committer | Volker Lendecke <vlendec@samba.org> | 2003-06-12 16:21:22 +0000 |
commit | e1f4d66b73fdad3c66b5063148a0c4adced19549 (patch) | |
tree | 2ef1d3decb8d1ed937b3b972d7c88f8eb177e088 /source3/rpc_client | |
parent | c8667b03f893fe1f8e19e63433a758c137097375 (diff) | |
download | samba-e1f4d66b73fdad3c66b5063148a0c4adced19549.tar.gz samba-e1f4d66b73fdad3c66b5063148a0c4adced19549.tar.bz2 samba-e1f4d66b73fdad3c66b5063148a0c4adced19549.zip |
Fix for bug#3. Show comments when doing 'net group -l'.
Volker
(This used to be commit e5664adc07307a066c5312d9224cef2c69a40f77)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_samr.c | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c index 3f75a00a35..635b7e7135 100644 --- a/source3/rpc_client/cli_samr.c +++ b/source3/rpc_client/cli_samr.c @@ -935,6 +935,57 @@ NTSTATUS cli_samr_open_alias(struct cli_state *cli, TALLOC_CTX *mem_ctx, return result; } +/* Query alias info */ + +NTSTATUS cli_samr_query_alias_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, + POLICY_HND *alias_pol, uint16 switch_value, + ALIAS_INFO_CTR *ctr) +{ + prs_struct qbuf, rbuf; + SAMR_Q_QUERY_ALIASINFO q; + SAMR_R_QUERY_ALIASINFO r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + DEBUG(10,("cli_samr_query_dom_info\n")); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Initialise parse structures */ + + prs_init(&qbuf, MAX_PDU_FRAG_LEN, mem_ctx, MARSHALL); + prs_init(&rbuf, 0, mem_ctx, UNMARSHALL); + + /* Marshall data and send request */ + + init_samr_q_query_aliasinfo(&q, alias_pol, switch_value); + + if (!samr_io_q_query_aliasinfo("", &q, &qbuf, 0) || + !rpc_api_pipe_req(cli, SAMR_QUERY_ALIASINFO, &qbuf, &rbuf)) { + goto done; + } + + /* Unmarshall response */ + + if (!samr_io_r_query_aliasinfo("", &r, &rbuf, 0)) { + goto done; + } + + /* Return output parameters */ + + if (!NT_STATUS_IS_OK(result = r.status)) { + goto done; + } + + *ctr = r.ctr; + + done: + prs_mem_free(&qbuf); + prs_mem_free(&rbuf); + + return result; +} + /* Query domain info */ NTSTATUS cli_samr_query_dom_info(struct cli_state *cli, TALLOC_CTX *mem_ctx, |