} else if (NT_STATUS_EQUAL(NT_STATUS_NOT_FOUND, nt_status) && strchr_m(samlogon_state->account_name, '@')) {
return ((break_which == BREAK_NT) || (break_which == BREAK_BOTH) || (break_which == NO_NT));
} else if (!NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status)) {
+ int ret;
+
SAFE_FREE(*error_string);
- asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ ret = asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ if (ret == -1) {
+ *error_string = NULL;
+ }
return false;
} else if (NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status) && !NT_STATUS_IS_OK(nt_status)) {
return true;
}
return false;
} else if (!NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status)) {
+ int ret;
+
SAFE_FREE(*error_string);
- asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ ret = asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ if (ret == -1) {
+ *error_string = NULL;
+ }
return false;
} else if (NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status) && !NT_STATUS_IS_OK(nt_status)) {
return true;
}
return false;
} else if (!NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status)) {
+ int ret;
+
SAFE_FREE(*error_string);
- asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ ret = asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ if (ret == -1) {
+ *error_string = NULL;
+ }
return false;
} else if (NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status) && !NT_STATUS_IS_OK(nt_status)) {
return true;
} else if (NT_STATUS_EQUAL(NT_STATUS_NOT_FOUND, nt_status) && strchr_m(samlogon_state->account_name, '@')) {
return ((break_which == BREAK_NT) || (break_which == BREAK_BOTH) || (break_which == NO_NT));
} else if (!NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status)) {
+ int ret;
+
SAFE_FREE(*error_string);
- asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ ret = asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ if (ret == -1) {
+ *error_string = NULL;
+ }
return false;
} else if (NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status) && !NT_STATUS_IS_OK(nt_status)) {
return true;
} else if (NT_STATUS_EQUAL(NT_STATUS_NOT_FOUND, nt_status) && strchr_m(samlogon_state->account_name, '@')) {
return ((break_which == BREAK_NT) || (break_which == BREAK_BOTH));
} else if (!NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status)) {
+ int ret;
+
SAFE_FREE(*error_string);
- asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ ret = asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ if (ret == -1) {
+ *error_string = NULL;
+ }
return false;
} else if (NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status) && !NT_STATUS_IS_OK(nt_status)) {
return true;
}
return false;
} else if (!NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status)) {
+ int ret;
+
SAFE_FREE(*error_string);
- asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ ret = asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ if (ret == -1) {
+ *error_string = NULL;
+ }
return false;
} else if (NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status) && !NT_STATUS_IS_OK(nt_status)) {
return true;
} else if (NT_STATUS_EQUAL(NT_STATUS_NOT_FOUND, nt_status) && strchr_m(samlogon_state->account_name, '@')) {
return ((break_which == BREAK_NT) || (break_which == BREAK_BOTH) || (break_which == NO_NT));
} else if (!NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status)) {
+ int ret;
+
SAFE_FREE(*error_string);
- asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ ret = asprintf(error_string, "Expected error: %s, got %s", nt_errstr(samlogon_state->expected_error), nt_errstr(nt_status));
+ if (ret == -1) {
+ *error_string = NULL;
+ }
return false;
} else if (NT_STATUS_EQUAL(samlogon_state->expected_error, nt_status) && !NT_STATUS_IS_OK(nt_status)) {
return true;