From 5afc9374656fb58beba7458e45424868c57f4a2a Mon Sep 17 00:00:00 2001 From: Brian Read Date: Fri, 14 Jul 2023 16:13:53 +0100 Subject: [PATCH] initial commit of file from CVS for pptpd on Fri 14 Jul 16:13:53 BST 2023 --- .gitattributes | 1 + .gitignore | 3 + Makefile | 21 +++++++ README.md | 10 ++- contriborbase | 1 + pptpd-1.3.4-install.patch | 21 +++++++ pptpd-1.3.4-install64.patch | 33 ++++++++++ pptpd-1.3.4.tar.gz | 3 + pptpd.conf | 84 +++++++++++++++++++++++++ pptpd.options | 17 +++++ pptpd.spec | 122 ++++++++++++++++++++++++++++++++++++ pptpd.sysv | 59 +++++++++++++++++ 12 files changed, 374 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 contriborbase create mode 100644 pptpd-1.3.4-install.patch create mode 100644 pptpd-1.3.4-install64.patch create mode 100644 pptpd-1.3.4.tar.gz create mode 100644 pptpd.conf create mode 100644 pptpd.options create mode 100644 pptpd.spec create mode 100755 pptpd.sysv diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..f087b42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.tar.gz filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1534ba5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.rpm +*.log +*spec-20* diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..139dc78 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +# Makefile for source rpm: pptpd +# $Id: Makefile,v 1.1 2016/02/04 13:25:21 vip-ire Exp $ +NAME := pptpd +SPECFILE = $(firstword $(wildcard *.spec)) + +define find-makefile-common +for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done +endef + +MAKEFILE_COMMON := $(shell $(find-makefile-common)) + +ifeq ($(MAKEFILE_COMMON),) +# attept a checkout +define checkout-makefile-common +test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 +endef + +MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) +endif + +include $(MAKEFILE_COMMON) diff --git a/README.md b/README.md index 24ae9e5..c55965b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,11 @@ # pptpd -3rd Party (Maintained by Koozali) git repo for pptpd smeserver \ No newline at end of file +3rd Party (Maintained by Koozali) git repo for pptpd smeserver + +## Description + +
*This description has been generated by an LLM AI system and cannot be relied on to be fully correct.* +*Once it has been checked, then this comment will be deleted* +
+ +PPTPD (Point-to-Point Tunneling Protocol Daemon) is a software package that provides a secure, reliable, and easy-to-use method for setting up virtual private networks (VPNs). It allows users to access a private network over an insecure public network such as the Internet. PPTPD works by creating a secure tunnel between two hosts using the protocol and encrypting the data that passes through it. It can be used to securely connect remote offices, users, and clients to an office network. diff --git a/contriborbase b/contriborbase new file mode 100644 index 0000000..ef36a67 --- /dev/null +++ b/contriborbase @@ -0,0 +1 @@ +sme10 diff --git a/pptpd-1.3.4-install.patch b/pptpd-1.3.4-install.patch new file mode 100644 index 0000000..2e434ae --- /dev/null +++ b/pptpd-1.3.4-install.patch @@ -0,0 +1,21 @@ +diff -rup pptpd-1.3.4/plugins/Makefile pptpd-1.3.4-install/plugins/Makefile +--- pptpd-1.3.4/plugins/Makefile 2006-08-02 22:02:01.000000000 -0400 ++++ pptpd-1.3.4-install/plugins/Makefile 2011-04-07 14:29:24.377575790 -0400 +@@ -3,7 +3,7 @@ COPTS = -O2 -g + CFLAGS = $(COPTS) -I.. -I../../include -fPIC + LDFLAGS = -shared + LDADD = -lutil +-INSTALL = install -o root ++INSTALL = install -c + prefix = /usr/local + + PLUGINS = pptpd-logwtmp.so +@@ -18,7 +18,7 @@ all: $(PLUGINS) + %.so: %.c + $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD) + +-LIBDIR ?= $(DESTDIR)$(prefix)/lib/pptpd ++LIBDIR = $(DESTDIR)/usr/lib/pptpd + + install: $(PLUGINS) + $(INSTALL) -d $(LIBDIR) diff --git a/pptpd-1.3.4-install64.patch b/pptpd-1.3.4-install64.patch new file mode 100644 index 0000000..36f66fa --- /dev/null +++ b/pptpd-1.3.4-install64.patch @@ -0,0 +1,33 @@ +diff -rup pptpd-1.3.4/plugins/Makefile pptpd-1.3.4-install64/plugins/Makefile +--- pptpd-1.3.4/plugins/Makefile 2006-08-02 22:02:01.000000000 -0400 ++++ pptpd-1.3.4-install64/plugins/Makefile 2011-04-07 14:31:08.982796855 -0400 +@@ -3,7 +3,7 @@ COPTS = -O2 -g + CFLAGS = $(COPTS) -I.. -I../../include -fPIC + LDFLAGS = -shared + LDADD = -lutil +-INSTALL = install -o root ++INSTALL = install -c + prefix = /usr/local + + PLUGINS = pptpd-logwtmp.so +@@ -18,7 +18,7 @@ all: $(PLUGINS) + %.so: %.c + $(CC) -o $@ $(LDFLAGS) $(CFLAGS) $^ $(LDADD) + +-LIBDIR ?= $(DESTDIR)$(prefix)/lib/pptpd ++LIBDIR = $(DESTDIR)/usr/lib64/pptpd + + install: $(PLUGINS) + $(INSTALL) -d $(LIBDIR) +diff -rup pptpd-1.3.4/pptpctrl.c pptpd-1.3.4-install64/pptpctrl.c +--- pptpd-1.3.4/pptpctrl.c 2006-12-07 19:01:40.000000000 -0500 ++++ pptpd-1.3.4-install64/pptpctrl.c 2011-04-07 14:31:29.845856353 -0400 +@@ -773,7 +773,7 @@ static void launch_pppd(char **pppaddrs, + + if (pptp_logwtmp) { + pppd_argv[an++] = "plugin"; +- pppd_argv[an++] = "/usr/lib/pptpd/pptpd-logwtmp.so"; ++ pppd_argv[an++] = "/usr/lib64/pptpd/pptpd-logwtmp.so"; + pppd_argv[an++] = "pptpd-original-ip"; + pppd_argv[an++] = inet_ntoa(inetaddrs[1]); + } diff --git a/pptpd-1.3.4.tar.gz b/pptpd-1.3.4.tar.gz new file mode 100644 index 0000000..4252eeb --- /dev/null +++ b/pptpd-1.3.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c23a9bdd219a0a36ae7ca20e7c9749f2efdcdbf108aabeeeb5066ba442ec88b6 +size 240942 diff --git a/pptpd.conf b/pptpd.conf new file mode 100644 index 0000000..c26c1d1 --- /dev/null +++ b/pptpd.conf @@ -0,0 +1,84 @@ +################################################################################ +# +# Sample PoPToP configuration file +# +# for PoPToP version 1.0.1 +# +################################################################################ + +# 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 /etc/ppp/options.pptpd + +# 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.1.80-89 +remoteip 192.168.1.90-99 + +# 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/pptpd.options b/pptpd.options new file mode 100644 index 0000000..8ebde31 --- /dev/null +++ b/pptpd.options @@ -0,0 +1,17 @@ +lock +auth +proxyarp +asyncmap 0 +require-chap +-chap +-chapms ++chapms-v2 +chapms-strip-domain +lcp-echo-failure 10 +lcp-echo-interval 30 +mppe-40 +mppe-128 +mppe-stateless +require-mppe +require-mppe-stateless +nobsdcomp diff --git a/pptpd.spec b/pptpd.spec new file mode 100644 index 0000000..cdf99d4 --- /dev/null +++ b/pptpd.spec @@ -0,0 +1,122 @@ +Summary: PoPToP Point to Point Tunneling Server +Name: pptpd +Requires: ppp >= 2.4.3 +Version: 1.3.4 +Release: 2%{dist} +License: GPL +Group: System Environment/Daemons +Packager: ClearFoundation +URL: http://poptop.sourceforge.net/ +Source0: %{name}-%{version}.tar.gz +Source1: pptpd.conf +Source2: pptpd.options +Source3: pptpd.sysv +Patch0: pptpd-1.3.4-install.patch +Patch1: pptpd-1.3.4-install64.patch +BuildRequires: autoconf +BuildRequires: automake +Buildroot: %{_tmppath}/%{name}-root + +%description +This implements a Virtual Private Networking Server (VPN) that is +compatible with Microsoft VPN clients. It allows windows users to +connect to an internal firewalled network using their dialup. + +%prep +%setup -q +%if "%{_lib}" == "lib64" +%patch1 -p1 +%else +%patch0 -p1 +%endif + +%build +aclocal +autoconf +%configure --with-bcrelay +make + +%install +rm -rf $RPM_BUILD_ROOT + +make install DESTDIR=$RPM_BUILD_ROOT + +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/ppp +mkdir -p $RPM_BUILD_ROOT%{_bindir} + +install -m 0755 tools/vpnuser $RPM_BUILD_ROOT%{_bindir}/vpnuser +install -m 0755 tools/vpnstats.pl $RPM_BUILD_ROOT%{_bindir}/vpnstats.pl +install -m 0755 tools/pptp-portslave $RPM_BUILD_ROOT%{_sbindir}/pptp-portslave +install -m 0644 %SOURCE1 $RPM_BUILD_ROOT%{_sysconfdir}/pptpd.conf +install -m 0644 %SOURCE2 $RPM_BUILD_ROOT%{_sysconfdir}/ppp/options.pptpd +install -m 0755 %SOURCE3 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/pptpd + +%post +if [ $1 -eq 1 ]; then + /sbin/chkconfig --add pptpd +fi + +%preun +if [ $1 -eq 0 ]; then + /sbin/service pptpd stop >/dev/null 2>&1 + /sbin/chkconfig --del pptpd +fi + +%postun +if [ $1 -ge 1 ]; then + /sbin/service pptpd condrestart >/dev/null 2>&1 +fi + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%doc AUTHORS COPYING INSTALL README* TODO ChangeLog* +%{_sbindir}/pptpd +%{_sbindir}/pptpctrl +%{_sbindir}/pptp-portslave +%{_sbindir}/bcrelay +%{_bindir}/vpnuser +%{_bindir}/vpnstats.pl +%{_libdir}/pptpd/pptpd-logwtmp.so +%{_mandir}/man5/pptpd.conf.5* +%{_mandir}/man8/pptpd.8* +%{_mandir}/man8/pptpctrl.8* +%{_sysconfdir}/rc.d/init.d/pptpd +%config(noreplace) %{_sysconfdir}/pptpd.conf +%config(noreplace) %{_sysconfdir}/ppp/options.pptpd + +%changelog +* Fri Jul 14 2023 BogusDateBot +- Eliminated rpmbuild "bogus date" warnings due to inconsistent weekday, + by assuming the date is correct and changing the weekday. + +* Thu Nov 22 2012 ClearFoundation - 1.3.4-2 +- removed winbind dependency and configuration + +* Thu Apr 7 2011 ClearFoundation - 1.3.4-1.1 +- import into ClearFoundation build environment +- added 64-bit fixes + +* Fri Feb 18 2005 James Cameron +- fix to use ppp 2.4.3 for plugin + +* Thu Nov 11 2004 James Cameron +- adjust for building on Red Hat Enterprise Linux, per Charlie Brady +- remove vpnstats, superceded by vpnstats.pl + +* Fri May 21 2004 James Cameron +- adjust for packaging naming and test + +* Fri Apr 23 2004 James Cameron +- include vpnwho.pl + +* Thu Apr 22 2004 James Cameron +- change description wording +- change URL for upstream +- release first candidate for 1.2.0 + +* Fri Jul 18 2003 R. de Vroede +- Check the ChangeLog files. diff --git a/pptpd.sysv b/pptpd.sysv new file mode 100755 index 0000000..c3b13b6 --- /dev/null +++ b/pptpd.sysv @@ -0,0 +1,59 @@ +#!/bin/sh +# +# Startup script for the PPTP VPN server. +# +# chkconfig: 2345 99 01 +# description: This script starts your PPTP VPN server +# processname: pptpd +# pidfile: /var/run/pptpd.pid + +# Source function library. +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +# Check that networking is up. +[ ${NETWORKING} = "no" ] && exit 0 + +prog="pptpd" +RETVAL=0 + +# See how we were called. +case "$1" in + start) + echo -n $"Starting $prog: " + daemon pptpd + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && touch /var/lock/subsys/pptpd + ;; + stop) + echo -n $"Stopping $prog: " + killproc pptpd + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/pptpd + ;; + status) + status pptpd + RETVAL=$? + ;; + restart|reload) + $0 stop + $0 start + RETVAL=$? + ;; + condrestart) + if test "x`/sbin/pidof pptpd`" != x; then + $0 stop + $0 start + RETVAL=$? + fi + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|condrestart|status}" + exit 1 +esac + +exit $RETVAL