security fix, bug #66296
authorHeinrich Wendel <lanius@gentoo.org>
Thu, 7 Oct 2004 14:57:54 +0000 (14:57 +0000)
committerHeinrich Wendel <lanius@gentoo.org>
Thu, 7 Oct 2004 14:57:54 +0000 (14:57 +0000)
net-dialup/rp-pppoe/ChangeLog
net-dialup/rp-pppoe/Manifest
net-dialup/rp-pppoe/files/digest-rp-pppoe-3.5-r2 [new file with mode: 0644]
net-dialup/rp-pppoe/files/rp-pppoe-3.5-dsa-557.patch [new file with mode: 0644]
net-dialup/rp-pppoe/rp-pppoe-3.5-r2.ebuild [new file with mode: 0644]

index 351101cd7adefa60dcf792557084d86ef7b993a7..95afcbd8612a678c76a8bf9fc3e73e689d9bfabf 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for net-dialup/rp-pppoe
 # Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dialup/rp-pppoe/ChangeLog,v 1.29 2004/09/27 12:49:23 dragonheart Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/rp-pppoe/ChangeLog,v 1.30 2004/10/07 14:57:54 lanius Exp $
+
+*rp-pppoe-3.5-r2 (07 Oct 2004)
+
+  07 Oct 2004; Heinrich Wendel <lanius@gentoo.org>
+  +files/rp-pppoe-3.5-dsa-557.patch, +rp-pppoe-3.5-r2.ebuild:
+  security fix, bug #66296
 
   27 Sep 2004; Daniel Black <dragonheart@gentoo.org> rp-pppoe-3.5-r1.ebuild:
   )) error as per bug #65516. Thanks Heiko Helmle <helman@gmx.de>
index 2a60918ededac14bfc912bcfdcd105cebb567264..36ac4bd6c9272ca118a45136c18db1e4e775dabf 100644 (file)
@@ -1,16 +1,9 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 291b44a377d4aa10401bce2a3bb0ec63 ChangeLog 3985
-MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163
+MD5 150d4fc6e659bdbaed4dcc845c3df8ef rp-pppoe-3.5-r2.ebuild 1648
 MD5 0f639c9d201201602dd1d3cbcefc8896 rp-pppoe-3.5-r1.ebuild 1598
-MD5 5b5f33ce0a1197b7e246cd8af9ab5662 files/rp-pppoe.rc 503
+MD5 afbb9c6bdb3d0404edfbe067972e414d ChangeLog 4153
+MD5 ec2f84816306825d125d0c01bd86758d metadata.xml 163
+MD5 3ec97394e888b357e2c6020b3ab0155c files/rp-pppoe-3.5-dsa-557.patch 5581
 MD5 4d75ec30cff5b02997155a83a3c3ed9f files/digest-rp-pppoe-3.5-r1 64
+MD5 4d75ec30cff5b02997155a83a3c3ed9f files/digest-rp-pppoe-3.5-r2 64
+MD5 5b5f33ce0a1197b7e246cd8af9ab5662 files/rp-pppoe.rc 503
 MD5 d90e4422c967ed2ba160c12b22f977b4 files/rp-pppoe-3.5-pidfile.patch 3266
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.4 (GNU/Linux)
-
-iD8DBQFBWAxZmdTrptrqvGERAoUfAJ9ZrcTZxGbl8lEwo8N2G42EFQHShgCgndY9
-UoWt6Cc+GJUX58pApzVGY/w=
-=wWbV
------END PGP SIGNATURE-----
diff --git a/net-dialup/rp-pppoe/files/digest-rp-pppoe-3.5-r2 b/net-dialup/rp-pppoe/files/digest-rp-pppoe-3.5-r2
new file mode 100644 (file)
index 0000000..f73d1df
--- /dev/null
@@ -0,0 +1 @@
+MD5 97972f8f8f6a3ab9b7070333a6a29c4b rp-pppoe-3.5.tar.gz 189321
diff --git a/net-dialup/rp-pppoe/files/rp-pppoe-3.5-dsa-557.patch b/net-dialup/rp-pppoe/files/rp-pppoe-3.5-dsa-557.patch
new file mode 100644 (file)
index 0000000..9dcc0ed
--- /dev/null
@@ -0,0 +1,154 @@
+diff -Nru rp-pppoe-3.5.orig/man/pppoe-relay.8 rp-pppoe-3.5/man/pppoe-relay.8
+--- rp-pppoe-3.5.orig/man/pppoe-relay.8        2002-07-08 17:38:24.000000000 +0300
++++ rp-pppoe-3.5/man/pppoe-relay.8     2004-10-05 19:06:26.000000000 +0300
+@@ -120,6 +120,5 @@
+ The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+ 
+ .SH SEE ALSO
+-adsl-start(8), adsl-stop(8), adsl-connect(8), pppd(8), pppoe.conf(5),
+-pppoe(8), adsl-setup(8), adsl-status(8), pppoe-sniff(8), pppoe-server(8)
++pppd(8), pppoe(8), pppoe-sniff(8), pppoe-relay(8), /usr/share/doc/pppoe/README.Debian
+ 
+diff -Nru rp-pppoe-3.5.orig/man/pppoe-server.8 rp-pppoe-3.5/man/pppoe-server.8
+--- rp-pppoe-3.5.orig/man/pppoe-server.8       2002-07-08 17:38:24.000000000 +0300
++++ rp-pppoe-3.5/man/pppoe-server.8    2004-10-05 19:06:26.000000000 +0300
+@@ -168,6 +168,5 @@
+ The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+ 
+ .SH SEE ALSO
+-adsl-start(8), adsl-stop(8), adsl-connect(8), pppd(8), pppoe.conf(5),
+-pppoe(8), adsl-setup(8), adsl-status(8), pppoe-sniff(8), pppoe-relay(8)
++pppd(8), pppoe(8), pppoe-sniff(8), pppoe-relay(8), /usr/share/doc/pppoe/README.Debian
+ 
+diff -Nru rp-pppoe-3.5.orig/man/pppoe-sniff.8 rp-pppoe-3.5/man/pppoe-sniff.8
+--- rp-pppoe-3.5.orig/man/pppoe-sniff.8        2002-07-08 17:38:24.000000000 +0300
++++ rp-pppoe-3.5/man/pppoe-sniff.8     2004-10-05 19:06:26.000000000 +0300
+@@ -73,6 +73,5 @@
+ The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+ 
+ .SH SEE ALSO
+-adsl-start(8), adsl-stop(8), adsl-connect(8), pppd(8), pppoe.conf(5),
+-pppoe(8), adsl-setup(8), adsl-status(8), pppoe-server(8), pppoe-relay(8)
++pppd(8), pppoe(8), pppoe-sniff(8), pppoe-relay(8), /usr/share/doc/pppoe/README.Debian
+ 
+diff -Nru rp-pppoe-3.5.orig/man/pppoe.8 rp-pppoe-3.5/man/pppoe.8
+--- rp-pppoe-3.5.orig/man/pppoe.8      2002-07-08 17:38:24.000000000 +0300
++++ rp-pppoe-3.5/man/pppoe.8   2004-10-05 19:06:26.000000000 +0300
+@@ -233,5 +233,4 @@
+ The \fBpppoe\fR home page is \fIhttp://www.roaringpenguin.com/pppoe/\fR.
+ 
+ .SH SEE ALSO
+-adsl-start(8), adsl-stop(8), adsl-connect(8), pppd(8), pppoe.conf(5), adsl-setup(8), adsl-status(8), pppoe-sniff(8), pppoe-server(8), pppoe-relay(8)
+-
++pppd(8), pppoe-sniff(8), pppoe-server(8), pppoe-relay(8), /usr/share/doc/pppoe/README.Debian
+diff -Nru rp-pppoe-3.5.orig/src/Makefile.in rp-pppoe-3.5/src/Makefile.in
+--- rp-pppoe-3.5.orig/src/Makefile.in  2002-07-08 17:38:24.000000000 +0300
++++ rp-pppoe-3.5/src/Makefile.in       2004-10-05 19:06:26.000000000 +0300
+@@ -79,7 +79,7 @@
+       @CC@ -o pppoe-relay relay.o if.o debug.o common.o
+ 
+ pppoe.o: pppoe.c pppoe.h
+-      @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o pppoe.o pppoe.c
++      @CC@ $(CFLAGS) -DAUTO_IFUP '-DVERSION="$(VERSION)"' -c -o pppoe.o pppoe.c
+ 
+ discovery.o: discovery.c pppoe.h
+       @CC@ $(CFLAGS) '-DVERSION="$(VERSION)"' -c -o discovery.o discovery.c
+diff -Nru rp-pppoe-3.5.orig/src/pppoe.c rp-pppoe-3.5/src/pppoe.c
+--- rp-pppoe-3.5.orig/src/pppoe.c      2002-07-08 17:38:24.000000000 +0300
++++ rp-pppoe-3.5/src/pppoe.c   2004-10-05 19:08:49.000000000 +0300
+@@ -67,6 +67,48 @@
+                                  USED FOR STRESS-TESTING ONLY.  DO NOT
+                                  USE THE -F OPTION AGAINST A REAL ISP */
+ 
++#ifdef AUTO_IFUP
++/* for interface activation, based on stripped down source source of ifconfig*/
++#include <linux/if.h>
++/*#include <sys/socket.h> */
++#include <sys/types.h>
++#include <sys/socket.h>
++#include "config.h"
++int skfd = -1;                        /* generic raw socket desc.     */
++int sockets_open(int family)
++{
++  int sfd = -1;
++  sfd = socket(AF_INET, SOCK_DGRAM, 0);
++  return sfd;
++}
++/* Like strncpy but make sure the resulting string is always 0 terminated.
++ * Ripped from util.c (net-tools package) */  
++char *safe_strncpy(char *dst, const char *src, size_t size)
++{   
++    dst[size-1] = '\0';
++    return strncpy(dst,src,size-1);   
++}
++/* Set a certain interface flag. Ripped from ifconfig.c */
++static int set_flag(char *ifname, short flag)
++{
++    struct ifreq ifr;
++
++    safe_strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
++    if (ioctl(skfd, SIOCGIFFLAGS, &ifr) < 0) {
++      fprintf(stderr, "%s: unknown interface: %s\n", 
++              ifname, strerror(errno));
++      return (-1);
++    }
++    safe_strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
++    ifr.ifr_flags |= flag;
++    if (ioctl(skfd, SIOCSIFFLAGS, &ifr) < 0) {
++      perror("SIOCSIFFLAGS");
++      return -1;
++    }
++    return (0);
++}
++#endif
++
+ PPPoEConnection *Connection = NULL; /* Must be global -- used
+                                      in signal handler */
+ /***********************************************************************
+@@ -474,11 +516,13 @@
+           break;
+ 
+       case 'p':
++        if (getuid() == 0) {
+           pidfile = fopen(optarg, "w");
+           if (pidfile) {
+               fprintf(pidfile, "%lu\n", (unsigned long) getpid());
+               fclose(pidfile);
+           }
++        }
+           break;
+       case 'S':
+           SET_STRING(conn.serviceName, optarg);
+@@ -493,6 +537,7 @@
+           conn.useHostUniq = 1;
+           break;
+       case 'D':
++        if (getuid() == 0) {
+           conn.debugFile = fopen(optarg, "w");
+           if (!conn.debugFile) {
+               fprintf(stderr, "Could not open %s: %s\n",
+@@ -501,6 +546,7 @@
+           }
+           fprintf(conn.debugFile, "rp-pppoe-%s\n", VERSION);
+           fflush(conn.debugFile);
++        }
+           break;
+       case 'T':
+           optInactivityTimeout = (int) strtol(optarg, NULL, 10);
+@@ -546,6 +592,16 @@
+ #endif
+     }
+ 
++#ifdef AUTO_IFUP    
++    /* Create a channel to the NET kernel. */
++    if ((skfd = sockets_open(0)) < 0) {
++      perror("socket");
++      exit(1);
++    }
++
++    set_flag(conn.ifName, (IFF_UP | IFF_RUNNING));
++#endif
++
+     /* Set signal handlers: send PADT on HUP; ignore TERM and INT */
+     if (!conn.printACNames) {
+       signal(SIGTERM, SIG_IGN);
diff --git a/net-dialup/rp-pppoe/rp-pppoe-3.5-r2.ebuild b/net-dialup/rp-pppoe/rp-pppoe-3.5-r2.ebuild
new file mode 100644 (file)
index 0000000..67a8c24
--- /dev/null
@@ -0,0 +1,63 @@
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dialup/rp-pppoe/rp-pppoe-3.5-r2.ebuild,v 1.1 2004/10/07 14:57:54 lanius Exp $
+
+inherit eutils
+
+DESCRIPTION="A user-mode PPPoE client and server suite for Linux"
+SRC_URI="http://www.roaringpenguin.com/pppoe/${P}.tar.gz"
+HOMEPAGE="http://www.roaringpenguin.com/"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~sparc x86"
+IUSE="X"
+
+DEPEND=">=net-dialup/ppp-2.4.1
+       X? ( tcltk? (   virtual/x11
+                       dev-lang/tcl
+                       dev-lang/tk ) )"
+
+src_unpack() {
+       unpack ${A} || die
+       cd ${S} || die
+
+       # Patch to enable integration of adsl-start and adsl-stop with
+       # net.eth0 so that the pidfile can be found reliably per interface
+       epatch ${FILESDIR}/rp-pppoe-3.5-pidfile.patch
+
+       epatch ${FILESDIR}/rp-pppoe-3.5-dsa-557.patch
+}
+
+src_compile() {
+       addpredict /dev/ppp
+
+       # sanbdox violation workaround
+       cd ${S}/src
+       sed -i -e 's/modprobe/#modprobe/' configure || die "sed failed"
+       econf || die "econf failed"
+       emake || die "emake failed"
+
+       if use X && use tcltk; then
+               make -C ${S}/gui || die "gui make failed"
+       fi
+}
+
+src_install () {
+       cd ${S}/src
+       make RPM_INSTALL_ROOT=${D} docdir=/usr/share/doc/${PF} install \
+               || die "install failed"
+       prepalldocs
+
+       if use X && use tcltk; then
+               make -C ${S}/gui install RPM_INSTALL_ROOT=${D} \
+               datadir=/usr/share/doc/${PF}/ || die "gui install failed"
+               dosym /usr/share/doc/${PF}/tkpppoe /usr/share/tkpppoe
+       fi
+
+       exeinto /etc/init.d ; newexe ${FILESDIR}/rp-pppoe.rc rp-pppoe
+}
+
+pkg_postinst() {
+       einfo "Use adsl-setup to configure your dialup connection"
+}