r->out.return_authenticator = NULL;
status = dcerpc_netr_LogonSamLogon_r(samlogon_state->p->binding_handle,
samlogon_state->mem_ctx, r);
+ if (!NT_STATUS_IS_OK(status)) {
+ if (error_string) {
+ *error_string = strdup(nt_errstr(status));
+ }
+ return status;
+ }
if (!r->out.return_authenticator ||
!netlogon_creds_client_check(samlogon_state->creds, &r->out.return_authenticator->cred)) {
d_printf("Credential chaining failed\n");
}
- if (!NT_STATUS_IS_OK(status)) {
+ if (!NT_STATUS_IS_OK(r->out.result)) {
if (error_string) {
- *error_string = strdup(nt_errstr(status));
+ *error_string = strdup(nt_errstr(r->out.result));
}
- return status;
+ return r->out.result;
}
validation_level = r->in.validation_level;
}
return status;
}
+ if (!NT_STATUS_IS_OK(r_ex->out.result)) {
+ if (error_string) {
+ *error_string = strdup(nt_errstr(r_ex->out.result));
+ }
+ return r_ex->out.result;
+ }
validation_level = r_ex->in.validation_level;
r_flags->out.return_authenticator = NULL;
status = dcerpc_netr_LogonSamLogonWithFlags_r(samlogon_state->p->binding_handle,
samlogon_state->mem_ctx, r_flags);
+ if (!NT_STATUS_IS_OK(status)) {
+ if (error_string) {
+ *error_string = strdup(nt_errstr(status));
+ }
+ return status;
+ }
if (!r_flags->out.return_authenticator ||
!netlogon_creds_client_check(samlogon_state->creds, &r_flags->out.return_authenticator->cred)) {
d_printf("Credential chaining failed\n");
}
- if (!NT_STATUS_IS_OK(status)) {
+ if (!NT_STATUS_IS_OK(r_flags->out.result)) {
if (error_string) {
- *error_string = strdup(nt_errstr(status));
+ *error_string = strdup(nt_errstr(r_flags->out.result));
}
- return status;
+ return r_flags->out.result;
}
validation_level = r_flags->in.validation_level;
d_printf("Testing netr_LogonSamLogonWithFlags '%s' (Interactive Logon)\n", comment);
status = dcerpc_netr_LogonSamLogonWithFlags_r(b, fn_ctx, &r);
+ if (!NT_STATUS_IS_OK(status)) {
+ d_printf("%s: netr_LogonSamLogonWithFlags - %s\n",
+ __location__, nt_errstr(status));
+ return false;
+ }
if (!r.out.return_authenticator
|| !netlogon_creds_client_check(creds, &r.out.return_authenticator->cred)) {
d_printf("Credential chaining failed\n");
talloc_free(fn_ctx);
- if (!NT_STATUS_EQUAL(expected_error, status)) {
+ if (!NT_STATUS_EQUAL(expected_error, r.out.result)) {
d_printf("[%s]\\[%s] netr_LogonSamLogonWithFlags - expected %s got %s\n",
- account_domain, account_name, nt_errstr(expected_error), nt_errstr(status));
+ account_domain, account_name, nt_errstr(expected_error), nt_errstr(r.out.result));
return false;
}
ret = false;
goto failed;
}
+ if (!NT_STATUS_IS_OK(s.out.result)) {
+ printf("SetUserInfo (list of workstations) failed - %s\n", nt_errstr(s.out.result));
+ ret = false;
+ goto failed;
+ }
user_ctx_wrong_time
= torture_create_testuser(torture, TEST_USER_NAME_WRONG_TIME,
ret = false;
goto failed;
}
+ if (!NT_STATUS_IS_OK(s.out.result)) {
+ printf("SetUserInfo (list of workstations) failed - %s\n", nt_errstr(s.out.result));
+ ret = false;
+ goto failed;
+ }
status = torture_rpc_binding(torture, &b);
if (!NT_STATUS_IS_OK(status)) {