From 114dfef6d3bfdb31b2b67a72caa000835eaa7116 Mon Sep 17 00:00:00 2001 From: Jakub Jelen Date: Mar 24 2015 09:39:00 +0000 Subject: Make pam_ssh_agent compile with current ssh --- diff --git a/pam_ssh_agent-rmheaders b/pam_ssh_agent-rmheaders index 5f036cc..a0c1872 100644 --- a/pam_ssh_agent-rmheaders +++ b/pam_ssh_agent-rmheaders @@ -1,5 +1,4 @@ atomicio.h -authfd.h buffer.h cipher.h compat.h diff --git a/pam_ssh_agent_auth-0.9.3-build.patch b/pam_ssh_agent_auth-0.9.3-build.patch index 40ab19d..4f75740 100644 --- a/pam_ssh_agent_auth-0.9.3-build.patch +++ b/pam_ssh_agent_auth-0.9.3-build.patch @@ -176,4 +176,25 @@ diff -up pam_ssh_agent_auth-0.9.3/Makefile.in.psaa-build pam_ssh_agent_auth-0.9. $(MANPAGES): $(MANPAGES_IN) pod2man --section=8 --release=v0.8 --name=pam_ssh_agent_auth --official --center "PAM" pam_ssh_agent_auth.pod > pam_ssh_agent_auth.8 -diff -up pam_ssh_agent_auth-0.9.3/pam_user_authorized_keys.c.psaa-build pam_ssh_agent_auth-0.9.3/pam_user_authorized_keys.c +diff --git pam_ssh_agent_auth-0.9.3/iterate_ssh_agent_keys.c.psaa-build pam_ssh_agent_auth-0.9.3/iterate_ssh_agent_keys.c +index e2c5777..9b8b863 100644 +--- pam_ssh_agent_auth-0.9.3/iterate_ssh_agent_keys.c.psaa-build ++++ pam_ssh_agent_auth-0.9.3/iterate_ssh_agent_keys.c +@@ -58,7 +58,7 @@ uint8_t session_id_len = 0; + u_char * + session_id2_gen() + { +- char *cookie = NULL; ++ u_char *cookie = NULL; + uint8_t i = 0; + uint32_t rnd = 0; + +@@ -71,7 +71,7 @@ session_id2_gen() + if (i % 4 == 0) { + rnd = arc4random(); + } +- cookie[i] = (char) rnd; ++ cookie[i] = (u_char) rnd; + rnd >>= 8; + } + diff --git a/pam_ssh_agent_auth-0.9.3-fingerprint-hash.patch b/pam_ssh_agent_auth-0.9.3-fingerprint-hash.patch index 6b133ee..02ff081 100644 --- a/pam_ssh_agent_auth-0.9.3-fingerprint-hash.patch +++ b/pam_ssh_agent_auth-0.9.3-fingerprint-hash.patch @@ -15,7 +15,7 @@ index 9555e7e..c17aae6 100644 u_char* -key_fingerprint_raw(const Key *k, enum fp_type dgst_type, -+key_fingerprint_raw(const Key *k, int dgst_type, ++sshkey_fingerprint_raw(const Key *k, int dgst_type, u_int *dgst_raw_length) { const EVP_MD *md = NULL; @@ -37,7 +37,7 @@ index 9555e7e..c17aae6 100644 char * -key_fingerprint(const Key *k, enum fp_type dgst_type, enum fp_rep dgst_rep) -+key_fingerprint(const Key *k, int dgst_type, enum fp_rep dgst_rep) ++sshkey_fingerprint(const Key *k, int dgst_type, enum fp_rep dgst_rep) { char *retval = NULL; u_char *dgst_raw; @@ -58,7 +58,7 @@ index dddcba9..8ba6d87 100644 logit("matching key found: file %s, line %lu", file, linenum); - fp = key_fingerprint(found, SSH_FP_MD5, SSH_FP_HEX); -+ fp = key_fingerprint(found, SSH_DIGEST_MD5, SSH_FP_HEX); ++ fp = sshkey_fingerprint(found, SSH_DIGEST_MD5, SSH_FP_HEX); logit("Found matching %s key: %s", key_type(found), fp); free(fp);