summaryrefslogtreecommitdiff
path: root/source3/lib/netapi/group.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-01-18 18:15:49 +0100
committerVolker Lendecke <vl@samba.org>2009-01-18 20:10:06 +0100
commita9542ddcb77f0296cb835d0ae337dc54418c1bf4 (patch)
treee0d020037400f5d6a9a96f6a9125f732f2b4bff5 /source3/lib/netapi/group.c
parent6ffe233f9442792a0e8e52167a01b76eabd83be9 (diff)
downloadsamba-a9542ddcb77f0296cb835d0ae337dc54418c1bf4.tar.gz
samba-a9542ddcb77f0296cb835d0ae337dc54418c1bf4.tar.bz2
samba-a9542ddcb77f0296cb835d0ae337dc54418c1bf4.zip
libnetapi_open_pipe does not need to return cli_state
The user session key is also available in rpccli->auth->user_session_key Guenther, please check! Thanks, Volker
Diffstat (limited to 'source3/lib/netapi/group.c')
-rw-r--r--source3/lib/netapi/group.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/source3/lib/netapi/group.c b/source3/lib/netapi/group.c
index 95c012a7f6..617bde2c9a 100644
--- a/source3/lib/netapi/group.c
+++ b/source3/lib/netapi/group.c
@@ -30,7 +30,6 @@
WERROR NetGroupAdd_r(struct libnetapi_ctx *ctx,
struct NetGroupAdd *r)
{
- struct cli_state *cli = NULL;
struct rpc_pipe_client *pipe_cli = NULL;
NTSTATUS status;
WERROR werr;
@@ -73,7 +72,6 @@ WERROR NetGroupAdd_r(struct libnetapi_ctx *ctx,
werr = libnetapi_open_pipe(ctx, r->in.server_name,
&ndr_table_samr.syntax_id,
- &cli,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -195,10 +193,6 @@ WERROR NetGroupAdd_r(struct libnetapi_ctx *ctx,
&group_handle);
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
@@ -226,7 +220,6 @@ WERROR NetGroupAdd_l(struct libnetapi_ctx *ctx,
WERROR NetGroupDel_r(struct libnetapi_ctx *ctx,
struct NetGroupDel *r)
{
- struct cli_state *cli = NULL;
struct rpc_pipe_client *pipe_cli = NULL;
NTSTATUS status;
WERROR werr;
@@ -250,7 +243,6 @@ WERROR NetGroupDel_r(struct libnetapi_ctx *ctx,
werr = libnetapi_open_pipe(ctx, r->in.server_name,
&ndr_table_samr.syntax_id,
- &cli,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -362,10 +354,6 @@ WERROR NetGroupDel_r(struct libnetapi_ctx *ctx,
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
@@ -393,7 +381,6 @@ WERROR NetGroupDel_l(struct libnetapi_ctx *ctx,
WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
struct NetGroupSetInfo *r)
{
- struct cli_state *cli = NULL;
struct rpc_pipe_client *pipe_cli = NULL;
NTSTATUS status;
WERROR werr;
@@ -421,7 +408,6 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
werr = libnetapi_open_pipe(ctx, r->in.server_name,
&ndr_table_samr.syntax_id,
- &cli,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -547,10 +533,6 @@ WERROR NetGroupSetInfo_r(struct libnetapi_ctx *ctx,
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
@@ -639,7 +621,6 @@ static WERROR map_group_info_to_buffer(TALLOC_CTX *mem_ctx,
WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx,
struct NetGroupGetInfo *r)
{
- struct cli_state *cli = NULL;
struct rpc_pipe_client *pipe_cli = NULL;
NTSTATUS status;
WERROR werr;
@@ -662,7 +643,6 @@ WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx,
werr = libnetapi_open_pipe(ctx, r->in.server_name,
&ndr_table_samr.syntax_id,
- &cli,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -732,10 +712,6 @@ WERROR NetGroupGetInfo_r(struct libnetapi_ctx *ctx,
goto done;
}
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
@@ -763,7 +739,6 @@ WERROR NetGroupGetInfo_l(struct libnetapi_ctx *ctx,
WERROR NetGroupAddUser_r(struct libnetapi_ctx *ctx,
struct NetGroupAddUser *r)
{
- struct cli_state *cli = NULL;
struct rpc_pipe_client *pipe_cli = NULL;
NTSTATUS status;
WERROR werr;
@@ -784,7 +759,6 @@ WERROR NetGroupAddUser_r(struct libnetapi_ctx *ctx,
werr = libnetapi_open_pipe(ctx, r->in.server_name,
&ndr_table_samr.syntax_id,
- &cli,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -859,10 +833,6 @@ WERROR NetGroupAddUser_r(struct libnetapi_ctx *ctx,
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
@@ -890,7 +860,6 @@ WERROR NetGroupAddUser_l(struct libnetapi_ctx *ctx,
WERROR NetGroupDelUser_r(struct libnetapi_ctx *ctx,
struct NetGroupDelUser *r)
{
- struct cli_state *cli = NULL;
struct rpc_pipe_client *pipe_cli = NULL;
NTSTATUS status;
WERROR werr;
@@ -911,7 +880,6 @@ WERROR NetGroupDelUser_r(struct libnetapi_ctx *ctx,
werr = libnetapi_open_pipe(ctx, r->in.server_name,
&ndr_table_samr.syntax_id,
- &cli,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -985,10 +953,6 @@ WERROR NetGroupDelUser_r(struct libnetapi_ctx *ctx,
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
@@ -1166,7 +1130,6 @@ static WERROR convert_samr_disp_groups_to_GROUP_INFO_buffer(TALLOC_CTX *mem_ctx,
WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx,
struct NetGroupEnum *r)
{
- struct cli_state *cli = NULL;
struct rpc_pipe_client *pipe_cli = NULL;
struct policy_handle connect_handle;
struct dom_sid2 *domain_sid = NULL;
@@ -1195,7 +1158,6 @@ WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx,
werr = libnetapi_open_pipe(ctx, r->in.server_name,
&ndr_table_samr.syntax_id,
- &cli,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1260,10 +1222,6 @@ WERROR NetGroupEnum_r(struct libnetapi_ctx *ctx,
}
done:
- if (!cli) {
- return werr;
- }
-
/* if last query */
if (NT_STATUS_IS_OK(status) ||
NT_STATUS_IS_ERR(status)) {
@@ -1294,7 +1252,6 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
{
/* FIXME: this call needs to cope with large replies */
- struct cli_state *cli = NULL;
struct rpc_pipe_client *pipe_cli = NULL;
struct policy_handle connect_handle, domain_handle, group_handle;
struct lsa_String lsa_account_name;
@@ -1331,7 +1288,6 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
werr = libnetapi_open_pipe(ctx, r->in.server_name,
&ndr_table_samr.syntax_id,
- &cli,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1419,10 +1375,6 @@ WERROR NetGroupGetUsers_r(struct libnetapi_ctx *ctx,
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
@@ -1450,7 +1402,6 @@ WERROR NetGroupGetUsers_l(struct libnetapi_ctx *ctx,
WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx,
struct NetGroupSetUsers *r)
{
- struct cli_state *cli = NULL;
struct rpc_pipe_client *pipe_cli = NULL;
struct policy_handle connect_handle, domain_handle, group_handle;
struct lsa_String lsa_account_name;
@@ -1494,7 +1445,6 @@ WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx,
werr = libnetapi_open_pipe(ctx, r->in.server_name,
&ndr_table_samr.syntax_id,
- &cli,
&pipe_cli);
if (!W_ERROR_IS_OK(werr)) {
goto done;
@@ -1665,10 +1615,6 @@ WERROR NetGroupSetUsers_r(struct libnetapi_ctx *ctx,
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}