From acc06e8bea742f35898b1ce432c9b2470247ad49 Mon Sep 17 00:00:00 2001 From: Mark Janssen Date: Fri, 11 Aug 2006 13:40:44 +0000 Subject: [PATCH] CVS updates 1.6.3 git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@123 bc163920-b10d-0410-b2c5-a5491ca2ceef --- CHANGES | 12 +++++++++++- KNOWN_ISSUES | 10 ++-------- LICENSE.txt | 24 ++++++++++++++++++++++-- Makefile | 1 + README | 6 +++--- config.h | 9 ++++++++- proxytunnel.c | 13 ++++++------- proxytunnel.h | 2 ++ 8 files changed, 55 insertions(+), 22 deletions(-) diff --git a/CHANGES b/CHANGES index 20ac363..19c41c0 100755 --- a/CHANGES +++ b/CHANGES @@ -1,12 +1,22 @@ +Changes to proxytunnel version 1.6.3 -- Mon Apr 10 12:48:02 CEST 2006 + +- Replaced call to getpass to getpass_x, which comes from openssh's + readpassphrase.c. This should handle longer passwords on systems + with broken (crappy) getpass calls (solaris/hpux) + +Changes to proxytunnel version 1.6.2 -- Wed Mar 8 10:08:53 CET 2006 + +- Fix NTLM in stand-alone mode + Changes to proxytunnel version 1.6.1 -- Sat Feb 25 14:45:25 CET 2006 +- FOSDEM build (www.fosdem.org) - Do setproctitle and ssl stuff on 'standalone' mode too - Changed scanning/malloc's for proxy-hostname, we could overflow there - Ripped out setproctitle and replaced it with openssh's code from openbsd-compat/setproctitle.c, also took in strlcat/strlcpy - Removed all non-default Makefiles (darwin/solaris/cygwin etc) uncomment the -D's in the regular Makefile for your system/config -- Not release yet, not in cvs, FOSDEM build ;) (below here not in cvs) - Removed extra message in closeall() function - Removed Proctitle override message diff --git a/KNOWN_ISSUES b/KNOWN_ISSUES index e0be74e..dde7e71 100644 --- a/KNOWN_ISSUES +++ b/KNOWN_ISSUES @@ -1,10 +1,4 @@ Known Issues with proxytunnel -Version 1.6 - - Cygwin version doesn't correctly work with getpass(). So asking for - the proxy password doesn't work. Entering the password on the command- - line works, as does putting it in a environment variable and telling - proxytunnel about it with -S VARNAME - - Setproctitle stuff added whitespace at the end of the process-title, - this is fixed in the current CVS - +Apache might need: http://issues.apache.org/bugzilla/attachment.cgi?id=16105 +for SSL proxying ;) (see http://issues.apache.org/bugzilla/show_bug.cgi?id=29744) diff --git a/LICENSE.txt b/LICENSE.txt index 35a5ca2..3a2544a 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -15,8 +15,8 @@ and came with the following copyright notice: * redistribution of source. */ -The setproctitle code (including strlcat/strlcpy) came from openssh, and -comes with the following license-text (it's a 3-clause BSD license) +The setproctitle code and getpass replacement code, including strlcat/strlcpy +came from openssh, and comes with the following 3-clause BSD license. /* Based on conf.c from UCB sendmail 8.8.8 */ /* @@ -50,6 +50,26 @@ comes with the following license-text (it's a 3-clause BSD license) * SUCH DAMAGE. */ +Readpassphrase license text: +/* + * Copyright (c) 2000-2002 Todd C. Miller + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * + * Sponsored in part by the Defense Advanced Research Projects + * Agency (DARPA) and Air Force Research Laboratory, Air Force + * Materiel Command, USAF, under agreement number F39502-99-1-0512. + */ Other contributors can be found in the CREDITS file diff --git a/Makefile b/Makefile index bcf707a..aaaf778 100755 --- a/Makefile +++ b/Makefile @@ -46,6 +46,7 @@ OBJ = proxytunnel.o \ io.o \ http.o \ basicauth.o \ + readpassphrase.o \ messages.o \ cmdline.o \ ntlm.o diff --git a/README b/README index 10965af..77277e9 100755 --- a/README +++ b/README @@ -3,8 +3,8 @@ proxytunnel ----------- Author: Jos Visser , Mark Janssen -Date: Tue Feb 21 22:18:38 CET 2006 -Version: 1.6.0 +Date: Wed Jun 14 10:45:47 CEST 2006 +Version: 1.6.3 Hi all, @@ -22,7 +22,7 @@ Proxytunnel is very easy to use, when running proxytunnel with the help option it specifies it's command-line options. $ ./proxytunnel --help -Proxytunnel 1.6.0 +Proxytunnel 1.6.3 Copyright 2001-2006 Proxytunnel Project Jos Visser (Muppet) , Mark Janssen (Maniac) diff --git a/config.h b/config.h index 2be4f85..5330032 100755 --- a/config.h +++ b/config.h @@ -17,7 +17,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define VERSION "1.6.0" +#define VERSION "1.6.3" #define PACKAGE "Proxytunnel" #define PURPOSE "Build generic tunnels through HTTPS proxies" #define AUTHORS "Jos Visser (Muppet) , Mark Janssen (Maniac) " + +#ifndef _PATH_TTY +# define _PATH_TTY "/dev/tty" +#endif +#ifndef _PASSWORD_LEN +# define _PASSWORD_LEN 80 +#endif diff --git a/proxytunnel.c b/proxytunnel.c index 8fa5dfd..d5f45b0 100755 --- a/proxytunnel.c +++ b/proxytunnel.c @@ -290,25 +290,24 @@ void do_daemon() else if ( pid == 0 ) { read_fd = write_fd = sd_client; + + /* Main processing */ tunnel_connect(); proxy_protocol(); - if (args_info.ntlm_flag) { - proxy_protocol(); - proxy_protocol(); - } - #ifdef USE_SSL if( args_info.encrypt_flag ) do_ssl(); #endif #ifdef SETPROCTITLE if( args_info.proctitle_given ) - setproctitle( "%s [child]\0", args_info.proctitle_arg ); + setproctitle( "%s [cpio]\0", args_info.proctitle_arg ); #else if( args_info.proctitle_given ) message( "Setting process-title is not supported in this build\n"); #endif + cpio(); +///// exit( 0 ); } @@ -360,7 +359,7 @@ int main( int argc, char *argv[] ) if( args_info.user_given && !args_info.pass_given ) { char *cp; - cp = getpass ("Enter proxy password:"); + cp = getpass_x ("Enter proxy password:"); if (cp != NULL && strlen (cp) > 0) { args_info.pass_arg = strdup (cp); diff --git a/proxytunnel.h b/proxytunnel.h index 41da5c5..45c60f4 100644 --- a/proxytunnel.h +++ b/proxytunnel.h @@ -42,6 +42,8 @@ void setproctitle(const char *fmt, ...); size_t strlcat(char *dst, const char *src, size_t siz); size_t strlcpy(char *dst, const char *src, size_t siz); int main( int argc, char *argv[] ); +char * readpassphrase(const char *, char *, size_t, int); +char * getpass_x(const char *prompt); /* Globals */ int sd; /* The tunnel's socket descriptor */