aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testing/pptpd/APKBUILD49
-rw-r--r--testing/pptpd/options.pptp11
-rw-r--r--testing/pptpd/pptpd.conf88
-rw-r--r--testing/pptpd/pptpd.confd5
-rw-r--r--testing/pptpd/pptpd.initd20
-rw-r--r--testing/pptpd/pptpd.patch69
-rw-r--r--testing/pptpd/rcpptpd67
7 files changed, 309 insertions, 0 deletions
diff --git a/testing/pptpd/APKBUILD b/testing/pptpd/APKBUILD
new file mode 100644
index 0000000000..3a0082d94c
--- /dev/null
+++ b/testing/pptpd/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Danilo Godec <danilo.godec@agenda.si>
+# Maintainer:
+pkgname=pptpd
+pkgver=1.3.4
+pkgrel=0
+pkgdesc="PoPToP - PPTP Daemon, Linux as Microsoft VPN Server"
+url="http://www.poptop.org/"
+arch="all"
+license="GPL v2 or later"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-doc"
+source="saveas-http://sourceforge.net/projects/poptop/files/$pkgname/$pkgname-$pkgver/$pkgname-$pkgver.tar.gz/download/$pkgname-$pkgver.tar.gz pptpd.patch pptpd.confd pptpd.initd options.pptp pptpd.conf"
+
+_builddir="$srcdir"/$pkgname-$pkgver
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr --sysconfdir=/etc || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+ install -Dm755 "$srcdir"/pptpd.initd "$pkgdir"/etc/init.d/pptpd
+ install -Dm644 "$srcdir"/pptpd.confd "$pkgdir"/etc/conf.d/pptpd
+ install -Dm644 "$srcdir"/options.pptp "$pkgdir"/etc/ppp/options.pptp
+ install -Dm644 "$srcdir"/pptpd.conf "$pkgdir"/etc/
+}
+
+md5sums="b38df9c431041922c997c1148bedf591 pptpd-1.3.4.tar.gz
+5a6da6f9d62c9db58033267f0578e79f pptpd.patch
+bff575819b8997e7bbe743b95cb134cb pptpd.confd
+184b6c9cc04e1efc830e39da6c3bfefc pptpd.initd
+95f1efd9f4f896bf3b7aef1940c58e79 options.pptp
+0a7af8968a964ebccf12ad512be9bba5 pptpd.conf"
diff --git a/testing/pptpd/options.pptp b/testing/pptpd/options.pptp
new file mode 100644
index 0000000000..645c6e24d7
--- /dev/null
+++ b/testing/pptpd/options.pptp
@@ -0,0 +1,11 @@
+lock
+debug
+auth
++chap
++chapms
++chapms-v2
+mppe-40
+mppe-128
+mppe-stateless
+name test02
+proxyarp
diff --git a/testing/pptpd/pptpd.conf b/testing/pptpd/pptpd.conf
new file mode 100644
index 0000000000..258f5d5ccc
--- /dev/null
+++ b/testing/pptpd/pptpd.conf
@@ -0,0 +1,88 @@
+################################################################################
+#
+# Sample PoPToP configuration file
+#
+# for PoPToP version 1.0.0
+#
+################################################################################
+
+# TAG: speed
+#
+# Specifies the speed for the PPP daemon to talk at.
+# Some PPP daemons will ignore this value.
+#
+speed 115200
+
+# TAG: option
+#
+# Specifies the location of the PPP options file.
+# By default PPP looks in '/etc/ppp/options'
+#
+#option /this/is/the/options/file
+option /etc/ppp/options.pptp
+
+# TAG: debug
+#
+# Turns on (more) debugging to syslog.
+#
+debug
+
+# TAG: localip
+# TAG: remoteip
+#
+# Specifies the local and remote IP address ranges.
+#
+# You can specify single IP addresses seperated by commas or you can
+# specify ranges, or both. For example:
+#
+# 192.168.0.234,192.168.0.245-249,192.168.0.254
+#
+# IMPORTANT RESTRICTIONS:
+#
+# 1. No spaces are permitted between commas or within addresses.
+#
+# 2. If you give more IP addresses than MAX_CONNECTIONS, it will
+# start at the beginning of the list and go until it gets
+# MAX_CONNECTIONS IPs. Others will be ignored.
+#
+# 3. No shortcuts in ranges! ie. 234-8 does not mean 234 to 238,
+# you must type 234-238 if you mean this.
+#
+# 4. If you give a single localIP, that's ok - all local IPs will
+# be set to the given one. You MUST still give at least one remote
+# IP for each simultaneous client.
+#
+#localip 192.168.0.234-238,192.168.0.245
+#remoteip 192.168.1.234-238,192.168.1.245
+
+localip 192.168.0.1
+remoteip 192.168.1.100-199
+
+# TAG: ipxnets
+#
+# This gives the range of IPX networks to allocate to clients. By
+# default IPX network number allocation is not handled internally.
+# By putting a low and high network number here a pool of IPX networks
+# can be defined. If this is done then there must be one IPX network
+# per client.
+#
+# The format is a pair of hex numbers without any 0x prefix separated
+# by a hyphen.
+#
+#ipxnets 00001000-00001FFF
+
+# TAG: listen
+#
+# Defines the IP address of the local interface on which pptpd
+# should listen for connections. The default is to listen on all
+# local interfaces (even ones brought up by pptp connections, thus
+# permitting pptp tunnels inside the pptp tunnels).
+#
+#listen 192.168.0.1
+
+# TAG: pidfile
+#
+# This defines the file name in which pptpd should store its process
+# ID (or pid). The default is /var/run/pptpd.pid.
+#
+pidfile /var/run/pptpd.pid
diff --git a/testing/pptpd/pptpd.confd b/testing/pptpd/pptpd.confd
new file mode 100644
index 0000000000..1169e57f1c
--- /dev/null
+++ b/testing/pptpd/pptpd.confd
@@ -0,0 +1,5 @@
+# Config file for /etc/init.d/pptpd
+
+# Any extra options you want to pass to pptpd
+# on start-up should be put here.
+PPTPD_OPTS=""
diff --git a/testing/pptpd/pptpd.initd b/testing/pptpd/pptpd.initd
new file mode 100644
index 0000000000..36af3f25ff
--- /dev/null
+++ b/testing/pptpd/pptpd.initd
@@ -0,0 +1,20 @@
+#!/sbin/runscript
+
+depend() {
+ need net
+}
+
+start() {
+ ebegin "Starting pptpd"
+ start-stop-daemon --start --quiet --exec /usr/sbin/pptpd -- ${PPTPD_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pptpd"
+ start-stop-daemon --stop --quiet --pidfile /var/run/pptpd.pid
+ result=$?
+ start-stop-daemon --stop --quiet --exec /usr/sbin/pptpctrl
+ result=$(( $result + $? ))
+ eend $result
+}
diff --git a/testing/pptpd/pptpd.patch b/testing/pptpd/pptpd.patch
new file mode 100644
index 0000000000..3b4522dc76
--- /dev/null
+++ b/testing/pptpd/pptpd.patch
@@ -0,0 +1,69 @@
+--- pptpd-1.3.4/Makefile.am
++++ pptpd-1.3.4-orig/Makefile.am
+@@ -11,7 +11,8 @@
+ ## warning with -Wmissing-prototypes).
+ ## -Wmissing-prototypes removed (eg, Linux 2.2.6 headers
+ ## aren't up to it).
+-CFLAGS = -O2 -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
++OPTFLAGS=-O2
++CFLAGS = $(OPTFLAGS) -fno-builtin -Wall -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -DSBINDIR='"$(sbindir)"'
+ #CFLAGS = -O2 -fno-builtin -Wall -ansi -pedantic -Wmissing-prototypes -Werror -DSBINDIR='"$(sbindir)"'
+
+--- pptpd-1.3.4/bcrelay.c
++++ pptpd-1.3.4-orig/bcrelay.c
+@@ -381,12 +381,12 @@
+ return 1;
+ }
+ }
+- if (ifin == "") {
++ if (!strlen(ifin)) {
+ syslog(LOG_INFO,"Incoming interface required!");
+ showusage(argv[0]);
+ _exit(1);
+ }
+- if (ifout == "" && ipsec == "") {
++ if (!strlen(ifout) && !strlen(ipsec)) {
+ syslog(LOG_INFO,"Listen-mode or outgoing or IPsec interface required!");
+ showusage(argv[0]);
+ _exit(1);
+@@ -870,7 +870,7 @@
+ // IPSEC tunnels are a fun one. We must change the destination address
+ // so that it will be routed to the correct tunnel end point.
+ // We can define several tunnel end points for the same ipsec interface.
+- } else if (ipsec != "" && strncmp(ifs.ifc_req[i].ifr_name, "ipsec", 5) == 0) {
++ } else if (strlen(ipsec) && strncmp(ifs.ifc_req[i].ifr_name, "ipsec", 5) == 0) {
+ if (strncmp(ifs.ifc_req[i].ifr_name, ipsec, 6) == 0) {
+ struct hostent *hp = gethostbyname(ipsec+7);
+ ioctl(s, SIOCGIFINDEX, &ifs.ifc_req[i]);
+--- pptpd-1.3.4/plugins/Makefile
++++ pptpd-1.3.4-orig/plugins/Makefile
+@@ -3,7 +3,7 @@
+ CFLAGS = $(COPTS) -I.. -I../../include -fPIC
+ LDFLAGS = -shared
+ LDADD = -lutil
+-INSTALL = install -o root
++INSTALL = install
+ prefix = /usr/local
+
+ PLUGINS = pptpd-logwtmp.so
+@@ -18,7 +18,7 @@
+ %.so: %.c
+ $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD)
+
+-LIBDIR ?= $(DESTDIR)$(prefix)/lib/pptpd
++LIBDIR = $(DESTDIR)$(prefix)/lib/pptpd
+
+ install: $(PLUGINS)
+ $(INSTALL) -d $(LIBDIR)
+--- pptpd-1.3.4/plugins/pptpd-logwtmp.c
++++ pptpd-1.3.4-orig/plugins/pptpd-logwtmp.c
+@@ -12,7 +12,7 @@
+ #include <unistd.h>
+ #include <utmp.h>
+ #include <string.h>
+-#include "pppd.h"
++#include <pppd/pppd.h>
+
+ char pppd_version[] = VERSION;
+
diff --git a/testing/pptpd/rcpptpd b/testing/pptpd/rcpptpd
new file mode 100644
index 0000000000..83afd0ce76
--- /dev/null
+++ b/testing/pptpd/rcpptpd
@@ -0,0 +1,67 @@
+#!/bin/sh
+# Copyright (c) 2000-2001 SuSE GmbH Nuernberg, Germany. All rights reserved.
+#
+# Author: Bernd Kaindl
+#
+# /etc/init.d/pptpd
+#
+
+### BEGIN INIT INFO
+# Provides: pptpd
+# Required-Start: $remote_fs $network
+# Required-Stop: $remote_fs $network
+# Default-Start: 3 5
+# Default-Stop:
+# Description: start pptp daemon
+# Short-Description: pptp daemon
+### END INIT INFO
+
+PPTPD_BIN=/usr/sbin/pptpd
+test -x $PPTPD_BIN || exit 5
+
+# Shell functions sourced from /etc/rc.status:
+. /etc/rc.status
+
+# First reset status of this service
+rc_reset
+
+case "$1" in
+ start)
+ echo -n "Starting MS VPN server pptpd"
+ if modprobe ppp_mppe ; then
+ startproc -sq $PPTPD_BIN
+ rc_status -v
+ else
+ rc_failed 3
+ fi
+ ;;
+ stop)
+ echo -n "Shutting down MS VPN server pptpd"
+ killproc -TERM $PPTPD_BIN
+ rc_status -v
+ rmmod ppp_mppe > /dev/null 2>&1
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ rc_status
+ ;;
+ force-reload)
+ $0 stop && $0 start
+ rc_status
+ ;;
+ reload)
+ rc_failed 3
+ rc_status -v
+ ;;
+ status)
+ echo -n "Checking for MS VPN server pptpd: "
+ checkproc $PPTPD_BIN
+ rc_status -v
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|status|restart|force-reload|reload}"
+ exit 1
+ ;;
+esac
+rc_exit