Add option app-fatal to control if softtoken should abort() on
erroneous input from applications. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22470 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -769,6 +769,22 @@ read_conf_file(const char *fn, CK_USER_TYPE userType, const char *pin)
|
|||||||
if (soft_token.logfile == NULL)
|
if (soft_token.logfile == NULL)
|
||||||
st_logf("failed to open file: %s\n", name);
|
st_logf("failed to open file: %s\n", name);
|
||||||
|
|
||||||
|
} else if (strcasecmp("app-fatal", type) == 0) {
|
||||||
|
char *name;
|
||||||
|
|
||||||
|
name = strtok_r(NULL, "\t", &s);
|
||||||
|
if (name == NULL) {
|
||||||
|
st_logf("argument to app-fatal\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strcmp(name, "true") == 0 || strcmp(name, "on") == 0)
|
||||||
|
soft_token.flags.app_error_fatal = 1;
|
||||||
|
else if (strcmp(name, "false") == 0 || strcmp(name, "off") == 0)
|
||||||
|
soft_token.flags.app_error_fatal = 0;
|
||||||
|
else
|
||||||
|
st_logf("unknown app-fatal: %s\n", name);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
st_logf("unknown type: %s\n", type);
|
st_logf("unknown type: %s\n", type);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user