From 14a6c41ca7a3722b33e2208c83fb8b4a009b0ecf Mon Sep 17 00:00:00 2001 From: des Date: Sat, 26 May 2012 17:03:45 +0000 Subject: [PATCH] Passing NULL as a key casues a segfault when loading SSH 1 keys. Use an empty string instead. --- lib/libpam/modules/pam_ssh/pam_ssh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libpam/modules/pam_ssh/pam_ssh.c b/lib/libpam/modules/pam_ssh/pam_ssh.c index ab4990bcbb1..405dd6bbf41 100644 --- a/lib/libpam/modules/pam_ssh/pam_ssh.c +++ b/lib/libpam/modules/pam_ssh/pam_ssh.c @@ -112,7 +112,7 @@ pam_ssh_load_key(const char *dir, const char *kfn, const char *passphrase, * with an empty passphrase, and if the key is not encrypted, * accept only an empty passphrase. */ - key = key_load_private(fn, NULL, &comment); + key = key_load_private(fn, "", &comment); if (key != NULL && !(*passphrase == '\0' && nullok)) { key_free(key); return (NULL); -- 2.45.0