1
0
mirror of https://github.com/djhackersdev/bemanitools.git synced 2024-11-30 17:24:30 +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 server_url[1024];
char *tmp; char *tmp;
char *tmp2;
memset(config_eamuse, 0, sizeof(struct ddrhook1_config_eamuse)); 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)) { if (!security_id_verify(&config_eamuse->pcbid)) {
tmp = security_id_to_str( log_fatal("PCBID verification failed");
&DDRHOOK1_CONFIG_EAMUSE_DEFAULT_PCBID_VALUE, false); return;
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);
} }
if (!cconfig_util_get_data( if (!cconfig_util_get_data(
@ -130,15 +121,7 @@ void ddrhook1_config_eamuse_get(
} }
if (!security_id_verify(&config_eamuse->eamid)) { if (!security_id_verify(&config_eamuse->eamid)) {
tmp = security_id_to_str( log_fatal("EAMID verification failed");
&DDRHOOK1_CONFIG_EAMUSE_DEFAULT_EAMID_VALUE, false); return;
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);
} }
} }

View File

@ -68,7 +68,6 @@ void iidxhook_util_config_eamuse_get(
{ {
char server_url[1024]; char server_url[1024];
char *tmp; char *tmp;
char *tmp2;
memset(config_eamuse, 0, sizeof(struct iidxhook_util_config_eamuse)); 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)) { if (!security_id_verify(&config_eamuse->pcbid)) {
tmp = security_id_to_str( log_fatal("PCBID verification failed");
&IIDXHOOK_CONFIG_EAMUSE_DEFAULT_PCBID_VALUE, false); return;
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);
} }
if (!cconfig_util_get_data( if (!cconfig_util_get_data(
@ -155,15 +146,7 @@ void iidxhook_util_config_eamuse_get(
} }
if (!security_id_verify(&config_eamuse->eamid)) { if (!security_id_verify(&config_eamuse->eamid)) {
tmp = security_id_to_str( log_fatal("EAMID verification failed");
&IIDXHOOK_CONFIG_EAMUSE_DEFAULT_EAMID_VALUE, false); return;
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);
} }
} }

View File

@ -102,16 +102,8 @@ void jbhook1_config_eamuse_get(
} }
if (!security_id_verify(&config_eamuse->pcbid)) { if (!security_id_verify(&config_eamuse->pcbid)) {
tmp = security_id_to_str( log_fatal("PCBID verification failed");
&JBHOOK1_CONFIG_EAMUSE_DEFAULT_PCBID_VALUE, false); return;
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);
} }
if (!cconfig_util_get_data( if (!cconfig_util_get_data(
@ -130,15 +122,7 @@ void jbhook1_config_eamuse_get(
} }
if (!security_id_verify(&config_eamuse->eamid)) { if (!security_id_verify(&config_eamuse->eamid)) {
tmp = security_id_to_str( log_fatal("EAMID verification failed");
&JBHOOK1_CONFIG_EAMUSE_DEFAULT_EAMID_VALUE, false); return;
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);
} }
} }

View File

@ -57,7 +57,6 @@ void popnhook1_config_eamuse_get(
{ {
char server_url[1024]; char server_url[1024];
char *tmp; char *tmp;
char *tmp2;
memset(config_eamuse, 0, sizeof(struct popnhook1_config_eamuse)); 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)) { if (!security_id_verify(&config_eamuse->pcbid)) {
tmp = security_id_to_str( log_fatal("PCBID verification failed");
&POPNHOOK1_CONFIG_EAMUSE_DEFAULT_PCBID_VALUE, false); return;
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);
} }
if (!cconfig_util_get_data( if (!cconfig_util_get_data(
@ -131,15 +122,7 @@ void popnhook1_config_eamuse_get(
} }
if (!security_id_verify(&config_eamuse->eamid)) { if (!security_id_verify(&config_eamuse->eamid)) {
tmp = security_id_to_str( log_fatal("EAMID verification failed");
&POPNHOOK1_CONFIG_EAMUSE_DEFAULT_EAMID_VALUE, false); return;
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);
} }
} }