Date: Tue, 19 Jan 2016 14:07:20 -0800 From: John Baldwin <jhb@freebsd.org> To: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= <des@freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r294332 - in head: crypto/openssh crypto/openssh/contrib crypto/openssh/contrib/caldera crypto/openssh/contrib/cygwin crypto/openssh/contrib/redhat crypto/openssh/contrib/suse crypto/op... Message-ID: <1547455.kXYNJo7ADU@ralph.baldwin.cx> In-Reply-To: <201601191828.u0JISNSG087681@repo.freebsd.org> References: <201601191828.u0JISNSG087681@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday, January 19, 2016 06:28:23 PM Dag-Erling Sm=F8rgrav wrote: > Author: des > Date: Tue Jan 19 18:28:23 2016 > New Revision: 294332 > URL: https://svnweb.freebsd.org/changeset/base/294332 >=20 > Log: > Upgrade to OpenSSH 6.8p1. This broke the build of pam_ssh. I am currently build testing an attem= pt at fixing: diff --git lib/libpam/modules/pam_ssh/pam_ssh.c lib/libpam/modules/pam_= ssh/pam_ssh.c index 405dd6b..f2ad6cf 100644 --- lib/libpam/modules/pam_ssh/pam_ssh.c +++ lib/libpam/modules/pam_ssh/pam_ssh.c @@ -321,12 +321,11 @@ pam_ssh_start_agent(pam_handle_t *pamh) static int pam_ssh_add_keys_to_agent(pam_handle_t *pamh) { -=09AuthenticationConnection *ac; =09const struct pam_ssh_key *psk; =09const char **kfn; =09const void *item; =09char **envlist, **env; -=09int pam_err; +=09int fd, pam_err; =20 =09/* switch to PAM environment */ =09envlist =3D environ; @@ -336,7 +335,7 @@ pam_ssh_add_keys_to_agent(pam_handle_t *pamh) =09} =20 =09/* get a connection to the agent */ -=09if ((ac =3D ssh_get_authentication_connection()) =3D=3D NULL) { +=09if (ssh_get_authentication_socket(&fd) !=3D 0) { =09=09openpam_log(PAM_LOG_DEBUG, "failed to connect to the agent"); =09=09pam_err =3D PAM_SYSTEM_ERR; =09=09goto end; @@ -347,7 +346,7 @@ pam_ssh_add_keys_to_agent(pam_handle_t *pamh) =09=09pam_err =3D pam_get_data(pamh, *kfn, &item); =09=09if (pam_err =3D=3D PAM_SUCCESS && item !=3D NULL) { =09=09=09psk =3D item; -=09=09=09if (ssh_add_identity(ac, psk->key, psk->comment)) +=09=09=09if (ssh_add_identity(fd, psk->key, psk->comment) =3D=3D 0) =09=09=09=09openpam_log(PAM_LOG_DEBUG, =09=09=09=09 "added %s to ssh agent", psk->comment); =09=09=09else @@ -360,8 +359,8 @@ pam_ssh_add_keys_to_agent(pam_handle_t *pamh) =09pam_err =3D PAM_SUCCESS; end: =09/* disconnect from agent */ -=09if (ac !=3D NULL) -=09=09ssh_close_authentication_connection(ac); +=09if (fd !=3D -1) +=09=09ssh_close_authentication_connection(fd); =20 =09/* switch back to original environment */ =09for (env =3D environ; *env !=3D NULL; ++env) --=20 John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1547455.kXYNJo7ADU>