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. WWW: http://www.chiark.greenend.org.uk/~sgtatham/putty/
This commit is contained in:
parent
dd53c83aa1
commit
4d3b1de9f7
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=100863
@ -315,6 +315,7 @@
|
||||
SUBDIR += proxycheck
|
||||
SUBDIR += proxytunnel
|
||||
SUBDIR += pscan
|
||||
SUBDIR += putty
|
||||
SUBDIR += pwman
|
||||
SUBDIR += pxytest
|
||||
SUBDIR += py-cryptkit
|
||||
|
43
security/putty/Makefile
Normal file
43
security/putty/Makefile
Normal file
@ -0,0 +1,43 @@
|
||||
# New ports collection makefile for: putty
|
||||
# Date created: 13 Feb 2004
|
||||
# Whom: dirk.meyer@dinoex.sub.org
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
|
||||
PORTNAME= putty
|
||||
PORTVERSION= 0.54
|
||||
CATEGORIES= security
|
||||
MASTER_SITES= http://the.earth.li/~sgtatham/putty/%SUBDIR%/
|
||||
MASTER_SITE_SUBDIR= ${PORTVERSION}
|
||||
|
||||
MAINTAINER= dinoex@FreeBSD.org
|
||||
COMMENT= Secure shell and telnet client
|
||||
|
||||
USE_GMAKE= yes
|
||||
WRKSRC= ${WRKDIR}/${DISTNAME}/unix
|
||||
MAKEFILE= Makefile.gtk
|
||||
CFLAGS+= -DOMIT_UTMP
|
||||
CFLAGS= -DBSD_PTYS -DOMIT_UTMP
|
||||
|
||||
PLIST_FILES= bin/plink bin/pscp bin/psftp
|
||||
MAN1= plink.1
|
||||
|
||||
.ifndef WITHOUT_GTK
|
||||
USE_GNOME= gtk12
|
||||
PLIST_FILES+= bin/pterm bin/putty bin/puttygen bin/puttytel
|
||||
MAN1+= pterm.1 putty.1 puttygen.1 puttytel.1
|
||||
MAKE_ENV+= PUTTY_WITH_GTK=yes
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${OSVERSION} < 500000
|
||||
CFLAGS+= -DFREEBSD_MB_SUPPORT
|
||||
|
||||
do-configure:
|
||||
${CP} ${FILESDIR}/wcrtomb.c ${FILESDIR}/mbrtowc.c \
|
||||
${WRKSRC}/
|
||||
.endif
|
||||
|
||||
.include <bsd.port.post.mk>
|
2
security/putty/distinfo
Normal file
2
security/putty/distinfo
Normal file
@ -0,0 +1,2 @@
|
||||
MD5 (putty-0.54.tar.gz) = ea6de3bc40bb34f4a4a8c861c08e6f31
|
||||
SIZE (putty-0.54.tar.gz) = 901120
|
79
security/putty/files/mbrtowc.c
Normal file
79
security/putty/files/mbrtowc.c
Normal file
@ -0,0 +1,79 @@
|
||||
/*-
|
||||
* Copyright (c) 2002, 2003 Tim J. Robbins.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD: /tmp/pcvs/ports/security/putty/files/mbrtowc.c,v 1.1 2004-02-13 17:45:38 dinoex Exp $");
|
||||
|
||||
#include <errno.h>
|
||||
#include <rune.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
|
||||
/*
|
||||
* Emulate the ISO C mbrtowc() function in terms of the deprecated
|
||||
* 4.4BSD sgetrune() function.
|
||||
*/
|
||||
size_t
|
||||
mbrtowc(wchar_t * __restrict pwc, const char * __restrict s,
|
||||
size_t n, mbstate_t * __restrict ps __unused)
|
||||
{
|
||||
const char *e;
|
||||
rune_t r;
|
||||
|
||||
if (s == NULL) {
|
||||
pwc = NULL;
|
||||
s = "";
|
||||
n = 1;
|
||||
}
|
||||
|
||||
if ((r = sgetrune(s, n, &e)) == _INVALID_RUNE) {
|
||||
/*
|
||||
* The design of sgetrune() doesn't give us any way to tell
|
||||
* between incomplete and invalid multibyte sequences.
|
||||
*/
|
||||
|
||||
if (n >= (size_t)MB_CUR_MAX) {
|
||||
/*
|
||||
* If we have been supplied with at least MB_CUR_MAX
|
||||
* bytes and still cannot find a valid character, the
|
||||
* data must be invalid.
|
||||
*/
|
||||
errno = EILSEQ;
|
||||
return ((size_t)-1);
|
||||
}
|
||||
|
||||
/*
|
||||
* .. otherwise, it's an incomplete character or an invalid
|
||||
* character we cannot detect yet.
|
||||
*/
|
||||
return ((size_t)-2);
|
||||
}
|
||||
|
||||
if (pwc != NULL)
|
||||
*pwc = (wchar_t)r;
|
||||
|
||||
return (r != 0 ? (size_t)(e - s) : 0);
|
||||
}
|
53
security/putty/files/patch-Makefile.gtk
Normal file
53
security/putty/files/patch-Makefile.gtk
Normal file
@ -0,0 +1,53 @@
|
||||
--- Makefile.gtk.orig Thu Feb 12 19:43:43 2004
|
||||
+++ Makefile.gtk Fri Feb 13 14:48:57 2004
|
||||
@@ -80,7 +80,7 @@
|
||||
# TOOLPATH = /opt/gcc/bin
|
||||
CC = $(TOOLPATH)cc
|
||||
|
||||
-CFLAGS = -O2 -Wall -Werror -g -I. -I.. -I../charset `gtk-config --cflags`
|
||||
+CFLAGS += -Wall -g -I. -I.. -I../charset `gtk-config --cflags`
|
||||
XLDFLAGS = `gtk-config --libs`
|
||||
ULDFLAGS =#
|
||||
INSTALL=install
|
||||
@@ -97,7 +97,11 @@
|
||||
%.o:
|
||||
$(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) -c $<
|
||||
|
||||
+ifdef PUTTY_WITH_GTK
|
||||
all: plink pscp psftp pterm putty puttygen puttytel
|
||||
+else
|
||||
+all: plink pscp psftp
|
||||
+endif
|
||||
|
||||
plink: be_all.o cmdline.o ldisc.o logging.o misc.o portfwd.o proxy.o raw.o \
|
||||
rlogin.o settings.o signal.o ssh.o sshaes.o sshblowf.o \
|
||||
@@ -560,7 +564,7 @@
|
||||
version.o: FORCE;
|
||||
# Hack to force version.o to be rebuilt always
|
||||
FORCE:
|
||||
- if test -z "$(VER)" && (cd ..; md5sum -c manifest); then \
|
||||
+ if test -z "$(VER)" ; then \
|
||||
$(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) `cat ../version.def` -c ../version.c; \
|
||||
else \
|
||||
$(CC) $(COMPAT) $(FWHACK) $(XFLAGS) $(CFLAGS) $(VER) -c ../version.c; \
|
||||
@@ -572,17 +576,17 @@
|
||||
$(INSTALL_PROGRAM) -m 755 plink $(DESTDIR)$(bindir)/plink
|
||||
$(INSTALL_PROGRAM) -m 755 pscp $(DESTDIR)$(bindir)/pscp
|
||||
$(INSTALL_PROGRAM) -m 755 psftp $(DESTDIR)$(bindir)/psftp
|
||||
+ $(INSTALL_DATA) -m 644 plink.1 $(DESTDIR)$(man1dir)/plink.1
|
||||
+ifdef PUTTY_WITH_GTK
|
||||
$(INSTALL_PROGRAM) -m 755 pterm $(DESTDIR)$(bindir)/pterm
|
||||
$(INSTALL_PROGRAM) -m 755 putty $(DESTDIR)$(bindir)/putty
|
||||
$(INSTALL_PROGRAM) -m 755 puttygen $(DESTDIR)$(bindir)/puttygen
|
||||
$(INSTALL_PROGRAM) -m 755 puttytel $(DESTDIR)$(bindir)/puttytel
|
||||
- $(INSTALL_DATA) -m 644 plink.1 $(DESTDIR)$(man1dir)/plink.1
|
||||
- $(INSTALL_DATA) -m 644 pscp.1 $(DESTDIR)$(man1dir)/pscp.1
|
||||
- $(INSTALL_DATA) -m 644 psftp.1 $(DESTDIR)$(man1dir)/psftp.1
|
||||
$(INSTALL_DATA) -m 644 pterm.1 $(DESTDIR)$(man1dir)/pterm.1
|
||||
$(INSTALL_DATA) -m 644 putty.1 $(DESTDIR)$(man1dir)/putty.1
|
||||
$(INSTALL_DATA) -m 644 puttygen.1 $(DESTDIR)$(man1dir)/puttygen.1
|
||||
$(INSTALL_DATA) -m 644 puttytel.1 $(DESTDIR)$(man1dir)/puttytel.1
|
||||
+endif
|
||||
|
||||
install-strip:
|
||||
$(MAKE) install INSTALL_PROGRAM="$(INSTALL_PROGRAM) -s"
|
35
security/putty/files/patch-pty.c
Normal file
35
security/putty/files/patch-pty.c
Normal file
@ -0,0 +1,35 @@
|
||||
--- pty.c.orig Sun May 11 14:28:53 2003
|
||||
+++ pty.c Fri Feb 13 15:06:26 2004
|
||||
@@ -14,7 +14,9 @@
|
||||
#define _XOPEN_SOURCE
|
||||
#define _XOPEN_SOURCE_EXTENDED
|
||||
#define _GNU_SOURCE
|
||||
+#ifndef __FreeBSD__
|
||||
#include <features.h>
|
||||
+#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
@@ -32,6 +34,10 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <errno.h>
|
||||
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <sys/stat.h>
|
||||
+#endif
|
||||
+
|
||||
#include "putty.h"
|
||||
|
||||
#ifndef FALSE
|
||||
@@ -567,9 +573,9 @@
|
||||
ioctl(slavefd, TIOCSCTTY, 1);
|
||||
pgrp = getpid();
|
||||
tcsetpgrp(slavefd, pgrp);
|
||||
- setpgrp();
|
||||
+ setpgrp( pgrp, -1 );
|
||||
close(open(pty_name, O_WRONLY, 0));
|
||||
- setpgrp();
|
||||
+ setpgrp( pgrp, -1 );
|
||||
/* Close everything _else_, for tidiness. */
|
||||
for (i = 3; i < 1024; i++)
|
||||
close(i);
|
16
security/putty/files/patch-uxnet.c
Normal file
16
security/putty/files/patch-uxnet.c
Normal file
@ -0,0 +1,16 @@
|
||||
--- uxnet.c.orig Tue Feb 3 15:47:43 2004
|
||||
+++ uxnet.c Fri Feb 13 14:19:00 2004
|
||||
@@ -11,8 +11,13 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#ifdef __FreeBSD__
|
||||
+#include <netinet/in.h>
|
||||
+#include <arpa/inet.h>
|
||||
+#else
|
||||
#include <arpa/inet.h>
|
||||
#include <netinet/in.h>
|
||||
+#endif
|
||||
#include <netinet/tcp.h>
|
||||
#include <netdb.h>
|
||||
|
19
security/putty/files/patch-uxucs.c
Normal file
19
security/putty/files/patch-uxucs.c
Normal file
@ -0,0 +1,19 @@
|
||||
--- uxucs.c.orig Sat Apr 26 16:22:42 2003
|
||||
+++ uxucs.c Fri Feb 13 15:27:13 2004
|
||||
@@ -12,6 +12,16 @@
|
||||
#include "terminal.h"
|
||||
#include "misc.h"
|
||||
|
||||
+#ifdef FREEBSD_MB_SUPPORT
|
||||
+size_t mbrtowc __P((wchar_t * __restrict, const char * __restrict, size_t,
|
||||
+ mbstate_t * __restrict));
|
||||
+size_t wcrtomb __P((char * __restrict, wchar_t, mbstate_t * __restrict));
|
||||
+
|
||||
+#include "mbrtowc.c"
|
||||
+#include "wcrtomb.c"
|
||||
+
|
||||
+#endif
|
||||
+
|
||||
/*
|
||||
* Unix Unicode-handling routines.
|
||||
*/
|
57
security/putty/files/wcrtomb.c
Normal file
57
security/putty/files/wcrtomb.c
Normal file
@ -0,0 +1,57 @@
|
||||
/*-
|
||||
* Copyright (c) 2002, 2003 Tim J. Robbins.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__FBSDID("$FreeBSD: /tmp/pcvs/ports/security/putty/files/wcrtomb.c,v 1.1 2004-02-13 17:45:39 dinoex Exp $");
|
||||
|
||||
#include <errno.h>
|
||||
#include <limits.h>
|
||||
#include <rune.h>
|
||||
#include <stdlib.h>
|
||||
#include <wchar.h>
|
||||
|
||||
/*
|
||||
* Emulate the ISO C wcrtomb() function in terms of the deprecated
|
||||
* 4.4BSD sputrune() function.
|
||||
*/
|
||||
size_t
|
||||
wcrtomb(char * __restrict s, wchar_t wc,
|
||||
mbstate_t * __restrict ps __unused)
|
||||
{
|
||||
char *e;
|
||||
char buf[MB_LEN_MAX];
|
||||
|
||||
if (s == NULL) {
|
||||
s = buf;
|
||||
wc = L'\0';
|
||||
}
|
||||
sputrune(wc, s, MB_CUR_MAX, &e);
|
||||
if (e == NULL) {
|
||||
errno = EILSEQ;
|
||||
return ((size_t)-1);
|
||||
}
|
||||
return ((size_t)(e - s));
|
||||
}
|
8
security/putty/pkg-descr
Normal file
8
security/putty/pkg-descr
Normal file
@ -0,0 +1,8 @@
|
||||
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.
|
||||
|
||||
WWW: http://www.chiark.greenend.org.uk/~sgtatham/putty/
|
Loading…
Reference in New Issue
Block a user