summaryrefslogtreecommitdiff
path: root/recipes/ppp/ppp-2.4.1
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/ppp/ppp-2.4.1
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/ppp/ppp-2.4.1')
-rw-r--r--recipes/ppp/ppp-2.4.1/cifdefroute.dif283
-rw-r--r--recipes/ppp/ppp-2.4.1/man.patch11
-rw-r--r--recipes/ppp/ppp-2.4.1/ppp-tdbread.patch194
-rw-r--r--recipes/ppp/ppp-2.4.1/pppd-resolv-varrun.patch38
-rw-r--r--recipes/ppp/ppp-2.4.1/pppd.patch68
5 files changed, 594 insertions, 0 deletions
diff --git a/recipes/ppp/ppp-2.4.1/cifdefroute.dif b/recipes/ppp/ppp-2.4.1/cifdefroute.dif
new file mode 100644
index 0000000000..263b674f99
--- /dev/null
+++ b/recipes/ppp/ppp-2.4.1/cifdefroute.dif
@@ -0,0 +1,283 @@
+--- ppp/pppd/ipcp.c Wed May 31 17:20:41 2000
++++ ppp/pppd/ipcp.c Wed May 31 17:27:19 2000
+@@ -145,7 +145,17 @@
+ { "-defaultroute", o_bool, &ipcp_allowoptions[0].default_route,
+ "disable defaultroute option", OPT_A2COPY,
+ &ipcp_wantoptions[0].default_route },
+
++#ifdef __linux__
++ { "replacedefaultroute", o_bool,
++ &ipcp_wantoptions[0].replace_default_route,
++ "Replace default route", 1
++ },
++ { "noreplacedefaultroute", o_bool,
++ &ipcp_allowoptions[0].replace_default_route,
++ "Never replace default route", OPT_A2COPY,
++ &ipcp_wantoptions[0].replace_default_route },
++#endif
+ { "proxyarp", o_bool, &ipcp_wantoptions[0].proxy_arp,
+ "Add proxy ARP entry", OPT_ENABLE|1, &ipcp_allowoptions[0].proxy_arp },
+ { "noproxyarp", o_bool, &ipcp_allowoptions[0].proxy_arp,
+@@ -195,7 +205,7 @@
+ ip_active_pkt
+ };
+
+-static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));
++static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool));
+ static void ipcp_script __P((char *)); /* Run an up/down script */
+ static void ipcp_script_done __P((void *));
+
+@@ -1344,7 +1354,12 @@
+ if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
+ return 0;
+ if (wo->default_route)
++#ifndef __linux__
+ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr))
++#else
++ if (sifdefaultroute(u, wo->ouraddr, wo->hisaddr,
++ wo->replace_default_route))
++#endif
+ default_route_set[u] = 1;
+ if (wo->proxy_arp)
+ if (sifproxyarp(u, wo->hisaddr))
+@@ -1420,7 +1435,8 @@
+ */
+ if (demand) {
+ if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
+- ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr);
++ ipcp_clear_addrs(f->unit, wo->ouraddr, wo->hisaddr,
++ wo->replace_default_route);
+ if (go->ouraddr != wo->ouraddr) {
+ warn("Local IP address changed to %I", go->ouraddr);
+ script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr));
+@@ -1445,7 +1461,12 @@
+
+ /* assign a default route through the interface if required */
+ if (ipcp_wantoptions[f->unit].default_route)
++#ifndef __linux__
+ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
++#else
++ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr,
++ wo->replace_default_route))
++#endif
+ default_route_set[f->unit] = 1;
+
+ /* Make a proxy ARP entry if requested. */
+@@ -1492,7 +1513,12 @@
+
+ /* assign a default route through the interface if required */
+ if (ipcp_wantoptions[f->unit].default_route)
++#ifndef __linux__
+ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
++#else
++ if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr,
++ wo->replace_default_route))
++#endif
+ default_route_set[f->unit] = 1;
+
+ /* Make a proxy ARP entry if requested. */
+@@ -1559,7 +1585,7 @@
+ sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
+ sifdown(f->unit);
+ ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
+- ipcp_hisoptions[f->unit].hisaddr);
++ ipcp_hisoptions[f->unit].hisaddr, 0);
+ }
+
+ /* Execute the ip-down script */
+@@ -1575,16 +1601,25 @@
+ * proxy arp entries, etc.
+ */
+ static void
+-ipcp_clear_addrs(unit, ouraddr, hisaddr)
++ipcp_clear_addrs(unit, ouraddr, hisaddr, replacedefaultroute)
+ int unit;
+ u_int32_t ouraddr; /* local address */
+ u_int32_t hisaddr; /* remote address */
++ bool replacedefaultroute;
+ {
+ if (proxy_arp_set[unit]) {
+ cifproxyarp(unit, hisaddr);
+ proxy_arp_set[unit] = 0;
+ }
+- if (default_route_set[unit]) {
++ /* If replacedefaultroute, sifdefaultroute will be called soon
++ * with replacedefaultroute set and that will overwrite the current
++ * default route. This is the case only when doing demand, otherwise
++ * during demand, this cifdefaultroute would restore the old default
++ * route which is not what we want in this case. In the non-demand
++ * case, we'll delete the default route and restore the old if there
++ * is one saved by an sifdefaultroute with replacedefaultroute.
++ */
++ if (!replacedefaultroute && default_route_set[unit]) {
+ cifdefaultroute(unit, ouraddr, hisaddr);
+ default_route_set[unit] = 0;
+ }
+--- ppp/pppd/ipcp.h Wed May 31 17:20:41 2000
++++ ppp/pppd/ipcp.h Wed May 31 15:56:17 2000
+@@ -47,6 +47,7 @@
+ bool old_addrs; /* Use old (IP-Addresses) option? */
+ bool req_addr; /* Ask peer to send IP address? */
+ bool default_route; /* Assign default route through interface? */
++ bool replace_default_route; /* Replace default route through interface? */
+ bool proxy_arp; /* Make proxy ARP entry for peer? */
+ bool neg_vj; /* Van Jacobson Compression? */
+ bool old_vj; /* use old (short) form of VJ option? */
+--- ppp/pppd/pppd.8 Wed May 31 17:20:41 2000
++++ ppp/pppd/pppd.8 Wed May 31 15:56:17 2000
+@@ -99,6 +99,13 @@
+ This entry is removed when the PPP connection is broken. This option
+ is privileged if the \fInodefaultroute\fR option has been specified.
+ .TP
++.B replacedefaultroute
++This option is a flag to the defaultroute option. If defaultroute is
++set and this flag is also set, pppd replaces an existing default route
++with the new default route.
++
++
++.TP
+ .B disconnect \fIscript
+ Run the executable or shell command specified by \fIscript\fR after
+ pppd has terminated the link. This script could, for example, issue
+@@ -589,7 +596,12 @@
+ .TP
+ .B nodefaultroute
+ Disable the \fIdefaultroute\fR option. The system administrator who
+-wishes to prevent users from creating default routes with pppd
++wishes to prevent users from adding a default route with pppd
++can do so by placing this option in the /etc/ppp/options file.
++.TP
++.B noreplacedefaultroute
++Disable the \fIreplacedefaultroute\fR option. The system administrator who
++wishes to prevent users from replacing a default route with pppd
+ can do so by placing this option in the /etc/ppp/options file.
+ .TP
+ .B nodeflate
+--- ppp/pppd/pppd.h Wed May 31 17:20:41 2000
++++ ppp/pppd/pppd.h Wed May 31 15:56:17 2000
+@@ -416,7 +416,11 @@
+ int cif6addr __P((int, eui64_t, eui64_t));
+ /* Remove an IPv6 address from i/f */
+ #endif
++#ifndef __linux__
+ int sifdefaultroute __P((int, u_int32_t, u_int32_t));
++#else
++int sifdefaultroute __P((int, u_int32_t, u_int32_t, bool replace_default_rt));
++#endif
+ /* Create default route through i/f */
+ int cifdefaultroute __P((int, u_int32_t, u_int32_t));
+ /* Delete default route through i/f */
+--- ppp/pppd/sys-linux.c Wed May 31 17:20:41 2000
++++ ppp/pppd/sys-linux.c Wed May 31 17:37:23 2000
+@@ -143,6 +143,8 @@
+
+ static int if_is_up; /* Interface has been marked up */
+ static u_int32_t default_route_gateway; /* Gateway for default route added */
++static struct rtentry old_def_rt; /* Old default route */
++static int default_rt_repl_rest; /* replace and restore old default rt */
+ static u_int32_t proxy_arp_addr; /* Addr for proxy arp entry added */
+ static char proxy_arp_dev[16]; /* Device for proxy arp entry */
+ static u_int32_t our_old_addr; /* for detecting address changes */
+@@ -1209,6 +1211,9 @@
+ p = NULL;
+ }
+
++ SET_SA_FAMILY (rt->rt_dst, AF_INET);
++ SET_SA_FAMILY (rt->rt_gateway, AF_INET);
++
+ SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
+ SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
+ SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
+@@ -1278,19 +1283,53 @@
+ /********************************************************************
+ *
+ * sifdefaultroute - assign a default route through the address given.
++ *
++ * If the global default_rt_repl_rest flag is set, then this function
++ * already replaced the original system defaultroute with some other
++ * route and it should just replace the current defaultroute with
++ * another one, without saving the current route. Use: demand mode,
++ * when pppd sets first a defaultroute it it's temporary ppp0 addresses
++ * and then changes the temporary addresses to the addresses for the real
++ * ppp connection when it has come up.
+ */
+
+-int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway)
++int sifdefaultroute (int unit, u_int32_t ouraddr, u_int32_t gateway, bool replace)
+ {
+- struct rtentry rt;
+-
+- if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
+- u_int32_t old_gateway = SIN_ADDR(rt.rt_gateway);
++ struct rtentry rt, tmp_rt;
++ struct rtentry *del_rt = NULL;
+
+- if (old_gateway != gateway)
+- error("not replacing existing default route to %s [%I]",
+- rt.rt_dev, old_gateway);
+- return 0;
++
++ if (default_rt_repl_rest) {
++ /* We have already reclaced the original defaultroute, if we
++ * are called again, we will delete the current default route
++ * and set the new default route in this function.
++ * - this is normally only the case the doing demand: */
++ if (defaultroute_exists( &tmp_rt ))
++ del_rt = &tmp_rt;
++ } else if ( defaultroute_exists( &old_def_rt ) &&
++ strcmp( old_def_rt.rt_dev, ifname ) != 0) {
++ /* We did not yet replace an existing default route, let's
++ * check if we should save and replace a default route:
++ */
++ u_int32_t old_gateway = SIN_ADDR(old_def_rt.rt_gateway);
++
++ if (old_gateway != gateway) {
++ if (!replace) {
++ error("not replacing default route to %s [%I]",
++ old_def_rt.rt_dev, old_gateway);
++ return 0;
++ } else {
++ // we need to copy rt_dev because we need it permanent too:
++ char * tmp_dev = malloc(strlen(old_def_rt.rt_dev)+1);
++ strcpy(tmp_dev, old_def_rt.rt_dev);
++ old_def_rt.rt_dev = tmp_dev;
++
++ notice("replacing old default route to %s [%I]",
++ old_def_rt.rt_dev, old_gateway);
++ default_rt_repl_rest = 1;
++ del_rt = &old_def_rt;
++ }
++ }
+ }
+
+ memset (&rt, '\0', sizeof (rt));
+@@ -1310,6 +1349,12 @@
+ error("default route ioctl(SIOCADDRT): %m(%d)", errno);
+ return 0;
+ }
++ if (default_rt_repl_rest && del_rt)
++ if (ioctl(sock_fd, SIOCDELRT, del_rt) < 0) {
++ if ( ! ok_error ( errno ))
++ error("del old default route ioctl(SIOCDELRT): %m(%d)", errno);
++ return 0;
++ }
+
+ default_route_gateway = gateway;
+ return 1;
+@@ -1344,6 +1389,16 @@
+ error("default route ioctl(SIOCDELRT): %m (%d)", errno);
+ return 0;
+ }
++ }
++ if (default_rt_repl_rest) {
++ notice("restoring old default route to %s [%I]",
++ old_def_rt.rt_dev, SIN_ADDR(old_def_rt.rt_gateway));
++ if (ioctl(sock_fd, SIOCADDRT, &old_def_rt) < 0) {
++ if ( ! ok_error ( errno ))
++ error("restore default route ioctl(SIOCADDRT): %m(%d)", errno);
++ return 0;
++ }
++ default_rt_repl_rest = 0;
+ }
+
+ return 1;
diff --git a/recipes/ppp/ppp-2.4.1/man.patch b/recipes/ppp/ppp-2.4.1/man.patch
new file mode 100644
index 0000000000..2cd48d500a
--- /dev/null
+++ b/recipes/ppp/ppp-2.4.1/man.patch
@@ -0,0 +1,11 @@
+--- ppp-2.4.1/linux/Makefile.top.orig 2000-04-17 12:39:26.000000000 +0200
++++ ppp-2.4.1/linux/Makefile.top 2004-07-03 21:59:05.000000000 +0200
+@@ -2,7 +2,7 @@
+
+
+ BINDIR = $(DESTDIR)/usr/sbin
+-MANDIR = $(DESTDIR)/usr/man
++MANDIR = $(DESTDIR)/usr/share/man
+ ETCDIR = $(DESTDIR)/etc/ppp
+
+ # uid 0 = root
diff --git a/recipes/ppp/ppp-2.4.1/ppp-tdbread.patch b/recipes/ppp/ppp-2.4.1/ppp-tdbread.patch
new file mode 100644
index 0000000000..80232ac25f
--- /dev/null
+++ b/recipes/ppp/ppp-2.4.1/ppp-tdbread.patch
@@ -0,0 +1,194 @@
+diff -Nur ppp-2.4.1/pppd/Makefile.linux myppp/ppp-2.4.1/pppd/Makefile.linux
+--- ppp-2.4.1/pppd/Makefile.linux 2006-09-14 14:52:54.000000000 +0200
++++ ppp-2.4.1/pppd/Makefile.linux 2006-09-14 14:55:44.000000000 +0200
+@@ -17,7 +17,7 @@
+ auth.o options.o demand.o utils.o sys-linux.o ipxcp.o multilink.o \
+ tdb.o tty.o
+
+-all: pppd
++all: pppd tdbread
+
+ #
+ # include dependancies if present and backup if as a header file
+@@ -114,9 +114,10 @@
+
+ INSTALL= install
+
+-install: pppd
++install: pppd tdbread
+ mkdir -p $(BINDIR) $(MANDIR)
+ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
++ $(INSTALL) -c -m 555 tdbread $(BINDIR)/tdbread
+ if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
+ chmod o-rx,u+s $(BINDIR)/pppd; fi
+ $(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
+@@ -124,8 +125,11 @@
+ pppd: $(PPPDOBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
+
++tdbread: tdbread.o tdb.o
++ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
++
+ clean:
+- rm -f $(PPPDOBJS) pppd *~ #* core
++ rm -f $(PPPDOBJS) tdbread.o tdbread pppd *~ #* core
+
+ depend:
+ $(CPP) -M $(CFLAGS) $(PPPDSRCS) >.depend
+diff -Nur ppp-2.4.1/pppd/tdbread.c myppp/ppp-2.4.1/pppd/tdbread.c
+--- ppp-2.4.1/pppd/tdbread.c 1970-01-01 01:00:00.000000000 +0100
++++ ppp-2.4.1/pppd/tdbread.c 2006-09-14 14:52:32.000000000 +0200
+@@ -0,0 +1,153 @@
++/**
++ * @file tdbread.c
++ * @author Thomas Geffert <geffert@4g-systems.com>
++ * @date Thu Sep 14 10:28:31 2006
++ *
++ * @brief Small program to extract information from pppd.tbd database.
++ * You can get information about a specific ppp process with its pid
++ * or view all keys available in the database.
++ */
++
++/*
++ * (c) COPYRIGHT 2006 by 4G Systems GmbH Germany
++ *
++ * Redistribution and use in source and binary forms are permitted
++ * provided that the above copyright notice and this paragraph are
++ * duplicated in all such forms AND provided that this software or
++ * any derived work is only used as part of the PPP daemon (pppd)
++ * and related utilities.
++ * The name of the author may not be used to endorse or promote products
++ * derived from this software without specific prior written permission.
++ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
++ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
++ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
++ *
++ * Note: this software is also available under the Gnu Public License
++ * version 2 or later.
++ */
++
++#include <stdio.h>
++#include <stdlib.h>
++#include <string.h>
++#include <fcntl.h>
++#include <getopt.h>
++#include <signal.h> /* needed for tdb.h starting with ppp-2.4.3 */
++
++#include "tdb.h"
++#include "pppd.h"
++#include "pathnames.h"
++
++/**
++ * Callback function for tdb_traverse: show a key and its associated data
++ *
++ * @param tdb pointer to database
++ * @param key hash key
++ * @param dbuf data belonging to key
++ * @param state unused data pointer
++ *
++ * @return 0 if success, 1 to stop calling function
++ */
++static int show(TDB_CONTEXT *tdb, TDB_DATA key, TDB_DATA dbuf, void *state)
++{
++ printf("%.*s: \"%.*s\"\n", key.dsize, key.dptr, dbuf.dsize, dbuf.dptr);
++ return 0;
++}
++
++/**
++ * Parse command line option. Option is used to sepcify for which ppp process
++ * information should be shown.
++ *
++ * @param argc number of options
++ * @param argv pointer to array with options
++ *
++ * @return empty key if no valid option found, or key selected by config option
++ */
++TDB_DATA parse_options(int argc, char **argv)
++{
++ TDB_DATA key = { NULL, 0 };
++ static char keyname[32] = { 0 };
++ int c;
++ while (1) {
++ int option_index = 0;
++ static struct option long_options[] = {
++ {"pid", 1, 0, 'p'}, {"device", 1, 0, 'd'}, {"ifname", 1, 0, 'i'},
++ {"ipremote", 1, 0, 'r'}, {"help", 0, 0, 'h'}, {0, 0, 0, 0}
++ };
++
++ c = getopt_long (argc, argv, "p:d:i:r:h", long_options, &option_index);
++ if (c == -1) {
++ if ( optind<argc ) {
++ c = '?'; // force display of usage
++ } else {
++ break;
++ }
++ }
++
++ switch (c) {
++ case 'p':
++ snprintf(keyname, sizeof(keyname), "PPPD_PID=%s", optarg);
++ break;
++ case 'i':
++ snprintf(keyname, sizeof(keyname), "IFNAME=%s", optarg);
++ break;
++ case 'd':
++ snprintf(keyname, sizeof(keyname), "DEVICE=%s", optarg);
++ break;
++ case 'r':
++ snprintf(keyname, sizeof(keyname), "IPREMOTE=%s", optarg);
++ break;
++ case '?':
++ case 'h':
++ fprintf(stderr, "Usage: tdbread [--pid pid|--device devname|--ifname ifname|--ipremote ipremote]\n"
++ " If several options are given, only the last one is used.\n");
++ exit(1);
++ break;
++ }
++ }
++
++ if ( *keyname != 0 ) {
++ key.dptr = (char *) keyname;
++ key.dsize = strlen(keyname);
++ }
++
++ return key;
++}
++
++
++int main(int argc, char **argv) {
++ TDB_CONTEXT *pppdb;
++ int rc=1;
++
++ /* open database */
++ pppdb = tdb_open(_PATH_PPPDB, 0, 0, O_RDWR, 0644);
++ if (pppdb == NULL) {
++ fprintf(stderr, "Cannot open DB %s\n", _PATH_PPPDB);
++ return 1;
++ }
++
++ TDB_DATA key = parse_options(argc, argv);
++
++ if (key.dsize==0) {
++ tdb_traverse(pppdb, show, NULL);
++ } else {
++ if (tdb_exists(pppdb, key)) {
++ TDB_DATA key2;
++ /* value of pppd_pid entry points to entry with real info */
++ key2 = tdb_fetch(pppdb, key);
++ if (tdb_exists(pppdb, key2)) {
++ TDB_DATA data;
++ data = tdb_fetch(pppdb, key2);
++ printf("%.*s\n", data.dsize, data.dptr);
++ rc=0;
++ } else {
++ fprintf(stderr, "No data found for %.*s\n", key2.dsize, key2.dptr);
++ }
++ } else {
++ fprintf(stderr, "Key %.*s not found\n", key.dsize, key.dptr);
++ }
++ }
++
++ tdb_close(pppdb);
++
++ return rc;
++}
diff --git a/recipes/ppp/ppp-2.4.1/pppd-resolv-varrun.patch b/recipes/ppp/ppp-2.4.1/pppd-resolv-varrun.patch
new file mode 100644
index 0000000000..ba5af253b4
--- /dev/null
+++ b/recipes/ppp/ppp-2.4.1/pppd-resolv-varrun.patch
@@ -0,0 +1,38 @@
+--- ppp/pppd/ipcp.c 2001-03-08 18:11:12.000000000 +1300
++++ ppp/pppd/ipcp.c 2005-02-06 14:10:13.055551720 +1300
+@@ -32,6 +32,8 @@
+ #include <sys/socket.h>
+ #include <netinet/in.h>
+ #include <arpa/inet.h>
++#include <sys/stat.h>
++#include <unistd.h>
+
+ #include "pppd.h"
+ #include "fsm.h"
+@@ -1859,6 +1861,14 @@
+ u_int32_t peerdns1, peerdns2;
+ {
+ FILE *f;
++ struct stat dirinfo;
++
++ if(stat(_PATH_OUTDIR, &dirinfo)) {
++ if(mkdir(_PATH_OUTDIR, 0775)) {
++ error("Failed to create directory %s: %m", _PATH_OUTDIR);
++ return;
++ }
++ }
+
+ f = fopen(_PATH_RESOLV, "w");
+ if (f == NULL) {
+--- ppp/pppd/pathnames.h 2001-03-08 18:15:37.000000000 +1300
++++ ppp/pppd/pathnames.h 2005-02-06 14:01:19.423676096 +1300
+@@ -28,7 +28,8 @@
+ #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options."
+ #define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors"
+ #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/"
+-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf"
++#define _PATH_OUTDIR _ROOT_PATH _PATH_VARRUN "/ppp"
++#define _PATH_RESOLV _PATH_OUTDIR "/resolv.conf"
+
+ #define _PATH_USEROPT ".ppprc"
+
diff --git a/recipes/ppp/ppp-2.4.1/pppd.patch b/recipes/ppp/ppp-2.4.1/pppd.patch
new file mode 100644
index 0000000000..3ac61c2489
--- /dev/null
+++ b/recipes/ppp/ppp-2.4.1/pppd.patch
@@ -0,0 +1,68 @@
+diff -ur ppp-2.4.1_org/chat/Makefile.linux ppp-2.4.1_patch/chat/Makefile.linux
+--- ppp-2.4.1_org/chat/Makefile.linux 1999-08-13 03:54:32.000000000 +0200
++++ ppp-2.4.1_patch/chat/Makefile.linux 2004-05-17 10:03:41.000000000 +0200
+@@ -20,7 +20,7 @@
+
+ install: chat
+ mkdir -p $(BINDIR)
+- $(INSTALL) -s -c chat $(BINDIR)
++ $(INSTALL) -c chat $(BINDIR)
+ $(INSTALL) -c -m 644 chat.8 $(MANDIR)/man8
+
+ clean:
+diff -ur ppp-2.4.1_org/pppd/Makefile.linux ppp-2.4.1_patch/pppd/Makefile.linux
+--- ppp-2.4.1_org/pppd/Makefile.linux 2001-03-08 06:00:35.000000000 +0100
++++ ppp-2.4.1_patch/pppd/Makefile.linux 2004-05-17 10:19:09.000000000 +0200
+@@ -56,7 +56,7 @@
+
+ INCLUDE_DIRS= -I../include
+
+-COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MULTILINK -DHAVE_MMAP
++COMPILE_FLAGS= -D_linux_=1 -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MULTILINK
+
+ CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
+
+@@ -112,11 +112,11 @@
+ endif
+
+
+-INSTALL= install -o root
++INSTALL= install
+
+ install: pppd
+ mkdir -p $(BINDIR) $(MANDIR)
+- $(INSTALL) -s -c -m 555 pppd $(BINDIR)/pppd
++ $(INSTALL) -c -m 555 pppd $(BINDIR)/pppd
+ if chgrp pppusers $(BINDIR)/pppd 2>/dev/null; then \
+ chmod o-rx,u+s $(BINDIR)/pppd; fi
+ $(INSTALL) -c -m 444 pppd.8 $(MANDIR)/man8
+diff -ur ppp-2.4.1_org/pppdump/Makefile.linux ppp-2.4.1_patch/pppdump/Makefile.linux
+--- ppp-2.4.1_org/pppdump/Makefile.linux 1999-07-26 13:09:29.000000000 +0200
++++ ppp-2.4.1_patch/pppdump/Makefile.linux 2004-05-17 10:04:20.000000000 +0200
+@@ -13,5 +13,5 @@
+
+ install:
+ mkdir -p $(BINDIR) $(MANDIR)/man8
+- $(INSTALL) -s -c pppdump $(BINDIR)
++ $(INSTALL) -c pppdump $(BINDIR)
+ $(INSTALL) -c -m 444 pppdump.8 $(MANDIR)/man8
+diff -ur ppp-2.4.1_org/pppstats/Makefile.linux ppp-2.4.1_patch/pppstats/Makefile.linux
+--- ppp-2.4.1_org/pppstats/Makefile.linux 1998-03-25 03:21:19.000000000 +0100
++++ ppp-2.4.1_patch/pppstats/Makefile.linux 2004-05-17 10:22:03.000000000 +0200
+@@ -11,14 +11,14 @@
+ COMPILE_FLAGS = -D_linux_ -I../include
+ LIBS =
+
+-INSTALL= install -o root -g daemon
++INSTALL= install
+
+ CFLAGS = $(COPTS) $(COMPILE_FLAGS)
+
+ all: pppstats
+
+ install: pppstats
+- $(INSTALL) -s -c pppstats $(BINDIR)/pppstats
++ $(INSTALL) -c pppstats $(BINDIR)/pppstats
+ $(INSTALL) -c -m 444 pppstats.8 $(MANDIR)/man8/pppstats.8
+
+ pppstats: $(PPPSTATSRCS)