Import putty-0.6.20090906 as security/putty-devel.

PuTTY is a client program for the SSH, Telnet and Rlogin network protocols.

These protocols are all used to run a remote session on a computer, over a
network. PuTTY implements the client end of that session: the end at which
the session is displayed, rather than the end at which it runs.
This commit is contained in:
ahoka 2009-09-07 18:01:43 +00:00
parent 29dd3e9f50
commit 27ce463e2d
9 changed files with 231 additions and 0 deletions

View file

@ -0,0 +1,5 @@
PuTTY is a client program for the SSH, Telnet and Rlogin network protocols.
These protocols are all used to run a remote session on a computer, over a
network. PuTTY implements the client end of that session: the end at which
the session is displayed, rather than the end at which it runs.

View file

@ -0,0 +1,48 @@
# $NetBSD: Makefile,v 1.1.1.1 2009/09/07 18:01:43 ahoka Exp $
#
DISTNAME= putty-0.60-2009-09-06
PKGNAME= putty-0.6.20090906
CATEGORIES= security
MASTER_SITES= http://the.earth.li/~sgtatham/putty/0.60/
MAINTAINER= ahoka@NetBSD.org
HOMEPAGE= http://www.chiark.greenend.org.uk/~sgtatham/putty/
COMMENT= Free implementation of Telnet and SSH for Win32 and Unix platforms
PKG_DESTDIR_SUPPORT= user-destdir
USE_TOOLS+= gmake
BUILD_DIRS= unix
BUILD_DEPENDS+= halibut>=1.0:../../textproc/halibut
MAKE_FILE= Makefile.gtk
MAKE_FLAGS+= mandir=${PREFIX}/${PKGMANDIR}
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1
PKG_OPTIONS_VAR= PKG_OPTIONS.putty
PKG_SUPPORTED_OPTIONS= inet6
.include "../../mk/bsd.options.mk"
.if empty(OPSYS:MLinux)
CFLAGS+= -DHAVE_NO_SETRESUID
.endif
.if !empty(PKG_OPTIONS:Minet6)
CFLAGS+= -DIPV6
.endif
.if !empty(OPSYS:M*BSD) || ${OPSYS} == "DragonFly" || ${OPSYS} == "Darwin"
CFLAGS+= -DOMIT_UTMP
.endif
# Use Unix98 ptys if we have the device, otherwise use the old style.
.if !exists(/dev/ptmx)
CFLAGS+= -DBSD_PTYS
.endif
.include "../../x11/gtk2/buildlink3.mk"
.include "../../mk/krb5.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"

View file

@ -0,0 +1,15 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2009/09/07 18:01:43 ahoka Exp $
bin/plink
bin/pscp
bin/psftp
bin/pterm
bin/putty
bin/puttygen
bin/puttytel
man/man1/plink.1
man/man1/pscp.1
man/man1/psftp.1
man/man1/pterm.1
man/man1/putty.1
man/man1/puttygen.1
man/man1/puttytel.1

View file

@ -0,0 +1,10 @@
$NetBSD: distinfo,v 1.1.1.1 2009/09/07 18:01:43 ahoka Exp $
SHA1 (putty-0.60-2009-09-06.tar.gz) = d7e22f692e8a427d0d00835de7cf6b5a22b9d4dc
RMD160 (putty-0.60-2009-09-06.tar.gz) = 178e4748e31a71336d886b754091a32acce1f298
Size (putty-0.60-2009-09-06.tar.gz) = 1831902 bytes
SHA1 (patch-aa) = f4772fc9d095a1970fc795ae4b629823d386bdd1
SHA1 (patch-ak) = 2ca42d1ea913505d7d265a3fde71e09aa292d75f
SHA1 (patch-al) = dd8d49697806d9087b9691c3bb48fe32b70a77e1
SHA1 (patch-am) = 4dc40f37310f8bcebee3e41bb684c89bae9323e3
SHA1 (patch-an) = 8411855d0a21b0ddb490384990003a3cfc58edcf

View file

@ -0,0 +1,22 @@
$NetBSD: patch-aa,v 1.1.1.1 2009/09/07 18:01:43 ahoka Exp $
--- unix/Makefile.gtk.orig 2009-09-06 01:30:15.000000000 +0200
+++ unix/Makefile.gtk
@@ -115,7 +115,7 @@ GTK_CONFIG = sh -c 'pkg-config gtk+-2.0
unexport CFLAGS # work around a weird issue with krb5-config
-CFLAGS = -O2 -Wall -Werror -g -I.././ -I../charset/ -I../windows/ -I../unix/ \
+CFLAGS += -O2 -Wall -Werror -g -I.././ -I../charset/ -I../windows/ -I../unix/ \
-I../mac/ -I../macosx/ $(shell $(GTK_CONFIG) --cflags) -D _FILE_OFFSET_BITS=64
XLDFLAGS = $(LDFLAGS) $(shell $(GTK_CONFIG) --libs)
ULDFLAGS = $(LDFLAGS)
@@ -127,7 +127,7 @@ endif
INSTALL=install
INSTALL_PROGRAM=$(INSTALL)
INSTALL_DATA=$(INSTALL)
-prefix=/usr/local
+prefix=$(PREFIX)
exec_prefix=$(prefix)
bindir=$(exec_prefix)/bin
mandir=$(prefix)/man

View file

@ -0,0 +1,26 @@
$NetBSD: patch-ak,v 1.1.1.1 2009/09/07 18:01:43 ahoka Exp $
--- import.c.orig Tue Apr 5 21:37:51 2005
+++ import.c Tue Apr 12 10:27:13 2005
@@ -680,8 +680,8 @@ int openssh_write(const Filename *filena
unsigned char *outblob;
int outlen;
struct mpint_pos numbers[9];
- int nnumbers, pos, len, seqlen, i;
- char *header, *footer;
+ int nnumbers = 0, pos = 0, len = 0, seqlen = 0, i = 0;
+ char *header = NULL, *footer = NULL;
char zero[1];
unsigned char iv[8];
int ret = 0;
@@ -1441,8 +1441,8 @@ int sshcom_write(const Filename *filenam
unsigned char *outblob;
int outlen;
struct mpint_pos numbers[6];
- int nnumbers, initial_zero, pos, lenpos, i;
- char *type;
+ int nnumbers = 0, initial_zero = 0, pos = 0, lenpos = 0, i = 0;
+ char *type = NULL;
char *ciphertext;
int cipherlen;
int ret = 0;

View file

@ -0,0 +1,28 @@
$NetBSD: patch-al,v 1.1.1.1 2009/09/07 18:01:43 ahoka Exp $
Make the home/end keys work on BSD servers as well as Linux ones
Index: windows/window.c
===================================================================
--- windows/window.c (revision 8466)
+++ windows/window.c (working copy)
@@ -4189,8 +4189,17 @@
p += sprintf((char *) p, "\x1BO%c", code + 'P' - 11);
return p - output;
}
- if (cfg.rxvt_homeend && (code == 1 || code == 4)) {
- p += sprintf((char *) p, code == 1 ? "\x1B[H" : "\x1BOw");
+ /* Home/End */
+ if (code == 1 || code == 4) {
+ /* Send the correct XTerm or rxvt codes for home/end
+ * We used to send ^[1~ and [4~ for Xterm,
+ * but those are Linux console */
+ const char *he;
+ if (cfg.rxvt_homeend)
+ he = code == 1 ? "\x1B[7~" : "\x1B[8~";
+ else
+ he = code == 1 ? "\x1BOH" : "\x1BOF";
+ p += sprintf((char *) p, he);
return p - output;
}
if (code) {

View file

@ -0,0 +1,48 @@
$NetBSD: patch-am,v 1.1.1.1 2009/09/07 18:01:43 ahoka Exp $
Make the home/end keys work on BSD servers as well as Linux ones
Index: terminal.c
===================================================================
--- terminal.c (revision 8466)
+++ terminal.c (working copy)
@@ -6131,13 +6131,6 @@
}
}
- /* RXVT Home/End */
- if (term->cfg.rxvt_homeend &&
- (keysym == PK_HOME || keysym == PK_END)) {
- p += sprintf((char *) p, keysym == PK_HOME ? "\x1B[H" : "\x1BOw");
- goto done;
- }
-
if (term->vt52_mode) {
int xkey;
@@ -6158,11 +6151,23 @@
goto done;
}
+ /* Home/End */
+ if (keysym == PK_HOME || keysym == PK_END) {
+ /* Send the correct XTerm or rxvt codes for home/end
+ * We used to send ^[1~ and [4~ for Xterm,
+ * but those are Linux console */
+ const char *he;
+ if (term->cfg.rxvt_homeend)
+ he = keysym == PK_HOME ? "\x1B[7~" : "\x1B[8~";
+ else
+ he = keysym == PK_HOME ? "\x1BOH" : "\x1BOF";
+ p += sprintf((char *) p, he);
+ goto done;
+ }
+
switch (keysym) {
- case PK_HOME: code = 1; break;
case PK_INSERT: code = 2; break;
case PK_DELETE: code = 3; break;
- case PK_END: code = 4; break;
case PK_PAGEUP: code = 5; break;
case PK_PAGEDOWN: code = 6; break;
default: code = 0; break; /* else gcc warns `enum value not used' */

View file

@ -0,0 +1,29 @@
$NetBSD: patch-an,v 1.1.1.1 2009/09/07 18:01:43 ahoka Exp $
Make the home/end keys work on BSD servers as well as Linux ones
Index: unix/gtkwin.c
===================================================================
--- unix/gtkwin.c (revision 8466)
+++ unix/gtkwin.c (working copy)
@@ -979,9 +979,17 @@
use_ucsoutput = FALSE;
goto done;
}
- if (inst->cfg.rxvt_homeend && (code == 1 || code == 4)) {
- end = 1 + sprintf(output+1, code == 1 ? "\x1B[H" : "\x1BOw");
- use_ucsoutput = FALSE;
+ /* Home/End */
+ if (code == 1 || code == 4) {
+ /* Send the correct XTerm or rxvt codes for home/end
+ * We used to send ^[1~ and [4~ for Xterm,
+ * but those are Linux console */
+ const char *he;
+ if (inst->cfg.rxvt_homeend)
+ he = code == 1 ? "\x1B[7~" : "\x1B[8~";
+ else
+ he = code == 1 ? "\x1BOH" : "\x1BOF";
+ end = 1 + sprintf(output+1, he);
goto done;
}
if (code) {