summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-06-16 11:03:31 +0200
committerGünther Deschner <gd@samba.org>2010-06-16 12:15:24 +0200
commit1f1c04010a55e67d8dc2110276eed4cf2a8a0afa (patch)
treeb9caf6f8c05ff145caf58c0fbd0c2c9bfb5954d8
parent14f2525f9e72edffbc0530d3aa20a5a9b80b2ce2 (diff)
downloadsamba-1f1c04010a55e67d8dc2110276eed4cf2a8a0afa.tar.gz
samba-1f1c04010a55e67d8dc2110276eed4cf2a8a0afa.tar.bz2
samba-1f1c04010a55e67d8dc2110276eed4cf2a8a0afa.zip
s4-smbtorture: only pull info when status code indicates success in smbcli_rap_netprintqgetinfo().
Guenther
-rw-r--r--source3/auth/auth_winbind.c14
-rw-r--r--source4/torture/rap/rap.c8
2 files changed, 16 insertions, 6 deletions
diff --git a/source3/auth/auth_winbind.c b/source3/auth/auth_winbind.c
index beaba7d4c0..b111a2ae75 100644
--- a/source3/auth/auth_winbind.c
+++ b/source3/auth/auth_winbind.c
@@ -43,7 +43,7 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context,
return NT_STATUS_INVALID_PARAMETER;
}
- DEBUG(10, ("Check auth for: [%s]", user_info->mapped.account_name));
+ DEBUG(10, ("Check auth for: [%s]\n", user_info->mapped.account_name));
if (!auth_context) {
DEBUG(3,("Password for user %s cannot be checked because we have no auth_info to get the challenge from.\n",
@@ -73,9 +73,17 @@ static NTSTATUS check_winbind_security(const struct auth_context *auth_context,
sizeof(params.password.response.challenge));
params.password.response.nt_length = user_info->nt_resp.length;
- params.password.response.nt_data = user_info->nt_resp.data;
+ if (params.password.response.nt_length) {
+ params.password.response.nt_data = user_info->nt_resp.data;
+ } else {
+ params.password.response.nt_data = NULL;
+ }
params.password.response.lm_length = user_info->lm_resp.length;
- params.password.response.lm_data = user_info->lm_resp.data;
+ if (params.password.response.lm_length) {
+ params.password.response.lm_data = user_info->lm_resp.data;
+ } else {
+ params.password.response.lm_data = NULL;
+ }
/* we are contacting the privileged pipe */
become_root();
diff --git a/source4/torture/rap/rap.c b/source4/torture/rap/rap.c
index 33d67156a3..34036f0ae7 100644
--- a/source4/torture/rap/rap.c
+++ b/source4/torture/rap/rap.c
@@ -719,10 +719,12 @@ NTSTATUS smbcli_rap_netprintqgetinfo(struct smbcli_tree *tree,
NDR_GOTO(ndr_pull_uint16(call->ndr_pull_param, NDR_SCALARS, &r->out.convert));
NDR_GOTO(ndr_pull_uint16(call->ndr_pull_param, NDR_SCALARS, &r->out.available));
- call->ndr_pull_data->relative_rap_convert = r->out.convert;
+ if (r->out.status == 0) {
+ call->ndr_pull_data->relative_rap_convert = r->out.convert;
- NDR_GOTO(ndr_pull_set_switch_value(call->ndr_pull_data, &r->out.info, r->in.level));
- NDR_GOTO(ndr_pull_rap_printq_info(call->ndr_pull_data, NDR_SCALARS|NDR_BUFFERS, &r->out.info));
+ NDR_GOTO(ndr_pull_set_switch_value(call->ndr_pull_data, &r->out.info, r->in.level));
+ NDR_GOTO(ndr_pull_rap_printq_info(call->ndr_pull_data, NDR_SCALARS|NDR_BUFFERS, &r->out.info));
+ }
if (DEBUGLEVEL >= 10) {
NDR_PRINT_OUT_DEBUG(rap_NetPrintQGetInfo, r);