diff options
Diffstat (limited to 'modules/pam_pwhistory/pam_pwhistory.c')
-rw-r--r-- | modules/pam_pwhistory/pam_pwhistory.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/pam_pwhistory/pam_pwhistory.c b/modules/pam_pwhistory/pam_pwhistory.c index 5a7fb811..98ddffce 100644 --- a/modules/pam_pwhistory/pam_pwhistory.c +++ b/modules/pam_pwhistory/pam_pwhistory.c @@ -141,7 +141,7 @@ run_save_helper(pam_handle_t *pamh, const char *user, args[0] = (char *)PWHISTORY_HELPER; args[1] = (char *)"save"; args[2] = (char *)user; - args[3] = (char *)filename; + args[3] = (char *)((filename != NULL) ? filename : ""); DIAG_POP_IGNORE_CAST_QUAL; if (asprintf(&args[4], "%d", howmany) < 0 || asprintf(&args[5], "%d", debug) < 0) @@ -228,7 +228,7 @@ run_check_helper(pam_handle_t *pamh, const char *user, args[0] = (char *)PWHISTORY_HELPER; args[1] = (char *)"check"; args[2] = (char *)user; - args[3] = (char *)filename; + args[3] = (char *)((filename != NULL) ? filename : ""); DIAG_POP_IGNORE_CAST_QUAL; if (asprintf(&args[4], "%d", debug) < 0) { |