diff options
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_pipe.c | 34 | ||||
-rw-r--r-- | source3/rpc_client/cli_spoolss.c | 2 |
2 files changed, 19 insertions, 17 deletions
diff --git a/source3/rpc_client/cli_pipe.c b/source3/rpc_client/cli_pipe.c index 8c540ee6fd..14ee78202a 100644 --- a/source3/rpc_client/cli_pipe.c +++ b/source3/rpc_client/cli_pipe.c @@ -1067,14 +1067,15 @@ static NTSTATUS create_schannel_auth_rpc_bind_req( struct rpc_pipe_client *cli, /* Use lp_workgroup() if domain not specified */ - if (!cli->domain || !cli->domain[0]) { - cli->domain = talloc_strdup(cli, lp_workgroup()); - if (cli->domain == NULL) { + if (!cli->auth->domain || !cli->auth->domain[0]) { + cli->auth->domain = talloc_strdup(cli, lp_workgroup()); + if (cli->auth->domain == NULL) { return NT_STATUS_NO_MEMORY; } } - init_rpc_auth_schannel_neg(&schannel_neg, cli->domain, global_myname()); + init_rpc_auth_schannel_neg(&schannel_neg, cli->auth->domain, + global_myname()); /* * Now marshall the data into the auth parse_struct. @@ -2235,14 +2236,14 @@ static struct rpc_pipe_client *cli_rpc_pipe_open(struct cli_state *cli, int pipe result->auth->auth_type = PIPE_AUTH_TYPE_NONE; result->auth->auth_level = PIPE_AUTH_LEVEL_NONE; - result->domain = talloc_strdup(result, cli->domain); - result->user_name = talloc_strdup(result, cli->user_name); + result->auth->domain = talloc_strdup(result, cli->domain); + result->auth->user_name = talloc_strdup(result, cli->user_name); result->desthost = talloc_strdup(result, cli->desthost); result->srv_name_slash = talloc_asprintf_strupper_m( result, "\\\\%s", result->desthost); - if ((result->domain == NULL) - || (result->user_name == NULL) + if ((result->auth->domain == NULL) + || (result->auth->user_name == NULL) || (result->desthost == NULL) || (result->srv_name_slash == NULL)) { *perr = NT_STATUS_NO_MEMORY; @@ -2349,13 +2350,14 @@ static struct rpc_pipe_client *cli_rpc_pipe_open_ntlmssp_internal(struct cli_sta result->auth->cli_auth_data_free_func = cli_ntlmssp_auth_free; - TALLOC_FREE(result->domain); - TALLOC_FREE(result->user_name); + TALLOC_FREE(result->auth->domain); + TALLOC_FREE(result->auth->user_name); - result->domain = talloc_strdup(result, domain); - result->user_name = talloc_strdup(result, username); + result->auth->domain = talloc_strdup(result, domain); + result->auth->user_name = talloc_strdup(result, username); - if ((result->domain == NULL) || (result->user_name == NULL)) { + if ((result->auth->domain == NULL) + || (result->auth->user_name == NULL)) { *perr = NT_STATUS_NO_MEMORY; goto err; } @@ -2570,9 +2572,9 @@ struct rpc_pipe_client *cli_rpc_pipe_open_schannel_with_key(struct cli_state *cl return NULL; } - TALLOC_FREE(result->domain); - result->domain = talloc_strdup(result, domain); - if (result->domain == NULL) { + TALLOC_FREE(result->auth->domain); + result->auth->domain = talloc_strdup(result, domain); + if (result->auth->domain == NULL) { TALLOC_FREE(result); *perr = NT_STATUS_NO_MEMORY; return NULL; diff --git a/source3/rpc_client/cli_spoolss.c b/source3/rpc_client/cli_spoolss.c index 823af6fb4f..223a277d4a 100644 --- a/source3/rpc_client/cli_spoolss.c +++ b/source3/rpc_client/cli_spoolss.c @@ -1031,7 +1031,7 @@ WERROR rpccli_spoolss_addprinterex (struct rpc_pipe_client *cli, TALLOC_CTX *mem strupper_m(client); strupper_m(server); - fstrcpy (user, cli->user_name); + fstrcpy (user, cli->auth->user_name); make_spoolss_q_addprinterex( mem_ctx, &in, server, client, user, level, ctr); |