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;
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;
&group_handle);
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
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;
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;
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
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;
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;
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
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;
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;
goto done;
}
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
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;
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;
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
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;
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;
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
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;
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;
}
done:
- if (!cli) {
- return werr;
- }
-
/* if last query */
if (NT_STATUS_IS_OK(status) ||
NT_STATUS_IS_ERR(status)) {
{
/* 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;
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;
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}
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;
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;
werr = WERR_OK;
done:
- if (!cli) {
- return werr;
- }
-
if (is_valid_policy_hnd(&group_handle)) {
rpccli_samr_Close(pipe_cli, ctx, &group_handle);
}