Use /sbin/ip, not /bin/ip for routing
This commit is contained in:
parent
f2c5f88c06
commit
d03eb3bb2b
28
pptp-1.7.2-ip-path.patch
Normal file
28
pptp-1.7.2-ip-path.patch
Normal file
@ -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);
|
||||
}
|
||||
@ -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 <paul@city-fan.org> 1.7.2-2
|
||||
- Use /sbin/ip, not /bin/ip for routing
|
||||
|
||||
* Wed May 14 2008 Paul Howarth <paul@city-fan.org> 1.7.2-1
|
||||
- Update to 1.7.2
|
||||
- New script and manpage: pptpsetup
|
||||
|
||||
Loading…
Reference in New Issue
Block a user