if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
DBG_ERR("can't parse the PAC ATTRIBUTES_INFO: %s\n", nt_errstr(nt_status));
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
if (pac_attrs.attributes_info.flags & (PAC_ATTRIBUTE_FLAG_PAC_WAS_GIVEN_IMPLICITLY
if (!NT_STATUS_IS_OK(status)) {
talloc_free(mem_ctx);
- return EINVAL;
+ return map_errno_from_nt_status(status);
}
rodc_krbtgt_number = ldb_msg_find_attr_as_int(p->msg, "msDS-SecondaryKrbTgtNumber", -1);
DBG_ERR("authsam_update_user_info_dc failed: %s\n",
nt_errstr(nt_status));
- ret = EINVAL;
+ ret = map_errno_from_nt_status(nt_status);
goto out;
}
} else {
nt_status = ndr_map_error2ntstatus(ndr_err);
DBG_ERR("can't parse the PAC REQUESTER_SID: %s\n", nt_errstr(nt_status));
talloc_free(tmp_ctx);
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
*sid = info.requester_sid.sid;
&domain_group->domain_sid,
&rid);
if (!NT_STATUS_IS_OK(status)) {
- return EINVAL;
+ return map_errno_from_nt_status(status);
}
} else {
status = dom_sid_split_rid(NULL,
NULL,
&rid);
if (!NT_STATUS_IS_OK(status)) {
- return EINVAL;
+ return map_errno_from_nt_status(status);
}
}
true, /* This user was authenticated */
&device_info_dc);
if (!NT_STATUS_IS_OK(nt_status)) {
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
num_existing_sids = device_info_dc->num_sids;
samdb,
device_info_dc);
if (!NT_STATUS_IS_OK(nt_status)) {
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
for (i = num_existing_sids; i < device_info_dc->num_sids; ++i) {
NTSTATUS nt_status = ndr_map_error2ntstatus(ndr_err);
DBG_WARNING("PAC_DEVICE_INFO (presig) push failed: %s\n",
nt_errstr(nt_status));
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
return 0;
DBG_ERR("can't parse device PAC LOGON_INFO: %s\n",
nt_errstr(nt_status));
talloc_free(frame);
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
/*
if (!NT_STATUS_IS_OK(nt_status)) {
DBG_ERR("samba_kdc_get_claims_blob failed: %s\n",
nt_errstr(nt_status));
- code = EINVAL;
+ code = map_errno_from_nt_status(nt_status);
goto done;
}
if (!NT_STATUS_IS_OK(nt_status)) {
DBG_ERR("update delegation info blob failed: %s\n",
nt_errstr(nt_status));
- code = EINVAL;
+ code = map_errno_from_nt_status(nt_status);
goto done;
}
}
DBG_ERR("samba_get_logon_info_pac_blob failed: %s\n",
nt_errstr(nt_status));
- code = EINVAL;
+ code = map_errno_from_nt_status(nt_status);
goto done;
}
if (!NT_STATUS_IS_OK(nt_status)) {
DBG_ERR("samba_kdc_get_claims_blob failed: %s\n",
nt_errstr(nt_status));
- code = EINVAL;
+ code = map_errno_from_nt_status(nt_status);
goto done;
}
}
true, /* This user was authenticated */
&device_info);
if (!NT_STATUS_IS_OK(nt_status)) {
- code = EINVAL;
+ code = map_errno_from_nt_status(nt_status);
goto out;
}
samdb,
device_info);
if (!NT_STATUS_IS_OK(nt_status)) {
- code = EINVAL;
+ code = map_errno_from_nt_status(nt_status);
goto out;
}
} else {
&user_info_dc);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
/*
&logon_blob);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
if (cred_ndr_ptr != NULL) {
cred_ndr_ptr);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
}
&upn_blob);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
if (is_krbtgt) {
&pac_attrs_blob);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
nt_status = samba_kdc_get_requester_sid_blob(mem_ctx,
&requester_sid_blob);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
}
&client_claims_blob);
if (!NT_STATUS_IS_OK(nt_status)) {
talloc_free(mem_ctx);
- return EINVAL;
+ return map_errno_from_nt_status(nt_status);
}
if (pk_reply_key != NULL && cred_ndr != NULL) {