diff -p1N putty-src_0.53/CMDLINE.C putty/CMDLINE.C *** putty-src_0.53/CMDLINE.C Mon Sep 2 22:32:37 2002 --- putty/CMDLINE.C Mon Oct 14 10:52:14 2002 *************** int cmdline_process_param(char *p, char *** 116,117 **** --- 116,133 ---- + #ifdef ACCEPTALL + if (!strcmp(p, "-acceptall")) { + RETURN(1); + UNAVAILABLE_IN(TOOLTYPE_FILETRANSFER); + SAVEABLE(1); + cfg.lport_acceptall = 1; + } + #endif + #ifdef LOCALBIND + if (!strcmp(p, "-local_bind_address")) { + RETURN(2); + SAVEABLE(1); + strncpy(local_bind_address, value, sizeof(local_bind_address)); + local_bind_address[sizeof(local_bind_address) - 1] = '\0'; + } + #endif if (!strcmp(p, "-load")) { Common subdirectories: putty-src_0.53/DOC and putty/DOC diff -p1N putty-src_0.53/MAKEFILE.mingw putty/MAKEFILE.mingw *** putty-src_0.53/MAKEFILE.mingw Thu Jan 1 09:00:00 1970 --- putty/MAKEFILE.mingw Mon Oct 14 10:48:12 2002 *************** *** 0 **** --- 1,277 ---- + # Makefile for PuTTY under mingw. + # + # This file was created by `mkfiles.pl' from the `Recipe' file. + # DO NOT EDIT THIS FILE DIRECTLY; edit Recipe or mkfiles.pl instead. + # + # Extra options you can set: + # + # - FWHACK=-DFWHACK + # Enables a hack that tunnels through some firewall proxies. + # + # - VER=-DSNAPSHOT=1999-01-25 + # Generates executables whose About box report them as being a + # development snapshot. + # + # - VER=-DRELEASE=0.43 + # Generates executables whose About box report them as being a + # release version. + # + # - COMPAT=-DAUTO_WINSOCK + # Causes PuTTY to assume that includes its own WinSock + # header file, so that it won't try to include . + # + # - COMPAT=-DWINSOCK_TWO + # Causes the PuTTY utilities to include instead of + # , except Plink which _needs_ WinSock 2 so it already + # does this. + # + # - COMPAT=-DNO_SECURITY + # Disables Pageant's use of , which is not available + # with some development environments. This means that Pageant + # won't care about the local user ID of processes accessing it; a + # version of Pageant built with this option will therefore refuse + # to run under NT-series OSes on security grounds (although it + # will run fine on Win95-series OSes where there is no access + # control anyway). + # + # Note that this definition is always enabled in the Cygwin + # build, since at the time of writing this is known + # not to be available in Cygwin. + # + # - COMPAT=-DNO_MULTIMON + # Disables PuTTY's use of , which is not available + # with some development environments. This means that PuTTY's + # full-screen mode (configurable to work on Alt-Enter) will + # not behave usefully in a multi-monitor environment. + # + # Note that this definition is always enabled in the Cygwin + # build, since at the time of writing this is + # known not to be available in Cygwin. + # + # - COMPAT=-DMSVC4 + # - RCFL=-DMSVC4 + # Makes a couple of minor changes so that PuTTY compiles using + # MSVC 4. You will also need /DNO_SECURITY and /DNO_MULTIMON. + # + # - RCFL=-DASCIICTLS + # Uses ASCII rather than Unicode to specify the tab control in + # the resource file. Probably most useful when compiling with + # Cygnus/mingw32, whose resource compiler may have less of a + # problem with it. + # + # - XFLAGS=-DDEBUG + # Causes PuTTY to enable internal debugging. + # + # - XFLAGS=-DMALLOC_LOG + # Causes PuTTY to emit a file called putty_mem.log, logging every + # memory allocation and free, so you can track memory leaks. + # + # - XFLAGS=-DMINEFIELD + # Causes PuTTY to use a custom memory allocator, similar in + # concept to Electric Fence, in place of regular malloc(). Wastes + # huge amounts of RAM, but should cause heap-corruption bugs to + # show up as GPFs at the point of failure rather than appearing + # later on as second-level damage. + # + + # You can define this path to point at your tools if you need to + # TOOLPATH = c:\cygwin\bin\ # or similar, if you're running Windows + # TOOLPATH = /pkg/mingw32msvc/i386-mingw32msvc/bin/ + TOOLPATH = c:/tool/mingw/bin/ + CC = $(TOOLPATH)gcc + RC = $(TOOLPATH)windres + # You may also need to tell windres where to find include files: + # RCINC = --include-dir c:\cygwin\include\ + + CFLAGS = -Wall -O2 -D_WINDOWS -DDEBUG -DWIN32S_COMPAT \ + -DNO_SECURITY -D_NO_OLDNAMES -DNO_MULTIMON -DLOCALBIND -DACCEPTALL -I. + LDFLAGS = -s + RCFLAGS = $(RCINC) --define WIN32=1 --define _WIN32=1 --define WINVER=0x0400 \ + --define MINGW32_FIX=1 + + .SUFFIXES: + + %.o: %.c + $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) -c $< + + %.res.o: %.rc + $(RC) $(FWHACK) $(RCFL) $(RCFLAGS) $< $@ + + all: pageant.exe plink.exe pscp.exe psftp.exe putty.exe puttygen.exe \ + puttytel.exe + + pageant.exe: misc.o pageant.o pageant.res.o pageantc.o sshaes.o sshbn.o \ + sshdes.o sshdss.o sshmd5.o sshpubk.o sshrsa.o sshsh512.o \ + sshsha.o tree234.o version.o winutils.o + $(CC) -mwindows $(LDFLAGS) -o $@ misc.o pageant.o pageant.res.o \ + pageantc.o sshaes.o sshbn.o sshdes.o sshdss.o sshmd5.o \ + sshpubk.o sshrsa.o sshsh512.o sshsha.o tree234.o version.o \ + winutils.o -ladvapi32 -lcomctl32 -lcomdlg32 -lgdi32 -limm32 \ + -lshell32 -luser32 -lwinmm -lwinspool + + plink.exe: be_all.o cmdline.o console.o ldisc.o logging.o misc.o noise.o \ + pageantc.o plink.o plink.res.o portfwd.o proxy.o raw.o \ + rlogin.o settings.o ssh.o sshaes.o sshblowf.o sshbn.o \ + sshcrc.o sshcrcda.o sshdes.o sshdh.o sshdss.o sshmd5.o \ + sshpubk.o sshrand.o sshrsa.o sshsh512.o sshsha.o sshzlib.o \ + telnet.o tree234.o version.o winnet.o winstore.o x11fwd.o + $(CC) $(LDFLAGS) -o $@ be_all.o cmdline.o console.o ldisc.o \ + logging.o misc.o noise.o pageantc.o plink.o plink.res.o \ + portfwd.o proxy.o raw.o rlogin.o settings.o ssh.o sshaes.o \ + sshblowf.o sshbn.o sshcrc.o sshcrcda.o sshdes.o sshdh.o \ + sshdss.o sshmd5.o sshpubk.o sshrand.o sshrsa.o sshsh512.o \ + sshsha.o sshzlib.o telnet.o tree234.o version.o winnet.o \ + winstore.o x11fwd.o -ladvapi32 -lcomctl32 -lcomdlg32 -lgdi32 \ + -limm32 -lshell32 -luser32 -lwinmm -lwinspool -lws2_32 + + pscp.exe: be_none.o cmdline.o console.o int64.o logging.o misc.o noise.o \ + pageantc.o portfwd.o proxy.o scp.o scp.res.o settings.o \ + sftp.o ssh.o sshaes.o sshblowf.o sshbn.o sshcrc.o sshcrcda.o \ + sshdes.o sshdh.o sshdss.o sshmd5.o sshpubk.o sshrand.o \ + sshrsa.o sshsh512.o sshsha.o sshzlib.o tree234.o version.o \ + wildcard.o winnet.o winstore.o x11fwd.o + $(CC) $(LDFLAGS) -o $@ be_none.o cmdline.o console.o int64.o \ + logging.o misc.o noise.o pageantc.o portfwd.o proxy.o scp.o \ + scp.res.o settings.o sftp.o ssh.o sshaes.o sshblowf.o \ + sshbn.o sshcrc.o sshcrcda.o sshdes.o sshdh.o sshdss.o \ + sshmd5.o sshpubk.o sshrand.o sshrsa.o sshsh512.o sshsha.o \ + sshzlib.o tree234.o version.o wildcard.o winnet.o winstore.o \ + x11fwd.o -ladvapi32 -lcomctl32 -lcomdlg32 -lgdi32 -limm32 \ + -lshell32 -luser32 -lwinmm -lwinspool -lwsock32 + + psftp.exe: be_none.o cmdline.o console.o int64.o logging.o misc.o noise.o \ + pageantc.o portfwd.o proxy.o psftp.o scp.res.o settings.o \ + sftp.o ssh.o sshaes.o sshblowf.o sshbn.o sshcrc.o sshcrcda.o \ + sshdes.o sshdh.o sshdss.o sshmd5.o sshpubk.o sshrand.o \ + sshrsa.o sshsh512.o sshsha.o sshzlib.o tree234.o version.o \ + winnet.o winstore.o x11fwd.o + $(CC) $(LDFLAGS) -o $@ be_none.o cmdline.o console.o int64.o \ + logging.o misc.o noise.o pageantc.o portfwd.o proxy.o \ + psftp.o scp.res.o settings.o sftp.o ssh.o sshaes.o \ + sshblowf.o sshbn.o sshcrc.o sshcrcda.o sshdes.o sshdh.o \ + sshdss.o sshmd5.o sshpubk.o sshrand.o sshrsa.o sshsh512.o \ + sshsha.o sshzlib.o tree234.o version.o winnet.o winstore.o \ + x11fwd.o -ladvapi32 -lcomctl32 -lcomdlg32 -lgdi32 -limm32 \ + -lshell32 -luser32 -lwinmm -lwinspool -lwsock32 + + putty.exe: be_all.o cmdline.o ldisc.o logging.o misc.o noise.o pageantc.o \ + portfwd.o printing.o proxy.o raw.o rlogin.o settings.o \ + sizetip.o ssh.o sshaes.o sshblowf.o sshbn.o sshcrc.o \ + sshcrcda.o sshdes.o sshdh.o sshdss.o sshmd5.o sshpubk.o \ + sshrand.o sshrsa.o sshsh512.o sshsha.o sshzlib.o telnet.o \ + terminal.o tree234.o unicode.o version.o wcwidth.o \ + win_res.res.o winctrls.o windlg.o window.o winnet.o \ + winstore.o winutils.o x11fwd.o + $(CC) -mwindows $(LDFLAGS) -o $@ be_all.o cmdline.o ldisc.o \ + logging.o misc.o noise.o pageantc.o portfwd.o printing.o \ + proxy.o raw.o rlogin.o settings.o sizetip.o ssh.o sshaes.o \ + sshblowf.o sshbn.o sshcrc.o sshcrcda.o sshdes.o sshdh.o \ + sshdss.o sshmd5.o sshpubk.o sshrand.o sshrsa.o sshsh512.o \ + sshsha.o sshzlib.o telnet.o terminal.o tree234.o unicode.o \ + version.o wcwidth.o win_res.res.o winctrls.o windlg.o \ + window.o winnet.o winstore.o winutils.o x11fwd.o -ladvapi32 \ + -lcomctl32 -lcomdlg32 -lgdi32 -limm32 -lshell32 -luser32 \ + -lwinmm -lwinspool -lwsock32 + + puttygen.exe: import.o misc.o noise.o puttygen.o puttygen.res.o sshaes.o \ + sshbn.o sshdes.o sshdss.o sshdssg.o sshmd5.o sshprime.o \ + sshpubk.o sshrand.o sshrsa.o sshrsag.o sshsh512.o sshsha.o \ + version.o winctrls.o winstore.o winutils.o + $(CC) -mwindows $(LDFLAGS) -o $@ import.o misc.o noise.o puttygen.o \ + puttygen.res.o sshaes.o sshbn.o sshdes.o sshdss.o sshdssg.o \ + sshmd5.o sshprime.o sshpubk.o sshrand.o sshrsa.o sshrsag.o \ + sshsh512.o sshsha.o version.o winctrls.o winstore.o \ + winutils.o -ladvapi32 -lcomctl32 -lcomdlg32 -lgdi32 -limm32 \ + -lshell32 -luser32 -lwinmm -lwinspool + + puttytel.exe: be_nossh.o cmdline.o ldisc.o logging.o misc.o printing.o \ + proxy.o raw.o rlogin.o settings.o sizetip.o telnet.o \ + terminal.o tree234.o unicode.o version.o wcwidth.o \ + win_res.res.o winctrls.o windlg.o window.o winnet.o \ + winstore.o winutils.o + $(CC) -mwindows $(LDFLAGS) -o $@ be_nossh.o cmdline.o ldisc.o \ + logging.o misc.o printing.o proxy.o raw.o rlogin.o \ + settings.o sizetip.o telnet.o terminal.o tree234.o unicode.o \ + version.o wcwidth.o win_res.res.o winctrls.o windlg.o \ + window.o winnet.o winstore.o winutils.o -ladvapi32 \ + -lcomctl32 -lcomdlg32 -lgdi32 -limm32 -lshell32 -luser32 \ + -lwinmm -lwinspool -lwsock32 + + be_all.o: be_all.c putty.h network.h misc.h puttymem.h + be_none.o: be_none.c putty.h network.h misc.h puttymem.h + be_nossh.o: be_nossh.c putty.h network.h misc.h puttymem.h + cmdline.o: cmdline.c putty.h network.h misc.h puttymem.h + console.o: console.c putty.h storage.h ssh.h network.h misc.h puttymem.h \ + int64.h + import.o: import.c ssh.h misc.h puttymem.h network.h int64.h + int64.o: int64.c int64.h + ldisc.o: ldisc.c putty.h network.h misc.h puttymem.h + logging.o: logging.c putty.h network.h misc.h puttymem.h + misc.o: misc.c putty.h network.h misc.h puttymem.h + noise.o: noise.c putty.h ssh.h storage.h network.h misc.h puttymem.h int64.h + pageant.o: pageant.c ssh.h misc.h tree234.h winstuff.h puttymem.h network.h \ + int64.h + pageant.res.o: pageant.rc pageant.ico pageants.ico + pageantc.o: pageantc.c puttymem.h + plink.o: plink.c putty.h storage.h tree234.h network.h misc.h puttymem.h + plink.res.o: plink.rc putty.ico + portfwd.o: portfwd.c putty.h ssh.h network.h misc.h puttymem.h int64.h + printing.o: printing.c putty.h network.h misc.h puttymem.h + proxy.o: proxy.c putty.h network.h proxy.h misc.h puttymem.h + psftp.o: psftp.c putty.h storage.h ssh.h sftp.h int64.h network.h misc.h \ + puttymem.h + puttygen.o: puttygen.c putty.h ssh.h winstuff.h network.h misc.h puttymem.h \ + int64.h + puttygen.res.o: puttygen.rc puttygen.ico + raw.o: raw.c putty.h network.h misc.h puttymem.h + rlogin.o: rlogin.c putty.h network.h misc.h puttymem.h + scp.o: scp.c putty.h ssh.h sftp.h winstuff.h storage.h network.h misc.h \ + puttymem.h int64.h + scp.res.o: scp.rc scp.ico + settings.o: settings.c putty.h storage.h network.h misc.h puttymem.h + sftp.o: sftp.c misc.h int64.h sftp.h puttymem.h + sizetip.o: sizetip.c putty.h winstuff.h network.h misc.h puttymem.h + ssh.o: ssh.c putty.h tree234.h ssh.h network.h misc.h puttymem.h int64.h + sshaes.o: sshaes.c ssh.h puttymem.h network.h int64.h + sshblowf.o: sshblowf.c ssh.h puttymem.h network.h int64.h + sshbn.o: sshbn.c misc.h ssh.h puttymem.h network.h int64.h + sshcrc.o: sshcrc.c + sshcrcda.o: sshcrcda.c misc.h ssh.h puttymem.h network.h int64.h + sshdes.o: sshdes.c ssh.h puttymem.h network.h int64.h + sshdh.o: sshdh.c ssh.h puttymem.h network.h int64.h + sshdss.o: sshdss.c ssh.h misc.h puttymem.h network.h int64.h + sshdssg.o: sshdssg.c misc.h ssh.h puttymem.h network.h int64.h + sshmd5.o: sshmd5.c ssh.h puttymem.h network.h int64.h + sshprime.o: sshprime.c ssh.h puttymem.h network.h int64.h + sshpubk.o: sshpubk.c ssh.h misc.h puttymem.h network.h int64.h + sshrand.o: sshrand.c ssh.h puttymem.h network.h int64.h + sshrsa.o: sshrsa.c ssh.h misc.h puttymem.h network.h int64.h + sshrsag.o: sshrsag.c ssh.h puttymem.h network.h int64.h + sshsh512.o: sshsh512.c ssh.h puttymem.h network.h int64.h + sshsha.o: sshsha.c ssh.h puttymem.h network.h int64.h + sshzlib.o: sshzlib.c ssh.h puttymem.h network.h int64.h + telnet.o: telnet.c putty.h network.h misc.h puttymem.h + terminal.o: terminal.c putty.h tree234.h network.h misc.h puttymem.h + tree234.o: tree234.c tree234.h + unicode.o: unicode.c putty.h misc.h network.h puttymem.h + version.o: version.c + wcwidth.o: wcwidth.c + wildcard.o: wildcard.c + win_res.res.o: win_res.rc win_res.h putty.ico puttycfg.ico + winctrls.o: winctrls.c winstuff.h puttymem.h putty.h network.h misc.h + windlg.o: windlg.c ssh.h putty.h winstuff.h win_res.h storage.h puttymem.h \ + network.h int64.h misc.h + window.o: window.c putty.h winstuff.h storage.h win_res.h network.h misc.h \ + puttymem.h + winnet.o: winnet.c putty.h network.h tree234.h misc.h puttymem.h + winstore.o: winstore.c putty.h storage.h network.h misc.h puttymem.h + winutils.o: winutils.c misc.h puttymem.h + x11fwd.o: x11fwd.c putty.h ssh.h network.h misc.h puttymem.h int64.h + + version.o: FORCE; + # Hack to force version.o to be rebuilt always + FORCE: + $(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) $(VER) -c version.c + clean: + rm -f *.o *.exe *.res.o + diff -p1N putty-src_0.53/PLINK.C putty/PLINK.C *** putty-src_0.53/PLINK.C Thu Sep 12 02:30:33 2002 --- putty/PLINK.C Mon Oct 14 16:30:05 2002 *************** static void usage(void) *** 206,207 **** --- 206,215 ---- printf(" -i key private key file for authentication\n"); + #ifdef LOCALBIND + printf(" -local_bind_address ADDRESS\n"); + printf(" Forward interface address.\n"); + #endif + #ifdef ACCEPTALL + printf(" -acceptall\n"); + printf(" Local ports accept connections from other hosts.\n"); + #endif exit(1); diff -p1N putty-src_0.53/PUTTY.H putty/PUTTY.H *** putty-src_0.53/PUTTY.H Wed Oct 2 03:30:15 2002 --- putty/PUTTY.H Mon Oct 14 10:46:44 2002 *************** GLOBAL HWND logbox; *** 142,143 **** --- 142,150 ---- + #ifdef LOCALBIND + /* + * local port forwarding bind address + */ + GLOBAL char local_bind_address[512]; + + #endif /* diff -p1N putty-src_0.53/WINNET.C putty/WINNET.C *** putty-src_0.53/WINNET.C Sat Sep 21 02:54:17 2002 --- putty/WINNET.C Mon Oct 14 10:51:04 2002 *************** Socket sk_newlistener(int port, Plug plu *** 731,732 **** --- 731,743 ---- a.sin_addr.s_addr = htonl(INADDR_ANY); + #ifdef LOCALBIND + if (!local_bind_address[0] == 0) { + SockAddr addr; + char *dummy_realhost; + + addr = sk_namelookup(&local_bind_address, &dummy_realhost); + if ((err = sk_addr_error(addr))) + return err; + a.sin_addr.s_addr = htonl(addr->address); + } + #endif a.sin_port = htons((short)port);