initial import of putty-0.60 SSH/telnet client:
PuTTY is a SSH and Telnet client implementation. This package contains the command-line clients and supporting utilities for key generation. feedback steven@ mbalmer@; ok mbalmer@
This commit is contained in:
parent
deebfc3207
commit
adf1096a03
37
net/putty/Makefile
Normal file
37
net/putty/Makefile
Normal file
@ -0,0 +1,37 @@
|
||||
# $OpenBSD: Makefile,v 1.1.1.1 2007/09/04 09:14:00 djm Exp $
|
||||
|
||||
COMMENT-main= SSH and telnet client
|
||||
COMMENT-gui= PuTTY GUI clients
|
||||
|
||||
DISTNAME= putty-0.60
|
||||
PKGNAME-main= ${DISTNAME}
|
||||
PKGNAME-gui= ${DISTNAME:S/putty/putty-gui/}
|
||||
CATEGORIES= net security
|
||||
|
||||
HOMEPAGE= http://www.chiark.greenend.org.uk/~sgtatham/putty/
|
||||
MASTER_SITES= http://the.earth.li/~sgtatham/putty/latest/ \
|
||||
ftp://ftp.chiark.greenend.org.uk/users/sgtatham/putty-latest/
|
||||
|
||||
MAINTAINER= Damien Miller <djm@openbsd.org>
|
||||
|
||||
# BSD
|
||||
PERMIT_PACKAGE_CDROM= Yes
|
||||
PERMIT_PACKAGE_FTP= Yes
|
||||
PERMIT_DISTFILES_CDROM= Yes
|
||||
PERMIT_DISTFILES_FTP= Yes
|
||||
|
||||
CONFIGURE_STYLE= gnu
|
||||
WRKBUILD= ${WRKSRC}/unix
|
||||
|
||||
MULTI_PACKAGES= -main -gui
|
||||
|
||||
WANTLIB= c
|
||||
WANTLIB-gui= c m X11 Xext Xi glib gmodule iconv intl
|
||||
LIB_DEPENDS-gui= gtk.>=1,gdk.>=1::x11/gtk+
|
||||
|
||||
pre-configure:
|
||||
cd ${WRKSRC} && ./mkfiles.pl
|
||||
|
||||
NO_REGRESS= Yes
|
||||
|
||||
.include <bsd.port.mk>
|
5
net/putty/distinfo
Normal file
5
net/putty/distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
MD5 (putty-0.60.tar.gz) = B+Zf2YsW0RWuOKGAv7JC4g==
|
||||
RMD160 (putty-0.60.tar.gz) = nFbuTS0F9bEHnGXxml2dBrWWq6M=
|
||||
SHA1 (putty-0.60.tar.gz) = jZn48Qd7erJfAUEmtdgSoa1Vzjc=
|
||||
SHA256 (putty-0.60.tar.gz) = sruq+TJJl+hc8V1E7UHo6JU5yCFdzqydbXJyo328KEk=
|
||||
SIZE (putty-0.60.tar.gz) = 1743711
|
25
net/putty/patches/patch-unix_uxgen_c
Normal file
25
net/putty/patches/patch-unix_uxgen_c
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-unix_uxgen_c,v 1.1.1.1 2007/09/04 09:14:00 djm Exp $
|
||||
--- unix/uxgen.c.orig Tue Sep 4 17:31:05 2007
|
||||
+++ unix/uxgen.c Tue Sep 4 17:31:16 2007
|
||||
@@ -14,10 +14,10 @@ char *get_random_data(int len)
|
||||
int fd;
|
||||
int ngot, ret;
|
||||
|
||||
- fd = open("/dev/random", O_RDONLY);
|
||||
+ fd = open("/dev/arandom", O_RDONLY);
|
||||
if (fd < 0) {
|
||||
sfree(buf);
|
||||
- perror("puttygen: unable to open /dev/random");
|
||||
+ perror("puttygen: unable to open /dev/arandom");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ char *get_random_data(int len)
|
||||
ret = read(fd, buf+ngot, len-ngot);
|
||||
if (ret < 0) {
|
||||
close(fd);
|
||||
- perror("puttygen: unable to read /dev/random");
|
||||
+ perror("puttygen: unable to read /dev/arandom");
|
||||
return NULL;
|
||||
}
|
||||
ngot += ret;
|
90
net/putty/patches/patch-unix_uxnoise_c
Normal file
90
net/putty/patches/patch-unix_uxnoise_c
Normal file
@ -0,0 +1,90 @@
|
||||
$OpenBSD: patch-unix_uxnoise_c,v 1.1.1.1 2007/09/04 09:14:00 djm Exp $
|
||||
--- unix/uxnoise.c.orig Wed Nov 17 02:27:00 2004
|
||||
+++ unix/uxnoise.c Tue Sep 4 17:47:44 2007
|
||||
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/time.h>
|
||||
@@ -18,7 +19,7 @@ static int read_dev_urandom(char *buf, int len)
|
||||
int fd;
|
||||
int ngot, ret;
|
||||
|
||||
- fd = open("/dev/urandom", O_RDONLY);
|
||||
+ fd = open("/dev/arandom", O_RDONLY);
|
||||
if (fd < 0)
|
||||
return 0;
|
||||
|
||||
@@ -39,28 +40,16 @@ static int read_dev_urandom(char *buf, int len)
|
||||
* This function is called once, at PuTTY startup. It will do some
|
||||
* slightly silly things such as fetching an entire process listing
|
||||
* and scanning /tmp, load the saved random seed from disk, and
|
||||
- * also read 32 bytes out of /dev/urandom.
|
||||
+ * also read 32 bytes out of /dev/arandom.
|
||||
*/
|
||||
|
||||
void noise_get_heavy(void (*func) (void *, int))
|
||||
{
|
||||
- char buf[512];
|
||||
- FILE *fp;
|
||||
- int ret;
|
||||
+ char buf[32];
|
||||
|
||||
- if (read_dev_urandom(buf, 32))
|
||||
- func(buf, 32);
|
||||
+ if (read_dev_urandom(buf, sizeof(buf)))
|
||||
+ func(buf, sizeof(buf));
|
||||
|
||||
- fp = popen("ps -axu 2>/dev/null", "r");
|
||||
- while ( (ret = fread(buf, 1, sizeof(buf), fp)) > 0)
|
||||
- func(buf, ret);
|
||||
- pclose(fp);
|
||||
-
|
||||
- fp = popen("ls -al /tmp 2>/dev/null", "r");
|
||||
- while ( (ret = fread(buf, 1, sizeof(buf), fp)) > 0)
|
||||
- func(buf, ret);
|
||||
- pclose(fp);
|
||||
-
|
||||
read_random_seed(func);
|
||||
random_save_seed();
|
||||
}
|
||||
@@ -94,21 +83,13 @@ void noise_get_light(void (*func) (void *, int))
|
||||
*/
|
||||
void noise_regular(void)
|
||||
{
|
||||
- int fd;
|
||||
- int ret;
|
||||
- char buf[512];
|
||||
+ u_int32_t buf[8], i;
|
||||
struct rusage rusage;
|
||||
|
||||
- if ((fd = open("/proc/meminfo", O_RDONLY)) >= 0) {
|
||||
- while ( (ret = read(fd, buf, sizeof(buf))) > 0)
|
||||
- random_add_noise(buf, ret);
|
||||
- close(fd);
|
||||
- }
|
||||
- if ((fd = open("/proc/stat", O_RDONLY)) >= 0) {
|
||||
- while ( (ret = read(fd, buf, sizeof(buf))) > 0)
|
||||
- random_add_noise(buf, ret);
|
||||
- close(fd);
|
||||
- }
|
||||
+ for (i = 0; i < 8; i++)
|
||||
+ buf[i] = arc4random();
|
||||
+ random_add_noise(buf, sizeof(buf));
|
||||
+
|
||||
getrusage(RUSAGE_SELF, &rusage);
|
||||
random_add_noise(&rusage, sizeof(rusage));
|
||||
}
|
||||
@@ -121,6 +102,9 @@ void noise_regular(void)
|
||||
void noise_ultralight(unsigned long data)
|
||||
{
|
||||
struct timeval tv;
|
||||
+ u_int32_t r;
|
||||
+ r = arc4random();
|
||||
+ random_add_noise(&r, sizeof(r));
|
||||
gettimeofday(&tv, NULL);
|
||||
random_add_noise(&tv, sizeof(tv));
|
||||
random_add_noise(&data, sizeof(data));
|
1
net/putty/pkg/DESCR-gui
Normal file
1
net/putty/pkg/DESCR-gui
Normal file
@ -0,0 +1 @@
|
||||
PuTTY GUI SSH and telnet clients.
|
2
net/putty/pkg/DESCR-main
Normal file
2
net/putty/pkg/DESCR-main
Normal file
@ -0,0 +1,2 @@
|
||||
PuTTY is a SSH and Telnet client implementation. This package contains
|
||||
the command-line clients and supporting utilities for key generation.
|
7
net/putty/pkg/PLIST-gui
Normal file
7
net/putty/pkg/PLIST-gui
Normal file
@ -0,0 +1,7 @@
|
||||
@comment $OpenBSD: PLIST-gui,v 1.1.1.1 2007/09/04 09:14:00 djm Exp $
|
||||
bin/pterm
|
||||
bin/putty
|
||||
bin/puttytel
|
||||
@man man/man1/pterm.1
|
||||
@man man/man1/putty.1
|
||||
@man man/man1/puttytel.1
|
9
net/putty/pkg/PLIST-main
Normal file
9
net/putty/pkg/PLIST-main
Normal file
@ -0,0 +1,9 @@
|
||||
@comment $OpenBSD: PLIST-main,v 1.1.1.1 2007/09/04 09:14:00 djm Exp $
|
||||
bin/plink
|
||||
bin/pscp
|
||||
bin/psftp
|
||||
bin/puttygen
|
||||
@man man/man1/plink.1
|
||||
@man man/man1/pscp.1
|
||||
@man man/man1/psftp.1
|
||||
@man man/man1/puttygen.1
|
Loading…
Reference in New Issue
Block a user