From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1NLaQm-0006tx-Qg for garchives@archives.gentoo.org; Fri, 18 Dec 2009 10:51:33 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 728D9E0963; Fri, 18 Dec 2009 10:51:31 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 36C3AE0963 for ; Fri, 18 Dec 2009 10:51:31 +0000 (UTC) Received: from stork.gentoo.org (stork.gentoo.org [64.127.104.133]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTP id D28C667B9C for ; Fri, 18 Dec 2009 10:51:30 +0000 (UTC) Received: from pva by stork.gentoo.org with local (Exim 4.69) (envelope-from ) id 1NLaQk-0006XN-C8 for gentoo-commits@lists.gentoo.org; Fri, 18 Dec 2009 10:51:30 +0000 From: "Peter Volkov (pva)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, pva@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in net-analyzer/hydra/files: hydra-5.4-libssh-0.4.0.patch X-VCS-Repository: gentoo-x86 X-VCS-Files: hydra-5.4-libssh-0.4.0.patch X-VCS-Directories: net-analyzer/hydra/files X-VCS-Committer: pva X-VCS-Committer-Name: Peter Volkov Content-Type: text/plain; charset=utf8 Message-Id: Sender: Peter Volkov Date: Fri, 18 Dec 2009 10:51:30 +0000 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 929343e0-8117-45c0-9681-072e1f4100f4 X-Archives-Hash: 723454db18974dca4e3b2c89d583db4e pva 09/12/18 10:51:30 Added: hydra-5.4-libssh-0.4.0.patch Log: Fixed compatibility issue with libssh-0.4, bug #296816, thank Willard D= awson for report and Jonathan-Christofer Demay for ideas. (Portage version: 2.1.7.15/cvs/Linux x86_64) Revision Changes Path 1.1 net-analyzer/hydra/files/hydra-5.4-libssh-0.4.0.patc= h file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/hydra= /files/hydra-5.4-libssh-0.4.0.patch?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-analyzer/hydra= /files/hydra-5.4-libssh-0.4.0.patch?rev=3D1.1&content-type=3Dtext/plain Index: hydra-5.4-libssh-0.4.0.patch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D http://bugs.gentoo.org/show_bug.cgi?id=3D296816 Author: Peter Volkov with some ideas from Jonathan-Chris= tofer Demay. =3D=3D=3D modified file 'configure' --- configure 2009-12-15 08:46:59 +0000 +++ configure 2009-12-17 08:26:59 +0000 @@ -243,11 +243,11 @@ =20 if [ -n "$SSH_PATH" ]; then echo " ... found" - echo 'NOTE: ensure that you have libssh v0.11 installed!! Get it fro= m http://0xbadc0de.be !' + echo 'NOTE: ensure that you have libssh v0.4 or later installed!! Ge= t it from http://www.libssh.org !' fi if [ "X" =3D "X$SSH_PATH" ]; then echo " ... NOT found, module ss= h2 disabled" - echo 'Get it from http://0xbadc0de.be/ - use v0.11!' + echo 'Get it from http://www.libssh.org/ - use v0.4!' fi if [ "$SSH_IPATH" =3D "/usr/include" ]; then SSH_IPATH=3D"" =3D=3D=3D modified file 'hydra-ssh2.c' --- hydra-ssh2.c 2009-12-15 08:46:59 +0000 +++ hydra-ssh2.c 2009-12-18 10:21:52 +0000 @@ -7,31 +7,70 @@ } #else =20 -#warning "If compilation of hydra-ssh2 fails, you are not using v0.11. D= ownload from http://www.0xbadc0de.be/" - #include =20 extern char *HYDRA_EXIT; =20 +/* try to authenticate with one password */ +static int +try_password(ssh_session ssh_session, const char *login, const char *pas= sword){ + int auth_state; + int i, j, n; + int methods; + +#ifdef DEBUG_SSH2 + printf("[DEBUG] try_password(): trying login =3D \"%s\", pass \"%s\"\n= ", login, password); +#endif + + methods =3D ssh_auth_list(ssh_session); + if (methods & SSH_AUTH_METHOD_INTERACTIVE) { +#ifdef DEBUG_SSH2 + printf("[DEBUG] try_password(): trying keyboard interactive method\n= "); +#endif + auth_state =3D ssh_userauth_kbdint(ssh_session, login, NULL); + /* For safety we'll limit number of prompts to 33 */ + for(j=3D0; auth_state =3D=3D SSH_AUTH_INFO && j<33; j++) { + n=3Dssh_userauth_kbdint_getnprompts(ssh_session); + for(i=3D0; i