1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2024-11-27 16:00:52 +01:00

Make roundplug PCBID/EAMID verification fail a hard error

This was previously a soft error, and also said "reverting to default"
without actually doing so. We should be forcing correct format.
This commit is contained in:
Will Toohey 2023-06-21 17:51:19 +10:00
parent f4f1a2734d
commit 67de6639ef
4 changed files with 16 additions and 83 deletions

View File

@ -56,7 +56,6 @@ void ddrhook1_config_eamuse_get(
{
char server_url[1024];
char *tmp;
char *tmp2;
memset(config_eamuse, 0, sizeof(struct ddrhook1_config_eamuse));
@ -102,16 +101,8 @@ void ddrhook1_config_eamuse_get(
}
if (!security_id_verify(&config_eamuse->pcbid)) {
tmp = security_id_to_str(
&DDRHOOK1_CONFIG_EAMUSE_DEFAULT_PCBID_VALUE, false);
tmp2 = security_id_to_str(&config_eamuse->pcbid, false);
log_warning(
"PCBID verification of '%s' failed, fallback to default "
"PCBID '%s'",
tmp2,
tmp);
free(tmp);
free(tmp2);
log_fatal("PCBID verification failed");
return;
}
if (!cconfig_util_get_data(
@ -130,15 +121,7 @@ void ddrhook1_config_eamuse_get(
}
if (!security_id_verify(&config_eamuse->eamid)) {
tmp = security_id_to_str(
&DDRHOOK1_CONFIG_EAMUSE_DEFAULT_EAMID_VALUE, false);
tmp2 = security_id_to_str(&config_eamuse->eamid, false);
log_warning(
"EAMID verification of '%s' failed, fallback to default "
"EAMID '%s'",
tmp2,
tmp);
free(tmp);
free(tmp2);
log_fatal("EAMID verification failed");
return;
}
}

View File

@ -68,7 +68,6 @@ void iidxhook_util_config_eamuse_get(
{
char server_url[1024];
char *tmp;
char *tmp2;
memset(config_eamuse, 0, sizeof(struct iidxhook_util_config_eamuse));
@ -127,16 +126,8 @@ void iidxhook_util_config_eamuse_get(
}
if (!security_id_verify(&config_eamuse->pcbid)) {
tmp = security_id_to_str(
&IIDXHOOK_CONFIG_EAMUSE_DEFAULT_PCBID_VALUE, false);
tmp2 = security_id_to_str(&config_eamuse->pcbid, false);
log_warning(
"PCBID verification of '%s' failed, fallback to default "
"PCBID '%s'",
tmp2,
tmp);
free(tmp);
free(tmp2);
log_fatal("PCBID verification failed");
return;
}
if (!cconfig_util_get_data(
@ -155,15 +146,7 @@ void iidxhook_util_config_eamuse_get(
}
if (!security_id_verify(&config_eamuse->eamid)) {
tmp = security_id_to_str(
&IIDXHOOK_CONFIG_EAMUSE_DEFAULT_EAMID_VALUE, false);
tmp2 = security_id_to_str(&config_eamuse->eamid, false);
log_warning(
"EAMID verification of '%s' failed, fallback to default "
"EAMID '%s'",
tmp2,
tmp);
free(tmp);
free(tmp2);
log_fatal("EAMID verification failed");
return;
}
}

View File

@ -102,16 +102,8 @@ void jbhook1_config_eamuse_get(
}
if (!security_id_verify(&config_eamuse->pcbid)) {
tmp = security_id_to_str(
&JBHOOK1_CONFIG_EAMUSE_DEFAULT_PCBID_VALUE, false);
tmp2 = security_id_to_str(&config_eamuse->pcbid, false);
log_warning(
"PCBID verification of '%s' failed, fallback to default "
"PCBID '%s'",
tmp2,
tmp);
free(tmp);
free(tmp2);
log_fatal("PCBID verification failed");
return;
}
if (!cconfig_util_get_data(
@ -130,15 +122,7 @@ void jbhook1_config_eamuse_get(
}
if (!security_id_verify(&config_eamuse->eamid)) {
tmp = security_id_to_str(
&JBHOOK1_CONFIG_EAMUSE_DEFAULT_EAMID_VALUE, false);
tmp2 = security_id_to_str(&config_eamuse->eamid, false);
log_warning(
"EAMID verification of '%s' failed, fallback to default "
"EAMID '%s'",
tmp2,
tmp);
free(tmp);
free(tmp2);
log_fatal("EAMID verification failed");
return;
}
}

View File

@ -57,7 +57,6 @@ void popnhook1_config_eamuse_get(
{
char server_url[1024];
char *tmp;
char *tmp2;
memset(config_eamuse, 0, sizeof(struct popnhook1_config_eamuse));
@ -103,16 +102,8 @@ void popnhook1_config_eamuse_get(
}
if (!security_id_verify(&config_eamuse->pcbid)) {
tmp = security_id_to_str(
&POPNHOOK1_CONFIG_EAMUSE_DEFAULT_PCBID_VALUE, false);
tmp2 = security_id_to_str(&config_eamuse->pcbid, false);
log_warning(
"PCBID verification of '%s' failed, fallback to default "
"PCBID '%s'",
tmp2,
tmp);
free(tmp);
free(tmp2);
log_fatal("PCBID verification failed");
return;
}
if (!cconfig_util_get_data(
@ -131,15 +122,7 @@ void popnhook1_config_eamuse_get(
}
if (!security_id_verify(&config_eamuse->eamid)) {
tmp = security_id_to_str(
&POPNHOOK1_CONFIG_EAMUSE_DEFAULT_EAMID_VALUE, false);
tmp2 = security_id_to_str(&config_eamuse->eamid, false);
log_warning(
"EAMID verification of '%s' failed, fallback to default "
"EAMID '%s'",
tmp2,
tmp);
free(tmp);
free(tmp2);
log_fatal("EAMID verification failed");
return;
}
}