From: Michael Tremer Date: Fri, 12 Feb 2010 19:38:16 +0000 (+0100) Subject: ppp: New package. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa4c11b53281eba1bee90d298b9ff61dfb64992b;p=ipfire-3.x.git ppp: New package. --- diff --git a/pkgs/core/ppp/patches/ppp-2.4.4-bogus_dns_addr.patch b/pkgs/core/ppp/patches/ppp-2.4.4-bogus_dns_addr.patch new file mode 100644 index 000000000..4af8d7e04 --- /dev/null +++ b/pkgs/core/ppp/patches/ppp-2.4.4-bogus_dns_addr.patch @@ -0,0 +1,104 @@ +diff -up ppp-2.4.4/pppd/ipcp.c.bogus_dns_addr ppp-2.4.4/pppd/ipcp.c +--- ppp-2.4.4/pppd/ipcp.c.bogus_dns_addr 2005-08-26 01:59:34.000000000 +0200 ++++ ppp-2.4.4/pppd/ipcp.c 2008-12-11 12:39:05.000000000 +0100 +@@ -715,7 +715,8 @@ ipcp_cilen(f) + #define LENCIADDRS(neg) (neg ? CILEN_ADDRS : 0) + #define LENCIVJ(neg, old) (neg ? (old? CILEN_COMPRESS : CILEN_VJ) : 0) + #define LENCIADDR(neg) (neg ? CILEN_ADDR : 0) +-#define LENCIDNS(neg) (neg ? (CILEN_ADDR) : 0) ++#define LENCIDNS(neg) LENCIADDR(neg) ++#define LENCIWINS(neg) LENCIADDR(neg) + + /* + * First see if we want to change our options to the old +@@ -737,7 +738,9 @@ ipcp_cilen(f) + LENCIVJ(go->neg_vj, go->old_vj) + + LENCIADDR(go->neg_addr) + + LENCIDNS(go->req_dns1) + +- LENCIDNS(go->req_dns2)) ; ++ LENCIDNS(go->req_dns2) + ++ LENCIWINS(go->winsaddr[0]) + ++ LENCIWINS(go->winsaddr[1])) ; + } + + +@@ -810,6 +813,19 @@ ipcp_addci(f, ucp, lenp) + } else \ + neg = 0; \ + } ++ ++#define ADDCIWINS(opt, addr) \ ++ if (addr) { \ ++ if (len >= CILEN_ADDR) { \ ++ u_int32_t l; \ ++ PUTCHAR(opt, ucp); \ ++ PUTCHAR(CILEN_ADDR, ucp); \ ++ l = ntohl(addr); \ ++ PUTLONG(l, ucp); \ ++ len -= CILEN_ADDR; \ ++ } else \ ++ addr = 0; \ ++ } + + ADDCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, go->ouraddr, + go->hisaddr); +@@ -823,6 +839,10 @@ ipcp_addci(f, ucp, lenp) + + ADDCIDNS(CI_MS_DNS2, go->req_dns2, go->dnsaddr[1]); + ++ ADDCIWINS(CI_MS_WINS1, go->winsaddr[0]); ++ ++ ADDCIWINS(CI_MS_WINS2, go->winsaddr[1]); ++ + *lenp -= len; + } + +@@ -1159,6 +1179,15 @@ ipcp_nakci(f, p, len, treat_as_reject) + try.neg_addr = 1; + no.neg_addr = 1; + break; ++ case CI_MS_WINS1: ++ case CI_MS_WINS2: ++ if (cilen != CILEN_ADDR) ++ goto bad; ++ GETLONG(l, p); ++ ciaddr1 = htonl(l); ++ if (ciaddr1) ++ try.winsaddr[citype == CI_MS_WINS2] = ciaddr1; ++ break; + } + p = next; + } +@@ -1275,6 +1304,21 @@ ipcp_rejci(f, p, len) + try.neg = 0; \ + } + ++#define REJCIWINS(opt, addr) \ ++ if (addr && \ ++ ((cilen = p[1]) == CILEN_ADDR) && \ ++ len >= cilen && \ ++ p[0] == opt) { \ ++ u_int32_t l; \ ++ len -= cilen; \ ++ INCPTR(2, p); \ ++ GETLONG(l, p); \ ++ cilong = htonl(l); \ ++ /* Check rejected value. */ \ ++ if (cilong != addr) \ ++ goto bad; \ ++ try.winsaddr[opt == CI_MS_WINS2] = 0; \ ++ } + + REJCIADDRS(CI_ADDRS, !go->neg_addr && go->old_addrs, + go->ouraddr, go->hisaddr); +@@ -1288,6 +1332,10 @@ ipcp_rejci(f, p, len) + + REJCIDNS(CI_MS_DNS2, req_dns2, go->dnsaddr[1]); + ++ REJCIWINS(CI_MS_WINS1, go->winsaddr[0]); ++ ++ REJCIWINS(CI_MS_WINS2, go->winsaddr[1]); ++ + /* + * If there are any remaining CIs, then this packet is bad. + */ diff --git a/pkgs/core/ppp/patches/ppp-2.4.4-closelog.patch b/pkgs/core/ppp/patches/ppp-2.4.4-closelog.patch new file mode 100644 index 000000000..6866274bf --- /dev/null +++ b/pkgs/core/ppp/patches/ppp-2.4.4-closelog.patch @@ -0,0 +1,20 @@ +diff -up ppp-2.4.4/pppd/main.c.closelog ppp-2.4.4/pppd/main.c +--- ppp-2.4.4/pppd/main.c.closelog 2008-03-06 22:54:19.000000000 +0100 ++++ ppp-2.4.4/pppd/main.c 2008-03-06 22:54:31.000000000 +0100 +@@ -1567,6 +1567,8 @@ safe_fork(int infd, int outfd, int errfd + if (errfd == 0 || errfd == 1) + errfd = dup(errfd); + ++ closelog(); ++ + /* dup the in, out, err fds to 0, 1, 2 */ + if (infd != 0) + dup2(infd, 0); +@@ -1575,7 +1577,6 @@ safe_fork(int infd, int outfd, int errfd + if (errfd != 2) + dup2(errfd, 2); + +- closelog(); + if (log_to_fd > 2) + close(log_to_fd); + if (the_channel->close) diff --git a/pkgs/core/ppp/patches/ppp-2.4.4-dontwriteetc.patch b/pkgs/core/ppp/patches/ppp-2.4.4-dontwriteetc.patch new file mode 100644 index 000000000..8ab410898 --- /dev/null +++ b/pkgs/core/ppp/patches/ppp-2.4.4-dontwriteetc.patch @@ -0,0 +1,59 @@ +diff -up ppp-2.4.4/chat/chat.8.dontwriteetc ppp-2.4.4/chat/chat.8 +--- ppp-2.4.4/chat/chat.8.dontwriteetc 2004-11-13 13:22:49.000000000 +0100 ++++ ppp-2.4.4/chat/chat.8 2008-03-03 15:37:55.000000000 +0100 +@@ -200,7 +200,7 @@ The \fBSAY\fR directive allows the scrip + at the terminal via standard error. If \fBchat\fR is being run by + pppd, and pppd is running as a daemon (detached from its controlling + terminal), standard error will normally be redirected to the file +-/etc/ppp/connect\-errors. ++/var/log/ppp/connect\-errors. + .LP + \fBSAY\fR strings must be enclosed in single or double quotes. If + carriage return and line feed are needed in the string to be output, +diff -up ppp-2.4.4/pppd/pathnames.h.dontwriteetc ppp-2.4.4/pppd/pathnames.h +--- ppp-2.4.4/pppd/pathnames.h.dontwriteetc 2008-03-03 15:26:51.000000000 +0100 ++++ ppp-2.4.4/pppd/pathnames.h 2008-03-03 15:26:51.000000000 +0100 +@@ -28,9 +28,9 @@ + #define _PATH_AUTHUP _ROOT_PATH "/etc/ppp/auth-up" + #define _PATH_AUTHDOWN _ROOT_PATH "/etc/ppp/auth-down" + #define _PATH_TTYOPT _ROOT_PATH "/etc/ppp/options." +-#define _PATH_CONNERRS _ROOT_PATH "/etc/ppp/connect-errors" ++#define _PATH_CONNERRS _ROOT_PATH "/var/log/ppp/connect-errors" + #define _PATH_PEERFILES _ROOT_PATH "/etc/ppp/peers/" +-#define _PATH_RESOLV _ROOT_PATH "/etc/ppp/resolv.conf" ++#define _PATH_RESOLV _ROOT_PATH "/var/run/ppp/resolv.conf" + + #define _PATH_USEROPT ".ppprc" + #define _PATH_PSEUDONYM ".ppp_pseudonym" +diff -up ppp-2.4.4/linux/Makefile.top.dontwriteetc ppp-2.4.4/linux/Makefile.top +--- ppp-2.4.4/linux/Makefile.top.dontwriteetc 2006-06-04 07:04:14.000000000 +0200 ++++ ppp-2.4.4/linux/Makefile.top 2008-03-03 15:42:10.000000000 +0100 +@@ -5,6 +5,8 @@ BINDIR = $(DESTDIR)/sbin + INCDIR = $(DESTDIR)/include + MANDIR = $(DESTDIR)/share/man + ETCDIR = $(INSTROOT)@SYSCONF@/ppp ++RUNDIR = $(DESTDIR)/var/run/ppp ++LOGDIR = $(DESTDIR)/var/log/ppp + + # uid 0 = root + INSTALL= install +@@ -16,7 +18,7 @@ all: + cd pppstats; $(MAKE) $(MFLAGS) all + cd pppdump; $(MAKE) $(MFLAGS) all + +-install: $(BINDIR) $(MANDIR)/man8 install-progs install-devel ++install: $(BINDIR) $(RUNDIR) $(LOGDIR) $(MANDIR)/man8 install-progs install-devel + + install-progs: + cd chat; $(MAKE) $(MFLAGS) install +@@ -44,6 +46,10 @@ $(MANDIR)/man8: + $(INSTALL) -d -m 755 $@ + $(ETCDIR): + $(INSTALL) -d -m 755 $@ ++$(RUNDIR): ++ $(INSTALL) -d -m 755 $@ ++$(LOGDIR): ++ $(INSTALL) -d -m 755 $@ + + clean: + rm -f `find . -name '*.[oas]' -print` diff --git a/pkgs/core/ppp/patches/ppp-2.4.4-fix.patch b/pkgs/core/ppp/patches/ppp-2.4.4-fix.patch new file mode 100644 index 000000000..85a946cba --- /dev/null +++ b/pkgs/core/ppp/patches/ppp-2.4.4-fix.patch @@ -0,0 +1,139 @@ +--- ppp-2.4.3/pppd/plugins/rp-pppoe/discovery.c.fix 2004-11-04 11:07:37.000000000 +0100 ++++ ppp-2.4.3/pppd/plugins/rp-pppoe/discovery.c 2004-11-22 16:00:24.522462124 +0100 +@@ -13,6 +13,8 @@ + + #include "pppoe.h" + ++void warn __P((char *, ...)); /* log a warning message */ ++ + #ifdef HAVE_SYSLOG_H + #include + #endif +--- ppp-2.4.3/pppd/ipv6cp.c.fix 2004-11-13 03:28:15.000000000 +0100 ++++ ppp-2.4.3/pppd/ipv6cp.c 2004-11-22 16:00:27.049114044 +0100 +@@ -151,6 +151,7 @@ + */ + + #include ++#include + #include + #include + #include +@@ -1064,7 +1065,9 @@ + return (rc); /* Return final code */ + } + +- ++#if defined(SOL2) || defined(__linux__) ++int ether_to_eui64(eui64_t *p_eui64); ++#endif + /* + * ipv6_check_options - check that any IP-related options are OK, + * and assign appropriate defaults. +--- ppp-2.4.3/include/linux/if_pppox.h.fix 2001-12-15 01:34:24.000000000 +0100 ++++ ppp-2.4.3/include/linux/if_pppox.h 2004-11-22 16:00:27.049114044 +0100 +@@ -18,7 +18,7 @@ + + + #include +-#include ++#include + + #ifdef __KERNEL__ + #include +@@ -97,10 +97,10 @@ + #define PTT_GEN_ERR __constant_htons(0x0203) + + struct pppoe_hdr { +-#if defined(__LITTLE_ENDIAN_BITFIELD) ++#if __BYTE_ORDER == __LITTLE_ENDIAN + __u8 ver : 4; + __u8 type : 4; +-#elif defined(__BIG_ENDIAN_BITFIELD) ++#elif __BYTE_ORDER == __BIG_ENDIAN + __u8 type : 4; + __u8 ver : 4; + #else +--- ppp-2.4.3/pppdump/deflate.c.fix 2004-02-02 04:36:46.000000000 +0100 ++++ ppp-2.4.3/pppdump/deflate.c 2004-11-22 16:02:18.071820020 +0100 +@@ -39,6 +39,7 @@ + #include + #include + #include ++#include + #include + #include + #include "ppp_defs.h" +@@ -237,8 +238,8 @@ + { + struct deflate_state *state = (struct deflate_state *) arg; + u_char *rptr, *wptr; +- int rlen, olen, ospace; +- int seq, i, flush, r, decode_proto; ++ int rlen, olen; ++ int seq, r; + + rptr = mi; + if (*rptr == 0) +--- ppp-2.4.3/pppdump/bsd-comp.c.fix 2004-02-02 04:36:46.000000000 +0100 ++++ ppp-2.4.3/pppdump/bsd-comp.c 2004-11-22 16:00:27.052113631 +0100 +@@ -383,7 +383,7 @@ + || options[0] != CI_BSD_COMPRESS || options[1] != CILEN_BSD_COMPRESS + || BSD_VERSION(options[2]) != BSD_CURRENT_VERSION + || BSD_NBITS(options[2]) != db->maxbits +- || decomp && db->lens == NULL) ++ || (decomp && db->lens == NULL)) + return 0; + + if (decomp) { +@@ -556,11 +556,11 @@ + u_int n_bits = db->n_bits; + u_int tgtbitno = 32-n_bits; /* bitno when we have a code */ + struct bsd_dict *dictp; +- int explen, i, seq, len; ++ int explen, seq, len; + u_int incode, oldcode, finchar; + u_char *p, *rptr, *wptr; + int ilen; +- int dlen, space, codelen, extra; ++ int dlen=0, codelen, extra; + + rptr = cmsg; + if (*rptr == 0) +@@ -616,7 +616,7 @@ + } + + if (incode > max_ent + 2 || incode > db->maxmaxcode +- || incode > max_ent && oldcode == CLEAR) { ++ || (incode > max_ent && oldcode == CLEAR)) { + if (db->debug) { + printf("bsd_decomp%d: bad code 0x%x oldcode=0x%x ", + db->unit, incode, oldcode); +--- ppp-2.4.3/pppdump/pppdump.c.fix 2004-02-02 04:36:46.000000000 +0100 ++++ ppp-2.4.3/pppdump/pppdump.c 2004-11-22 16:00:27.054113356 +0100 +@@ -34,6 +34,7 @@ + * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + #include ++#include + #include + #include + #include +@@ -191,7 +192,7 @@ + show_time(f, c); + break; + default: +- printf("?%.2x\n"); ++ printf("?%.2x\n", c); + } + } + } +@@ -421,7 +422,7 @@ + show_time(f, c); + break; + default: +- printf("?%.2x\n"); ++ printf("?%.2x\n", c); + } + } + } diff --git a/pkgs/core/ppp/patches/ppp-2.4.4-ipv6-accept-remote.patch b/pkgs/core/ppp/patches/ppp-2.4.4-ipv6-accept-remote.patch new file mode 100644 index 000000000..2bc82338c --- /dev/null +++ b/pkgs/core/ppp/patches/ppp-2.4.4-ipv6-accept-remote.patch @@ -0,0 +1,40 @@ +--- ppp-2.4.3/pppd/ipv6cp.c~ 2005-11-04 09:40:10.000000000 +0000 ++++ ppp-2.4.3/pppd/ipv6cp.c 2005-11-04 10:20:14.000000000 +0000 +@@ -235,6 +235,8 @@ static option_t ipv6cp_option_list[] = { + + { "ipv6cp-accept-local", o_bool, &ipv6cp_allowoptions[0].accept_local, + "Accept peer's interface identifier for us", 1 }, ++ { "ipv6cp-accept-remote", o_bool, &ipv6cp_allowoptions[0].accept_remote, ++ "Accept peer's interface identifier for itself", 1 }, + + { "ipv6cp-use-ipaddr", o_bool, &ipv6cp_allowoptions[0].use_ip, + "Use (default) IPv4 address as interface identifier", 1 }, +@@ -427,6 +429,7 @@ ipv6cp_init(unit) + memset(ao, 0, sizeof(*ao)); + + wo->accept_local = 1; ++ wo->accept_remote = 1; + wo->neg_ifaceid = 1; + ao->neg_ifaceid = 1; + +@@ -952,7 +955,7 @@ ipv6cp_reqci(f, inp, len, reject_if_disa + orc = CONFREJ; /* Reject CI */ + break; + } +- if (!eui64_iszero(wo->hisid) && ++ if (!eui64_iszero(wo->hisid) && !wo->accept_remote && + !eui64_equals(ifaceid, wo->hisid) && + eui64_iszero(go->hisid)) { + +--- ppp-2.4.3/pppd/ipv6cp.h~ 2002-12-04 23:03:32.000000000 +0000 ++++ ppp-2.4.3/pppd/ipv6cp.h 2005-11-04 10:20:55.000000000 +0000 +@@ -150,7 +150,8 @@ + typedef struct ipv6cp_options { + int neg_ifaceid; /* Negotiate interface identifier? */ + int req_ifaceid; /* Ask peer to send interface identifier? */ +- int accept_local; /* accept peer's value for iface id? */ ++ int accept_local; /* accept peer's value for our iface id? */ ++ int accept_remote; /* accept peer's value for his iface id? */ + int opt_local; /* ourtoken set by option */ + int opt_remote; /* histoken set by option */ + int use_ip; /* use IP as interface identifier */ diff --git a/pkgs/core/ppp/patches/ppp-2.4.4-libutil.patch b/pkgs/core/ppp/patches/ppp-2.4.4-libutil.patch new file mode 100644 index 000000000..77893658f --- /dev/null +++ b/pkgs/core/ppp/patches/ppp-2.4.4-libutil.patch @@ -0,0 +1,86 @@ +glibc provides logwtmp in libutil, so we'll use that instead. + +--- ppp-2.4.2/pppd/sys-linux.c 2004-03-10 18:26:53.000000000 -0500 ++++ ppp-2.4.2/pppd/sys-linux.c 2004-03-10 18:26:40.000000000 -0500 +@@ -2151,81 +2151,6 @@ + + /******************************************************************** + * +- * Update the wtmp file with the appropriate user name and tty device. +- */ +- +-void logwtmp (const char *line, const char *name, const char *host) +-{ +- struct utmp ut, *utp; +- pid_t mypid = getpid(); +-#if __GLIBC__ < 2 +- int wtmp; +-#endif +- +-/* +- * Update the signon database for users. +- * Christoph Lameter: Copied from poeigl-1.36 Jan 3, 1996 +- */ +- utmpname(_PATH_UTMP); +- setutent(); +- while ((utp = getutent()) && (utp->ut_pid != mypid)) +- /* nothing */; +- +- if (utp) +- memcpy(&ut, utp, sizeof(ut)); +- else +- /* some gettys/telnetds don't initialize utmp... */ +- memset(&ut, 0, sizeof(ut)); +- +- if (ut.ut_id[0] == 0) +- strncpy(ut.ut_id, line + 3, sizeof(ut.ut_id)); +- +- strncpy(ut.ut_user, name, sizeof(ut.ut_user)); +- strncpy(ut.ut_line, line, sizeof(ut.ut_line)); +- +- time(&ut.ut_time); +- +- ut.ut_type = USER_PROCESS; +- ut.ut_pid = mypid; +- +- /* Insert the host name if one is supplied */ +- if (*host) +- strncpy (ut.ut_host, host, sizeof(ut.ut_host)); +- +- /* Insert the IP address of the remote system if IP is enabled */ +- if (ipcp_protent.enabled_flag && ipcp_hisoptions[0].neg_addr) +- memcpy(&ut.ut_addr, (char *) &ipcp_hisoptions[0].hisaddr, +- sizeof(ut.ut_addr)); +- +- /* CL: Makes sure that the logout works */ +- if (*host == 0 && *name==0) +- ut.ut_host[0]=0; +- +- pututline(&ut); +- endutent(); +-/* +- * Update the wtmp file. +- */ +-#if __GLIBC__ >= 2 +- updwtmp(_PATH_WTMP, &ut); +-#else +- wtmp = open(_PATH_WTMP, O_APPEND|O_WRONLY); +- if (wtmp >= 0) { +- flock(wtmp, LOCK_EX); +- +- if (write (wtmp, (char *)&ut, sizeof(ut)) != sizeof(ut)) +- warn("error writing %s: %m", _PATH_WTMP); +- +- flock(wtmp, LOCK_UN); +- +- close (wtmp); +- } +-#endif +-} +- +- +-/******************************************************************** +- * + * sifvjcomp - config tcp header compression + */ + diff --git a/pkgs/core/ppp/patches/ppp-2.4.4-local.patch b/pkgs/core/ppp/patches/ppp-2.4.4-local.patch new file mode 100644 index 000000000..8e23f2907 --- /dev/null +++ b/pkgs/core/ppp/patches/ppp-2.4.4-local.patch @@ -0,0 +1,68 @@ +diff -up ppp-2.4.4/configure.local ppp-2.4.4/configure +--- ppp-2.4.4/configure.local 2005-07-08 20:23:05.000000000 -0400 ++++ ppp-2.4.4/configure 2008-08-28 17:38:04.000000000 -0400 +@@ -2,7 +2,7 @@ + # $Id: configure,v 1.37 2005/06/26 23:53:17 carlsonj Exp $ + + # Where to install stuff by default +-DESTDIR=/usr/local ++DESTDIR=/usr + SYSCONF=/etc + + # if [ -d /NextApps ]; then +diff -up ppp-2.4.4/pppd/Makefile.linux.local ppp-2.4.4/pppd/Makefile.linux +--- ppp-2.4.4/pppd/Makefile.linux.local 2008-08-28 17:37:33.000000000 -0400 ++++ ppp-2.4.4/pppd/Makefile.linux 2008-08-28 17:37:33.000000000 -0400 +@@ -97,8 +97,8 @@ endif + + # EAP SRP-SHA1 + ifdef USE_SRP +-CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/local/ssl/include +-LIBS += -lsrp -L/usr/local/ssl/lib -lcrypto ++CFLAGS += -DUSE_SRP -DOPENSSL -I/usr/include/openssl ++LIBS += -lsrp -L/usr/lib -lcrypto + TARGETS += srp-entry + EXTRAINSTALL = $(INSTALL) -c -m 555 srp-entry $(BINDIR)/srp-entry + MANPAGES += srp-entry.8 +diff -up ppp-2.4.4/scripts/ppp-on-rsh.local ppp-2.4.4/scripts/ppp-on-rsh +--- ppp-2.4.4/scripts/ppp-on-rsh.local 2000-04-15 05:49:28.000000000 -0400 ++++ ppp-2.4.4/scripts/ppp-on-rsh 2008-08-28 17:37:33.000000000 -0400 +@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost + # For this example, we assume that pppd on both local and remote + # machines reside in the same place, /usr/local/bin/pppd + # +-PPPD_LOC=/usr/local/bin/pppd ++PPPD_LOC=/usr/sbin/pppd + + # + # The location of local options file (where rsh client is running). +diff -up ppp-2.4.4/scripts/ppp-on-ssh.local ppp-2.4.4/scripts/ppp-on-ssh +--- ppp-2.4.4/scripts/ppp-on-ssh.local 2000-04-15 05:49:42.000000000 -0400 ++++ ppp-2.4.4/scripts/ppp-on-ssh 2008-08-28 17:37:33.000000000 -0400 +@@ -26,7 +26,7 @@ PPPD_RHOST=myremotehost + # For this example, we assume that pppd on both local and remote + # machines reside in the same place, /usr/local/bin/pppd + # +-PPPD_LOC=/usr/local/bin/pppd ++PPPD_LOC=/usr/sbin/pppd + + # + # The location of local options file (where ssh client is running). +@@ -52,7 +52,7 @@ PPPD_REM_OPT=/etc/ppp/options-ssh-rem + # + # The location of ssh client on the local machine + # +-SSH_LOC=/usr/local/bin/ssh ++SSH_LOC=/usr/bin/ssh + + export PPPD_LOC PPPD_LOC_OPT PPPD_REM_OPT PPPD_RHOST SSH_LOC + +diff -up ppp-2.4.4/scripts/secure-card.local ppp-2.4.4/scripts/secure-card +--- ppp-2.4.4/scripts/secure-card.local 2004-02-01 22:36:46.000000000 -0500 ++++ ppp-2.4.4/scripts/secure-card 2008-08-28 17:37:33.000000000 -0400 +@@ -1,4 +1,4 @@ +-#!/usr/local/bin/expect -f ++#!/usr/bin/expect -f + # + # This script was written by Jim Isaacson . It is + # designed to work as a script to use the SecureCARD(tm) device. This diff --git a/pkgs/core/ppp/patches/ppp-2.4.4-new_speeds.patch b/pkgs/core/ppp/patches/ppp-2.4.4-new_speeds.patch new file mode 100644 index 000000000..99816f750 --- /dev/null +++ b/pkgs/core/ppp/patches/ppp-2.4.4-new_speeds.patch @@ -0,0 +1,34 @@ +diff -up ppp-2.4.4/pppd/sys-linux.c.new_speeds ppp-2.4.4/pppd/sys-linux.c +--- ppp-2.4.4/pppd/sys-linux.c.new_speeds 2008-05-12 17:44:11.000000000 -0400 ++++ ppp-2.4.4/pppd/sys-linux.c 2008-05-12 17:50:51.000000000 -0400 +@@ -849,6 +849,30 @@ struct speed { + #ifdef B921600 + { 921600, B921600 }, + #endif ++#ifdef B1000000 ++ { 1000000, B1000000 }, ++#endif ++#ifdef B1152000 ++ { 1152000, B1152000 }, ++#endif ++#ifdef B1500000 ++ { 1500000, B1500000 }, ++#endif ++#ifdef B2000000 ++ { 2000000, B2000000 }, ++#endif ++#ifdef B2500000 ++ { 2500000, B2500000 }, ++#endif ++#ifdef B3000000 ++ { 3000000, B3000000 }, ++#endif ++#ifdef B3500000 ++ { 3500000, B3500000 }, ++#endif ++#ifdef B4000000 ++ { 4000000, B4000000 }, ++#endif + { 0, 0 } + }; + diff --git a/pkgs/core/ppp/patches/ppp-2.4.4-pie.patch b/pkgs/core/ppp/patches/ppp-2.4.4-pie.patch new file mode 100644 index 000000000..32331fa2a --- /dev/null +++ b/pkgs/core/ppp/patches/ppp-2.4.4-pie.patch @@ -0,0 +1,24 @@ +diff -up ppp-2.4.4/chat/Makefile.linux.pie ppp-2.4.4/chat/Makefile.linux +--- ppp-2.4.4/chat/Makefile.linux.pie 2008-08-28 17:34:49.000000000 -0400 ++++ ppp-2.4.4/chat/Makefile.linux 2008-08-28 17:34:49.000000000 -0400 +@@ -18,7 +18,7 @@ INSTALL= install + all: chat + + chat: chat.o +- $(CC) -o chat chat.o ++ $(CC) -pie -o chat chat.o + + chat.o: chat.c + $(CC) -c $(CFLAGS) -o chat.o chat.c +diff -up ppp-2.4.4/pppd/Makefile.linux.pie ppp-2.4.4/pppd/Makefile.linux +--- ppp-2.4.4/pppd/Makefile.linux.pie 2008-08-28 17:34:49.000000000 -0400 ++++ ppp-2.4.4/pppd/Makefile.linux 2008-08-28 17:35:38.000000000 -0400 +@@ -207,7 +207,7 @@ install: pppd + $(INSTALL) -c -m 444 pppd.8 $(MANDIR) + + pppd: $(PPPDOBJS) +- $(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS) ++ $(CC) $(CFLAGS) -pie $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS) + + srp-entry: srp-entry.c + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS) diff --git a/pkgs/core/ppp/patches/ppp-2.4.4-pppoatm-mtu.patch b/pkgs/core/ppp/patches/ppp-2.4.4-pppoatm-mtu.patch new file mode 100644 index 000000000..085f39886 --- /dev/null +++ b/pkgs/core/ppp/patches/ppp-2.4.4-pppoatm-mtu.patch @@ -0,0 +1,28 @@ +--- ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c.mtu 2004-10-07 13:32:05.660910432 +0100 ++++ ppp-2.4.2/pppd/plugins/pppoatm/pppoatm.c 2004-10-07 13:58:20.096559832 +0100 +@@ -175,8 +175,10 @@ + { + int sock; + struct ifreq ifr; +- if (mtu > pppoatm_max_mtu) +- error("Couldn't increase MTU to %d", mtu); ++ if (pppoatm_max_mtu && mtu > pppoatm_max_mtu) { ++ warn("Couldn't increase MTU to %d. Using %d", mtu, pppoatm_max_mtu); ++ mtu = pppoatm_max_mtu; ++ } + sock = socket(AF_INET, SOCK_DGRAM, 0); + if (sock < 0) + fatal("Couldn't create IP socket: %m"); +@@ -192,8 +194,10 @@ + int pcomp, + int accomp) + { +- if (mru > pppoatm_max_mru) +- error("Couldn't increase MRU to %d", mru); ++ if (pppoatm_max_mru && mru > pppoatm_max_mru) { ++ warn("Couldn't increase MRU to %d. Using %d", mru, pppoatm_max_mru); ++ mru = pppoatm_max_mru; ++ } + } + + void plugin_init(void) diff --git a/pkgs/core/ppp/patches/ppp-2.4.4-response_len.patch b/pkgs/core/ppp/patches/ppp-2.4.4-response_len.patch new file mode 100644 index 000000000..27e082b73 --- /dev/null +++ b/pkgs/core/ppp/patches/ppp-2.4.4-response_len.patch @@ -0,0 +1,12 @@ +diff -up ppp-2.4.4/pppd/chap_ms.c.response_len ppp-2.4.4/pppd/chap_ms.c +--- ppp-2.4.4/pppd/chap_ms.c.response_len 2008-03-06 23:07:18.000000000 +0100 ++++ ppp-2.4.4/pppd/chap_ms.c 2008-03-06 23:07:49.000000000 +0100 +@@ -852,7 +852,7 @@ ChapMS2(u_char *rchallenge, u_char *Peer + u_char *p = &response[MS_CHAP2_PEER_CHALLENGE]; + int i; + +- BZERO(response, sizeof(*response)); ++ BZERO(response, MS_CHAP2_RESPONSE_LEN); + + /* Generate the Peer-Challenge if requested, or copy it if supplied. */ + if (!PeerChallenge) diff --git a/pkgs/core/ppp/ppp.nm b/pkgs/core/ppp/ppp.nm new file mode 100644 index 000000000..2a2afa92b --- /dev/null +++ b/pkgs/core/ppp/ppp.nm @@ -0,0 +1,79 @@ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### + +############################################################################### +# Definitions +############################################################################### + +include $(PKGROOT)/Include + +PKG_NAME = ppp +PKG_VER = 2.4.4 +PKG_REL = 0 + +PKG_MAINTAINER = +PKG_GROUP = System/Daemons +PKG_URL = ftp://ftp.samba.org/pub/ppp/ +PKG_LICENSE = BSD and LGPLv2+ and GPLv2+ and Public Domain +PKG_SUMMARY = The PPP (Point-to-Point Protocol) daemon. + +PKG_DEPS += libpcap linux-atm pam + +define PKG_DESCRIPTION + The ppp package contains the PPP (Point-to-Point Protocol) daemon and \ + documentation for PPP support. The PPP protocol provides a method for \ + transmitting datagrams over serial point-to-point links. PPP is \ + usually used to dial in to an ISP or other organization over a modem \ + and phone line. +endef + +PKG_TARBALL = $(THISAPP).tar.gz + +define STAGE_PREPARE_CMDS + cd $(DIR_APP) && sed -e "s/^LIBS =/LIBS=-lutil/" -i pppd/Makefile.linux + + cd $(DIR_APP) && sed -e "s@^RUNDIR .*@RUNDIR = /var/run/ppp@" \ + -e "s@^LOGDIR .*@LOGDIR = /var/log/ppp@" \ + -i linux/Makefile.top +endef + +define STAGE_BUILD + cd $(DIR_APP) && \ + ./configure \ + --prefix=/usr + + cd $(DIR_APP) && make CC="gcc $(CFLAGS)" $(PARALLELISMFLAGS) \ + HAVE_INET6=yes USE_PAM=y +endef + +define STAGE_INSTALL + cd $(DIR_APP) && make install INSTROOT=$(BUILDROOT) + + rm -rfv $(BUILDROOT)/etc/ppp/plugins + + -mkdir -pv $(BUILDROOT)/etc/ppp + touch $(BUILDROOT)/etc/ppp/secrets + chmod -v 600 $(BUILDROOT)/etc/ppp/secrets + ln -svf secrets $(BUILDROOT)/etc/ppp/pap-secrets + ln -svf secrets $(BUILDROOT)/etc/ppp/chap-secrets + + -mkdir -pv $(BUILDROOT)/etc/pam.d/ + cp -vf $(DIR_SOURCE)/ppp.pam $(BUILDROOT)/etc/pam.d/ +endef diff --git a/src/pam.d/ppp b/pkgs/core/ppp/ppp.pam similarity index 100% rename from src/pam.d/ppp rename to pkgs/core/ppp/ppp.pam