diff --git a/pptp-1.7.2-ip-path.patch b/pptp-1.7.2-ip-path.patch new file mode 100644 index 0000000..f62d5b9 --- /dev/null +++ b/pptp-1.7.2-ip-path.patch @@ -0,0 +1,28 @@ +--- pptp-1.7.2/routing.c 2008-05-14 07:33:55.000000000 +0100 ++++ pptp-1.7.2/routing.c 2008-05-19 14:21:39.000000000 +0100 +@@ -55,7 +55,7 @@ + + void routing_init(char *ip) { + char buf[256]; +- snprintf(buf, 255, "/bin/ip route get %s", ip); ++ snprintf(buf, 255, "/sbin/ip route get %s", ip); + FILE *p = popen(buf, "r"); + fgets(buf, 255, p); + /* TODO: check for failure of fgets */ +@@ -66,14 +66,14 @@ + + void routing_start() { + char buf[256]; +- snprintf(buf, 255, "/bin/ip route replace %s", route); ++ snprintf(buf, 255, "/sbin/ip route replace %s", route); + FILE *p = popen(buf, "r"); + pclose(p); + } + + void routing_end() { + char buf[256]; +- snprintf(buf, 255, "/bin/ip route delete %s", route); ++ snprintf(buf, 255, "/sbin/ip route delete %s", route); + FILE *p = popen(buf, "r"); + pclose(p); + } diff --git a/pptp.spec b/pptp.spec index fdb1b11..91e4d7f 100644 --- a/pptp.spec +++ b/pptp.spec @@ -1,12 +1,13 @@ Name: pptp Version: 1.7.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Point-to-Point Tunneling Protocol (PPTP) Client Group: Applications/Internet License: GPLv2+ URL: http://pptpclient.sourceforge.net/ Source0: http://downloads.sf.net/pptpclient/pptp-%{version}.tar.gz Patch0: pptp-1.7.2-compat.patch +Patch1: pptp-1.7.2-ip-path.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires: ppp >= 2.4.2 @@ -18,6 +19,7 @@ by employers and some cable and ADSL service providers. %prep %setup -q %patch0 -p1 -b .compat +%patch1 -p1 -b .ip-path %{__sed} -i -e 's/install -o root -m 555 pptp/install -m 755 pptp/' Makefile %build @@ -45,6 +47,9 @@ by employers and some cable and ADSL service providers. %config(noreplace) /etc/ppp/options.pptp %changelog +* Mon May 19 2008 Paul Howarth 1.7.2-2 +- Use /sbin/ip, not /bin/ip for routing + * Wed May 14 2008 Paul Howarth 1.7.2-1 - Update to 1.7.2 - New script and manpage: pptpsetup