Make pam_ssh_agent compile with current ssh

This commit is contained in:
Jakub Jelen 2015-03-24 08:24:27 +01:00
parent 132f8f8686
commit 114dfef6d3
3 changed files with 25 additions and 5 deletions

View File

@ -1,5 +1,4 @@
atomicio.h
authfd.h
buffer.h
cipher.h
compat.h

View File

@ -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;
}

View File

@ -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);