FreeBSD Bugzilla – Attachment 179144 Details for
Bug 216319
[MAINTAINER] security/sshpass: Update to 1.0.6
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
security_sshpass.patch
security_sshpass.patch (text/plain), 5.45 KB, created by
Hung-Yi Chen
on 2017-01-20 16:59:32 UTC
(
hide
)
Description:
security_sshpass.patch
Filename:
MIME Type:
Creator:
Hung-Yi Chen
Created:
2017-01-20 16:59:32 UTC
Size:
5.45 KB
patch
obsolete
>Index: security/sshpass/Makefile >=================================================================== >--- security/sshpass/Makefile (revision 431970) >+++ security/sshpass/Makefile (working copy) >@@ -2,8 +2,7 @@ > # $FreeBSD$ > > PORTNAME= sshpass >-PORTVERSION= 1.05 >-PORTREVISION= 1 >+PORTVERSION= 1.06 > CATEGORIES= security > MASTER_SITES= SF/${PORTNAME}/sshpass/${PORTVERSION} > >Index: security/sshpass/distinfo >=================================================================== >--- security/sshpass/distinfo (revision 431970) >+++ security/sshpass/distinfo (working copy) >@@ -1,2 +1,2 @@ >-SHA256 (sshpass-1.05.tar.gz) = c3f78752a68a0c3f62efb3332cceea0c8a1f04f7cf6b46e00ec0c3000bc8483e >-SIZE (sshpass-1.05.tar.gz) = 98362 >+SHA256 (sshpass-1.06.tar.gz) = c6324fcee608b99a58f9870157dfa754837f8c48be3df0f5e2f3accf145dee60 >+SIZE (sshpass-1.06.tar.gz) = 112205 >Index: security/sshpass/files/patch-configure.ac >=================================================================== >--- security/sshpass/files/patch-configure.ac (revision 431970) >+++ security/sshpass/files/patch-configure.ac (nonexistent) >@@ -1,14 +0,0 @@ >---- configure.ac.orig 2011-08-06 07:03:01 UTC >-+++ configure.ac >-@@ -32,6 +32,11 @@ AC_FUNC_SELECT_ARGTYPES >- AC_TYPE_SIGNAL >- AC_CHECK_FUNCS([select posix_openpt strdup]) >- >-+AC_ARG_ENABLE([password-prompt], >-+ [AS_HELP_STRING([--enable-password-prompt=prompt], [Provide alternative ssh password prompt to look for.])], >-+ [AC_DEFINE_UNQUOTED([PASSWORD_PROMPT], ["$enable_password_prompt"], [Password prompt to use])], >-+ [AC_DEFINE([PASSWORD_PROMPT], ["assword"])]) >-+ >- AC_CONFIG_FILES([Makefile]) >- AM_CONFIG_HEADER(config.h) >- AC_OUTPUT > >Property changes on: security/sshpass/files/patch-configure.ac >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property >Index: security/sshpass/files/patch-main.c >=================================================================== >--- security/sshpass/files/patch-main.c (revision 431970) >+++ security/sshpass/files/patch-main.c (working copy) >@@ -1,78 +1,15 @@ >---- main.c.orig 2011-08-06 15:04:33.000000000 +0800 >-+++ main.c 2016-01-30 22:17:43.489015000 +0800 >-@@ -1,5 +1,5 @@ >- /* This file is part of "sshpass", a tool for batch running password ssh authentication >-- * Copyright (C) 2006 Lingnu Open Source Consulting Ltd. >-+ * Copyright (C) 2006, 2015 Lingnu Open Source Consulting Ltd. >- * >- * This program is free software; you can redistribute it and/or modify >- * it under the terms of the GNU General Public License as published by >-@@ -69,6 +69,8 @@ >- int fd; >- const char *password; >- } pwsrc; >-+ >-+ const char *pwprompt; >- } args; >- >- static void show_help() >-@@ -77,6 +79,7 @@ >- " -f filename Take password to use from file\n" >- " -d number Use number as file descriptor for getting password\n" >- " -p password Provide password as argument (security unwise)\n" >-+ " -P prompt Which string should sshpass search for to detect a password prompt\n" >- " -e Password is passed as env-var \"SSHPASS\"\n" >- " With no parameters - password will be taken from stdin\n\n" >- " -h Show help (this screen)\n" >-@@ -99,7 +102,7 @@ >- fprintf(stderr, "Conflicting password source\n"); \ >- error=RETURN_CONFLICTING_ARGUMENTS; } >- >-- while( (opt=getopt(argc, argv, "+f:d:p:heV"))!=-1 && error==-1 ) { >-+ while( (opt=getopt(argc, argv, "+f:d:p:P:heV"))!=-1 && error==-1 ) { >- switch( opt ) { >- case 'f': >- // Password should come from a file >-@@ -130,6 +133,9 @@ >- optarg[i]='z'; >- } >- break; >-+ case 'P': >-+ args.pwprompt=optarg; >-+ break; >- case 'e': >- VIRGIN_PWTYPE; >- >-@@ -265,6 +271,12 @@ >+--- main.c.orig 2017-01-21 00:53:21.382092000 +0800 >++++ main.c 2017-01-21 00:54:53.200065000 +0800 >+@@ -280,6 +280,12 @@ > setsid(); > // This line makes the ptty our controlling tty. We do not otherwise need it open > slavept=open(name, O_RDWR ); > +#ifdef __FreeBSD__ >-+ if (ioctl(slavept, TIOCSCTTY, NULL) == -1) { >-+ perror("sshpass: Failed to TIOCSCTTY"); >-+ exit(RETURN_RUNTIME_ERROR); >-+ } >++ if (ioctl(slavept, TIOCSCTTY, NULL) == -1) { >++ perror("sshpass: Failed to TIOCSCTTY"); >++ exit(RETURN_RUNTIME_ERROR); >++ } > +#endif > close( slavept ); > > close( masterpt ); >-@@ -359,7 +371,7 @@ >- // We are looking for the string >- static int prevmatch=0; // If the "password" prompt is repeated, we have the wrong password. >- static int state1, state2; >-- static const char compare1[]="assword:"; // Asking for a password >-+ static const char *compare1=PASSWORD_PROMPT; // Asking for a password >- static const char compare2[]="The authenticity of host "; // Asks to authenticate host >- // static const char compare3[]="WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!"; // Warns about man in the middle attack >- // The remote identification changed error is sent to stderr, not the tty, so we do not handle it. >-@@ -367,6 +379,10 @@ >- char buffer[40]; >- int ret=0; >- >-+ if( args.pwprompt ) { >-+ compare1 = args.pwprompt; >-+ } >-+ >- int numread=read(fd, buffer, sizeof(buffer) ); >- >- state1=match( compare1, buffer, numread, state1 );
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 216319
: 179144