diff --git a/src/pam.c b/src/pam.c index ada4e3e..8e2641d 100644 --- a/src/pam.c +++ b/src/pam.c @@ -53,7 +53,8 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, if (argc > 1) if (!strcmp(argv[0], "-c")) conf_file = (char *)argv[1]; - pusb_conf_init(&opts); + if (!pusb_conf_init(&opts)) + return (PAM_AUTH_ERR); if (!pusb_conf_parse(conf_file, &opts, user, service)) return (PAM_AUTH_ERR); diff --git a/src/pamusb-check.c b/src/pamusb-check.c index b8b8e0b..30a449b 100644 --- a/src/pamusb-check.c +++ b/src/pamusb-check.c @@ -123,7 +123,8 @@ int main(int argc, char **argv) pusb_check_usage(argv[0]); return (1); } - pusb_conf_init(&opts); + if (!pusb_conf_init(&opts)) + return (1); if (!pusb_conf_parse(conf_file, &opts, user, service)) return (1); if (quiet)