diff -Nru libpam-sshauth-0.3.1/debian/changelog libpam-sshauth-0.3.1/debian/changelog --- libpam-sshauth-0.3.1/debian/changelog 2013-07-04 14:16:58.000000000 -0400 +++ libpam-sshauth-0.3.1/debian/changelog 2016-01-14 08:11:14.000000000 -0500 @@ -1,3 +1,12 @@ +libpam-sshauth (0.3.1-1ubuntu1) xenial; urgency=medium + + * debian/patches/add-back-support-for-publickey-authentication.patch: Added back + support for publickey authentication (Closes: #805879) + + * debian/control add zlib1g-dev package in Build-Depends (Closes: #789106) + + -- Eric Desrochers Tue, 12 Jan 2016 22:11:19 -0500 + libpam-sshauth (0.3.1-1) unstable; urgency=low * New upstream version: diff -Nru libpam-sshauth-0.3.1/debian/control libpam-sshauth-0.3.1/debian/control --- libpam-sshauth-0.3.1/debian/control 2013-03-15 18:27:05.000000000 -0400 +++ libpam-sshauth-0.3.1/debian/control 2016-01-12 22:10:54.000000000 -0500 @@ -3,7 +3,7 @@ Priority: extra Maintainer: LTSP Debian Maintainers Uploaders: Vagrant Cascadian -Build-Depends: debhelper (>= 9), libssh2-1-dev, libpam0g-dev | libpam-dev, dh-autoreconf, pkg-config +Build-Depends: debhelper (>= 9), libssh2-1-dev, libpam0g-dev | libpam-dev, dh-autoreconf, pkg-config, zlib1g-dev Standards-Version: 3.9.4 Vcs-Browser: https://bazaar.launchpad.net/~ltsp-upstream/ltsp/libpam-sshauth/files Vcs-Bzr: lp:~ltsp-upstream/ltsp/libpam-sshauth diff -Nru libpam-sshauth-0.3.1/debian/patches/add-back-support-for-publickey-authentication.patch libpam-sshauth-0.3.1/debian/patches/add-back-support-for-publickey-authentication.patch --- libpam-sshauth-0.3.1/debian/patches/add-back-support-for-publickey-authentication.patch 1969-12-31 19:00:00.000000000 -0500 +++ libpam-sshauth-0.3.1/debian/patches/add-back-support-for-publickey-authentication.patch 2016-01-12 22:09:23.000000000 -0500 @@ -0,0 +1,105 @@ +Description: Added back support for publickey authentication + +libpam-sshauth used to support publickey authentication with ssh-agent. +version 0.3-1 dropped this feature which is related to author switching to using libssh2. + +Author: Benoit Guyard +Origin: upstream, https://code.launchpad.net/~benoit-guyard/ltsp/libpam-sshauth/+merge/273930 +--- a/src/auth_funcs.c ++++ b/src/auth_funcs.c +@@ -184,8 +184,10 @@ + char *userauthlist; + struct hostent *server; + struct sockaddr_in serv_addr; ++ struct libssh2_agent_publickey *identity, *prev_identity = NULL; + LIBSSH2_SESSION *session = NULL; + LIBSSH2_KNOWNHOSTS *nh = NULL; ++ LIBSSH2_AGENT *agent = NULL; + size_t len; + FILE *khf; + +@@ -381,10 +383,84 @@ + { + method |= SSH_AUTH_METHOD_INTERACTIVE; + } ++ if (strstr (userauthlist, "publickey") != NULL) ++ { ++ method |= SSH_AUTH_METHOD_PUBLICKEY; ++ } + + do + { + /* ++ * Authenticate depending on the method available. ++ * Try public key first. ++ */ ++ ++ if (method & SSH_AUTH_METHOD_PUBLICKEY) ++ { ++ pam_debug(pamh, "Trying public key authentication."); ++ ++ /* Connect to the ssh-agent */ ++ agent = libssh2_agent_init(session); ++ ++ if (!agent) ++ { ++ pam_debug(pamh, "Failure initializing ssh-agent support."); ++ goto fail; ++ } ++ ++ if (libssh2_agent_connect(agent)) ++ { ++ pam_debug(pamh, "Failure connecting to ssh-agent."); ++ goto fail; ++ } ++ ++ if (libssh2_agent_list_identities(agent)) ++ { ++ pam_debug(pamh, "Failure requesting identities to ssh-agent."); ++ goto fail; ++ } ++ ++ while (1) ++ { ++ ssh_result = libssh2_agent_get_identity(agent, &identity, prev_identity); ++ ++ if (ssh_result == 1) ++ break; ++ ++ if (ssh_result < 0) ++ { ++ pam_debug(pamh, "Failure obtaining identity from ssh-agent support."); ++ ssh_result = 1; ++ goto fail; ++ } ++ ++ if (libssh2_agent_userauth(agent, username, identity)) ++ { ++ pam_debug(pamh, "Publickey authentication failed!"); ++ } ++ else ++ { ++ pam_debug(pamh, "Publickey Authentication succeeded!"); ++ break; ++ } ++ prev_identity = identity; ++ } ++ ++ if (ssh_result) ++ { ++ pam_debug(pamh, "Couldn't continue authentication."); ++ goto fail; ++ } ++ ++ /* We're authenticated now. */ ++ if (ssh_result == SSH_AUTH_SUCCESS) ++ { ++ libssh2_agent_disconnect(agent); ++ break; ++ } ++ } ++ ++ /* + * Try keyboard interactive next, if supported. + */ + diff -Nru libpam-sshauth-0.3.1/debian/patches/series libpam-sshauth-0.3.1/debian/patches/series --- libpam-sshauth-0.3.1/debian/patches/series 1969-12-31 19:00:00.000000000 -0500 +++ libpam-sshauth-0.3.1/debian/patches/series 2016-01-12 21:59:44.000000000 -0500 @@ -0,0 +1 @@ +add-back-support-for-publickey-authentication.patch