aboutsummaryrefslogtreecommitdiff
path: root/net/pptpclient
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>1999-06-19 22:41:33 +0000
committerJohn Polstra <jdp@FreeBSD.org>1999-06-19 22:41:33 +0000
commitf9c4cd91567c91f57d5ff294e9b1967702cce74d (patch)
treed74d82313a116807d645c31af54d9eed5164c5f8 /net/pptpclient
parent2798541c26f90968392576b04b2f851df044cc04 (diff)
downloadports-f9c4cd91567c91f57d5ff294e9b1967702cce74d.tar.gz
ports-f9c4cd91567c91f57d5ff294e9b1967702cce74d.zip
Notes
Diffstat (limited to 'net/pptpclient')
-rw-r--r--net/pptpclient/Makefile23
-rw-r--r--net/pptpclient/distinfo1
-rw-r--r--net/pptpclient/files/README30
-rw-r--r--net/pptpclient/files/patch-aa51
-rw-r--r--net/pptpclient/files/patch-ab43
-rw-r--r--net/pptpclient/files/patch-ac14
-rw-r--r--net/pptpclient/files/patch-ad28
-rw-r--r--net/pptpclient/files/patch-ae46
-rw-r--r--net/pptpclient/files/ppp.conf8
-rw-r--r--net/pptpclient/pkg-comment1
-rw-r--r--net/pptpclient/pkg-descr17
-rw-r--r--net/pptpclient/pkg-plist4
12 files changed, 266 insertions, 0 deletions
diff --git a/net/pptpclient/Makefile b/net/pptpclient/Makefile
new file mode 100644
index 000000000000..950b13507d9b
--- /dev/null
+++ b/net/pptpclient/Makefile
@@ -0,0 +1,23 @@
+# New ports collection makefile for: pptpclient
+# Version required: 1.0.2
+# Date created: 19 June 1999
+# Whom: John Polstra <jdp@freebsd.org>
+#
+# $Id$
+#
+
+DISTNAME= pptp-linux-1.0.2
+PKGNAME= pptpclient-1.0.2
+CATEGORIES= net
+MASTER_SITES= http://www.pdos.lcs.mit.edu/~cananian/Projects/PPTP/release/ \
+ ftp://ftp.kddlabs.co.jp/pub/inet/vpn/pptp-linux/ \
+ ftp://ftp.iks-jena.de/pub/software/linux/net/
+
+MAINTAINER= jdp@freebsd.org
+
+post-install:
+ ${MKDIR} ${PREFIX}/share/examples/pptpclient
+ ${INSTALL_DATA} ${FILESDIR}/README ${PREFIX}/share/examples/pptpclient
+ ${INSTALL_DATA} ${FILESDIR}/ppp.conf ${PREFIX}/share/examples/pptpclient
+
+.include <bsd.port.mk>
diff --git a/net/pptpclient/distinfo b/net/pptpclient/distinfo
new file mode 100644
index 000000000000..ccb9b1b696a1
--- /dev/null
+++ b/net/pptpclient/distinfo
@@ -0,0 +1 @@
+MD5 (pptp-linux-1.0.2.tar.gz) = 257835dbb111673dcf80bdf927a1be87
diff --git a/net/pptpclient/files/README b/net/pptpclient/files/README
new file mode 100644
index 000000000000..1805c93dfa6b
--- /dev/null
+++ b/net/pptpclient/files/README
@@ -0,0 +1,30 @@
+Quickstart for the PPTP client.
+
+Set up your /etc/ppp/ppp.conf based on the example in this directory.
+Make these substitutions:
+
+ SERVER IP address of the PPTP server
+
+ LABEL PPP label to use (must be the same on the command
+ line and in the ppp.conf file)
+
+ USER Your account name on the server
+
+ PASSWORD Your password on the server
+
+ Change the "add" commands in ppp.conf to set up the routing
+ appropriately.
+
+Note: your PPP program must be new enough to support MS-CHAP
+authentication.
+
+You must run the program as root. Use a command like this:
+
+ pptp SERVER LABEL
+
+Kill it with ^C when you're done.
+
+If you want to access the remote system from other hosts on your LAN,
+be sure to turn on IP forwarding on the PPTP client machine.
+
+John Polstra <jdp@freebsd.org>
diff --git a/net/pptpclient/files/patch-aa b/net/pptpclient/files/patch-aa
new file mode 100644
index 000000000000..d826f142e01f
--- /dev/null
+++ b/net/pptpclient/files/patch-aa
@@ -0,0 +1,51 @@
+--- Makefile.orig Wed Feb 18 14:42:14 1998
++++ Makefile Sat Jun 19 15:06:52 1999
+@@ -1,19 +1,30 @@
+ VERSION = 1.0.2
+ VERSION_DEFINE = '-DPPTP_LINUX_VERSION="${VERSION}"'
+
+-CC = gcc -Wall
+-DEBUG = -g
++CC = gcc
++DEBUG =
+ INCLUDE =
+-CFLAGS = -O9 $(VERSION_DEFINE) $(DEBUG) $(INCLUDE)
++CFLAGS = -O $(VERSION_DEFINE) $(DEBUG) $(INCLUDE)
+ LIBS =
+ LDFLAGS =
++RM = rm -f
+
+ #################################################################
+-# CHANGE THIS LINE to point to the location of your pppd binary.
++# CHANGE THESE LINES to change where programs are installed.
++#################################################################
++# This is the directory where pptp gets installed:
++PPTP_BINDIR = ${PREFIX}/sbin
++
++# This is the directory where pptp_callmgr gets installed:
++CALLMGR_BINDIR = ${PREFIX}/libexec
+
+-CFLAGS += '-DPPPD_BINARY="/usr/sbin/pppd"'
++# This is the pathname of your pppd binary:
++#CFLAGS += '-DPPPD_BINARY="/usr/sbin/pppd"'
++CFLAGS += '-DPPPD_BINARY="/usr/sbin/ppp"' -DUSER_PPP
+ #################################################################
+
++CFLAGS += '-DPPTP_CALLMGR_BINARY="$(CALLMGR_BINDIR)/$(CALLMGR_BIN)"'
++
+ PPTP_BIN = pptp
+ PPTP_OBJS = pptp.o pptp_gre.o ppp_fcs.o pty.o \
+ pptp_ctrl.o dirutil.o vector.o \
+@@ -34,6 +45,12 @@
+
+ vector_test: vector_test.o vector.o
+ $(CC) -o vector_test vector_test.o vector.o
++
++install: all
++ test -d $(PPTP_BINDIR) || mkdir -p $(PPTP_BINDIR)
++ install -c -s -o root -g wheel -m 755 $(PPTP_BIN) $(PPTP_BINDIR)
++ test -d $(CALLMGR_BINDIR) || mkdir -p $(CALLMGR_BINDIR)
++ install -c -s -o root -g wheel -m 755 $(CALLMGR_BIN) $(CALLMGR_BINDIR)
+
+ clean:
+ $(RM) *.o *~
diff --git a/net/pptpclient/files/patch-ab b/net/pptpclient/files/patch-ab
new file mode 100644
index 000000000000..5b024aa90ef0
--- /dev/null
+++ b/net/pptpclient/files/patch-ab
@@ -0,0 +1,43 @@
+RCS file: /home/jdp/f5/pptp/cvs/pptp/pptp.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.3
+diff -u -r1.1.1.1 -r1.3
+--- pptp.c 1999/04/28 19:36:57 1.1.1.1
++++ pptp.c 1999/04/29 17:05:59 1.3
+@@ -18,6 +18,7 @@
+ #include <signal.h>
+ #include <setjmp.h>
+ #include <errno.h>
++#include <fcntl.h>
+ #include <sys/wait.h>
+ #include "pptp_callmgr.h"
+ #include "pptp_gre.h"
+@@ -235,13 +236,23 @@
+ void launch_pppd(char *ttydev, int argc, char **argv) {
+ char *new_argv[argc+4]; /* XXX if not using GCC, hard code a limit here. */
+ int i;
++ int newi = 0;
+
+- new_argv[0] = PPPD_BINARY;
+- new_argv[1] = ttydev;
+- new_argv[2] = "38400";
++ new_argv[newi++] = PPPD_BINARY;
++#ifdef USER_PPP
++ new_argv[newi++] = "-direct";
++ if ((i = open(ttydev, O_RDWR)) == -1)
++ fatal("Cannot open %s: %s", ttydev, strerror(errno));
++ if (dup2(i, 0) == -1)
++ fatal("dup2 failed: %s", strerror(errno));
++ close(i);
++#else
++ new_argv[newi++] = ttydev;
++ new_argv[newi++] = "38400";
++#endif
+ for (i=0; i<argc; i++)
+- new_argv[i+3] = argv[i];
+- new_argv[i+3] = NULL;
++ new_argv[newi++] = argv[i];
++ new_argv[newi] = NULL;
+ execvp(new_argv[0], new_argv);
+ }
+
diff --git a/net/pptpclient/files/patch-ac b/net/pptpclient/files/patch-ac
new file mode 100644
index 000000000000..50a2f85ae0a9
--- /dev/null
+++ b/net/pptpclient/files/patch-ac
@@ -0,0 +1,14 @@
+RCS file: /home/jdp/f5/pptp/cvs/pptp/pptp_callmgr.h,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- pptp_callmgr.h 1999/04/28 19:36:57 1.1.1.1
++++ pptp_callmgr.h 1999/04/28 19:43:06 1.2
+@@ -6,4 +6,7 @@
+ */
+
+ #define PPTP_SOCKET_PREFIX "/var/run/pptp/"
++
++#ifndef PPTP_CALLMGR_BINARY
+ #define PPTP_CALLMGR_BINARY "./pptp_callmgr"
++#endif
diff --git a/net/pptpclient/files/patch-ad b/net/pptpclient/files/patch-ad
new file mode 100644
index 000000000000..a55ccfd63f34
--- /dev/null
+++ b/net/pptpclient/files/patch-ad
@@ -0,0 +1,28 @@
+RCS file: /home/jdp/f5/pptp/cvs/pptp/pptp_gre.c,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- pptp_gre.c 1999/04/28 19:36:57 1.1.1.1
++++ pptp_gre.c 1999/04/28 19:43:56 1.2
+@@ -5,10 +5,10 @@
+ * $Id: pptp_gre.c,v 1.5 1997/12/15 10:11:38 cananian Exp $
+ */
+
++#include <sys/types.h>
++#include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
+-#include <sys/socket.h>
+-#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/time.h>
+ #include <unistd.h>
+@@ -59,7 +59,7 @@
+ struct sockaddr_in src_addr;
+ int s, n, stat1, stat2;
+
+- pptp_gre_call_id = call_id;
++ pptp_gre_call_id = peer_call_id;
+ /* Open IP protocol socket */
+ s = socket(AF_INET, SOCK_RAW, PPTP_PROTO);
+ if (s<0) { warn("socket: %s", strerror(errno)); return; }
diff --git a/net/pptpclient/files/patch-ae b/net/pptpclient/files/patch-ae
new file mode 100644
index 000000000000..dfd12056309e
--- /dev/null
+++ b/net/pptpclient/files/patch-ae
@@ -0,0 +1,46 @@
+RCS file: /home/jdp/f5/pptp/cvs/pptp/pty.h,v
+retrieving revision 1.1.1.1
+retrieving revision 1.2
+diff -u -r1.1.1.1 -r1.2
+--- pty.h 1999/04/28 19:36:57 1.1.1.1
++++ pty.h 1999/04/28 19:42:34 1.2
+@@ -6,18 +6,32 @@
+ * $Id: pty.h,v 1.2 1997/12/13 08:39:01 cananian Exp $
+ */
+
+-/* Hmm. PTYs can be anywhere.... */
+-
+ #ifdef __linux__
+-#define PTYDEV "/dev/ptyxx"
+-#define TTYDEV "/dev/ttyxx"
++#define PTYCHAR1 "abcdepqrstuvwxyz"
++#define PTYCHAR2 "0123456789abcdef"
++#endif
+
+-#define PTYMAX (strlen(PTYDEV)+1)
+-#define TTYMAX (strlen(TTYDEV)+1)
++#ifdef __FreeBSD__
++#define PTYCHAR1 "pqrsPQRS"
++#define PTYCHAR2 "0123456789abcdefghijklmnopqrstuv"
++#endif
+
+-#define PTYCHAR1 "abcdepqrstuvwxyz"
++/* Conservative defaults that will work for most systems. */
++#ifndef PTYDEV
++#define PTYDEV "/dev/ptyxx"
++#endif
++#ifndef TTYDEV
++#define TTYDEV "/dev/ttyxx"
++#endif
++#ifndef PTYCHAR1
++#define PTYCHAR1 "pqrs"
++#endif
++#ifndef PTYCHAR2
+ #define PTYCHAR2 "0123456789abcdef"
+ #endif
++
++#define PTYMAX (strlen(PTYDEV)+1)
++#define TTYMAX (strlen(TTYDEV)+1)
+
+ /* Get pty/tty pair, put filename in ttydev, ptydev (which must be
+ * at least PTYMAX characters long), and return file descriptor of
diff --git a/net/pptpclient/files/ppp.conf b/net/pptpclient/files/ppp.conf
new file mode 100644
index 000000000000..997dca26061c
--- /dev/null
+++ b/net/pptpclient/files/ppp.conf
@@ -0,0 +1,8 @@
+LABEL:
+ set authname USER
+ set authkey PASSWORD
+ set timeout 0
+ set ifaddr 0 0
+ add 192.168.11.0/24 HISADDR
+ add 192.168.101.0/24 HISADDR
+ alias enable yes
diff --git a/net/pptpclient/pkg-comment b/net/pptpclient/pkg-comment
new file mode 100644
index 000000000000..c1d684149ea9
--- /dev/null
+++ b/net/pptpclient/pkg-comment
@@ -0,0 +1 @@
+A PPTP client for establishing a VPN link with an NT server.
diff --git a/net/pptpclient/pkg-descr b/net/pptpclient/pkg-descr
new file mode 100644
index 000000000000..415b809c0a81
--- /dev/null
+++ b/net/pptpclient/pkg-descr
@@ -0,0 +1,17 @@
+This is a port of the "pptp-linux" PPTP client. It can establish a
+PPP connection with an NT server, tunneled through a PPTP link over
+the Internet. In effect, it makes the client machine behave as if
+it were on the same LAN as the server.
+
+I have fixed one serious bug in the program, and have patched it to
+use FreeBSD's userland "ppp" package rather than "pppd" which it
+was originally designed to use. I found that "ppp" supplied more
+versatility and was easier to set up.
+
+There is no manpage for this package, but you will find some
+quickstart instructions and example configuration files in
+"${PREFIX}/share/examples/pptpclient".
+
+WWW: http://www.pdos.lcs.mit.edu/~cananian/Projects/PPTP/
+
+John Polstra <jdp@freebsd.org>
diff --git a/net/pptpclient/pkg-plist b/net/pptpclient/pkg-plist
new file mode 100644
index 000000000000..44ec9f5d906f
--- /dev/null
+++ b/net/pptpclient/pkg-plist
@@ -0,0 +1,4 @@
+libexec/pptp_callmgr
+sbin/pptp
+share/examples/pptpclient/README
+share/examples/pptpclient/ppp.conf