Compare commits

...

7 Commits
master ... f13

Author SHA1 Message Date
Jiri Skala 082acf628c rebuild with fd_leak patch of F14 (#664123) 2011-06-06 15:13:37 +02:00
Jiri Skala 6259d0c019 * Thu Aug 05 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-10
- fixes #572174 - pppol2tp plugins not installed
- removed proprietary if_pppol2tp.h
2010-08-05 16:58:55 +02:00
Fedora Release Engineering 88664fef5d dist-git conversion 2010-07-29 09:42:57 +00:00
Jiri Skala dfd77ee005 - fixes #613717 - Missing line in example script ip-up.local.add 2010-07-13 12:12:27 +00:00
Jiri Skala ff67060abd - increased release number to keep upgrade path 2010-04-13 06:39:10 +00:00
Jiri Skala 5ce3f857d4 - added pppoe-discovery(8) 2010-04-07 14:31:09 +00:00
Jesse Keating 66d26a6153 Initialize branch F-13 for ppp 2010-02-17 02:51:25 +00:00
7 changed files with 260 additions and 22 deletions

View File

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: ppp
# $Id: Makefile,v 1.2 2007/10/15 19:18:07 notting Exp $
NAME := ppp
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View File

@ -513,3 +513,103 @@ diff -up ppp-2.4.4/pppd/utils.c.fd_leak ppp-2.4.4/pppd/utils.c
if (fd < 0) {
error("Couldn't reopen lock file %s: %m", lock_file);
lock_file[0] = 0;
diff -up ppp-2.4.5/pppd/plugins/pppoatm/pppoatm.c.test ppp-2.4.5/pppd/plugins/pppoatm/pppoatm.c
--- ppp-2.4.5/pppd/plugins/pppoatm/pppoatm.c.test 2010-11-16 09:56:56.083707000 +0100
+++ ppp-2.4.5/pppd/plugins/pppoatm/pppoatm.c 2010-11-16 09:56:59.382707272 +0100
@@ -137,7 +137,11 @@ static int connect_pppoatm(void)
if (!device_got_set)
no_device_given_pppoatm();
+#ifdef SOCK_CLOEXEC
+ fd = socket(AF_ATMPVC, SOCK_DGRAM | SOCK_CLOEXEC, 0);
+#else
fd = socket(AF_ATMPVC, SOCK_DGRAM, 0);
+#endif
if (fd < 0)
fatal("failed to create socket: %m");
memset(&qos, 0, sizeof qos);
diff -up ppp-2.4.5/pppd/plugins/pppol2tp/openl2tp.c.test ppp-2.4.5/pppd/plugins/pppol2tp/openl2tp.c
--- ppp-2.4.5/pppd/plugins/pppol2tp/openl2tp.c.test 2010-11-16 09:58:17.499711288 +0100
+++ ppp-2.4.5/pppd/plugins/pppol2tp/openl2tp.c 2010-11-16 10:00:15.791706960 +0100
@@ -83,7 +83,11 @@ static int openl2tp_client_create(void)
int result;
if (openl2tp_fd < 0) {
+#ifdef SOCK_CLOEXEC
+ openl2tp_fd = socket(PF_UNIX, SOCK_DGRAM | SOCK_CLOEXEC, 0);
+#else
openl2tp_fd = socket(PF_UNIX, SOCK_DGRAM, 0);
+#endif
if (openl2tp_fd < 0) {
error("openl2tp connection create: %m");
return -ENOTCONN;
diff -up ppp-2.4.5/pppd/plugins/pppol2tp/pppol2tp.c.test ppp-2.4.5/pppd/plugins/pppol2tp/pppol2tp.c
--- ppp-2.4.5/pppd/plugins/pppol2tp/pppol2tp.c.test 2010-11-16 09:57:44.448709467 +0100
+++ ppp-2.4.5/pppd/plugins/pppol2tp/pppol2tp.c 2010-11-16 09:59:32.877707001 +0100
@@ -208,7 +208,11 @@ static void send_config_pppol2tp(int mtu
struct ifreq ifr;
int fd;
+#ifdef SOCK_CLOEXEC
+ fd = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, 0);
+#else
fd = socket(AF_INET, SOCK_DGRAM, 0);
+#endif
if (fd >= 0) {
memset (&ifr, '\0', sizeof (ifr));
strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/if.c.test ppp-2.4.5/pppd/plugins/rp-pppoe/if.c
--- ppp-2.4.5/pppd/plugins/rp-pppoe/if.c.test 2009-11-16 23:26:07.000000000 +0100
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/if.c 2010-11-16 09:54:03.973706239 +0100
@@ -116,6 +116,10 @@ openInterface(char const *ifname, UINT16
stype = SOCK_PACKET;
#endif
+#ifdef SOCK_CLOEXEC
+ stype |= SOCK_CLOEXEC;
+#endif
+
if ((fd = socket(domain, stype, htons(type))) < 0) {
/* Give a more helpful message for the common error case */
if (errno == EPERM) {
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/plugin.c.test ppp-2.4.5/pppd/plugins/rp-pppoe/plugin.c
--- ppp-2.4.5/pppd/plugins/rp-pppoe/plugin.c.test 2009-11-16 23:26:07.000000000 +0100
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/plugin.c 2010-11-16 09:40:23.355707001 +0100
@@ -158,7 +158,11 @@ PPPOEConnectDevice(void)
ppp_session_number = ntohs(conn->session);
/* Make the session socket */
+#ifdef SOCK_CLOEXEC
+ conn->sessionSocket = socket(AF_PPPOX, SOCK_STREAM | SOCK_CLOEXEC, PX_PROTO_OE);
+#else
conn->sessionSocket = socket(AF_PPPOX, SOCK_STREAM, PX_PROTO_OE);
+#endif
if (conn->sessionSocket < 0) {
error("Failed to create PPPoE socket: %m");
goto errout;
@@ -289,7 +293,11 @@ PPPoEDevnameHook(char *cmd, char **argv,
}
/* Open a socket */
+#ifdef SOCK_CLOEXEC
+ if ((fd = socket(PF_PACKET, SOCK_RAW | SOCK_CLOEXEC, 0)) < 0) {
+#else
if ((fd = socket(PF_PACKET, SOCK_RAW, 0)) < 0) {
+#endif
r = 0;
}
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c.test ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c
--- ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c.test 2009-11-16 23:26:07.000000000 +0100
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.c 2010-11-16 09:55:08.726707003 +0100
@@ -121,6 +121,10 @@ openInterface(char const *ifname, UINT16
stype = SOCK_PACKET;
#endif
+#ifdef SOCK_CLOEXEC
+ stype |= SOCK_CLOEXEC;
+#endif
+
if ((fd = socket(domain, stype, htons(type))) < 0) {
/* Give a more helpful message for the common error case */
if (errno == EPERM) {

View File

@ -74,3 +74,16 @@
#else /* __STDC__ */
#define _PATH_PLUGIN "/usr/lib/pppd"
#endif /* __STDC__ */
--- ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux.lib64 2009-11-16 23:26:07.000000000 +0100
+++ ppp-2.4.5/pppd/plugins/pppol2tp/Makefile.linux 2010-08-05 16:33:53.964898629 +0200
@@ -6,8 +6,8 @@
#***********************************************************************
-DESTDIR = @DESTDIR@
-LIBDIR = $(DESTDIR)/lib/pppd/$(VERSION)
+DESTDIR = $(INSTROOT)@DESTDIR@
+LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(VERSION)
VERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)

109
ppp-2.4.5-manpg.patch Normal file
View File

@ -0,0 +1,109 @@
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux.manpg ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux
--- ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux.manpg 2010-04-07 14:47:48.211413928 +0200
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/Makefile.linux 2010-04-07 14:47:48.281414608 +0200
@@ -16,6 +16,7 @@
DESTDIR = $(INSTROOT)@DESTDIR@
BINDIR = $(DESTDIR)/sbin
+MANDIR = $(DESTDIR)/share/man/man8
LIBDIR = $(DESTDIR)/lib/$(shell gcc -print-multi-os-directory 2> /dev/null)/pppd/$(PPPDVERSION)
PPPDVERSION = $(shell awk -F '"' '/VERSION/ { print $$2; }' ../../patchlevel.h)
@@ -46,6 +47,7 @@ install: all
$(INSTALL) -c -m 4550 rp-pppoe.so $(LIBDIR)
$(INSTALL) -d -m 755 $(BINDIR)
$(INSTALL) -c -m 555 pppoe-discovery $(BINDIR)
+ $(INSTALL) -c -m 444 pppoe-discovery.8 $(MANDIR)
clean:
rm -f *.o *.so pppoe-discovery
diff -up ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.8.manpg ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.8
--- ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.8.manpg 2010-04-07 14:49:31.059416743 +0200
+++ ppp-2.4.5/pppd/plugins/rp-pppoe/pppoe-discovery.8 2010-04-07 14:50:11.008416347 +0200
@@ -0,0 +1,86 @@
+.\" pppoe-discovery.8 written by
+.\" Ben Hutchings <ben@decadentplace.org.uk>, based on pppoe.8.
+.\" Licenced under the GPL version 2 or later.
+.TH PPPOE-DISCOVERY 8
+.SH NAME
+pppoe\-discovery \- perform PPPoE discovery
+.SH SYNOPSIS
+.B pppoe\-discovery
+[
+.I options
+]
+.br
+.BR pppoe\-discovery " { " \-V " | " \-h " }"
+.SH DESCRIPTION
+.LP
+\fBpppoe\-discovery\fR performs the same discovery process as
+\fBpppoe\fR, but does not initiate a session.
+It sends a PADI packet and then prints the names of access
+concentrators in each PADO packet it receives.
+.SH OPTIONS
+.TP
+.BI \-I " interface"
+.RS
+The \fB\-I\fR option specifies the Ethernet interface to use.
+Under Linux, it is typically eth0 or eth1.
+The interface should be \(lqup\(rq before you start
+\fBpppoe\-discovery\fR, but should \fInot\fR be configured to have an
+IP address.
+The default interface is eth0.
+.RE
+.TP
+.BI \-D " file_name"
+.RS
+The \fB\-D\fR option causes every packet to be dumped to the specified
+\fIfile_name\fR.
+This is intended for debugging only.
+.RE
+.TP
+.B \-U
+.RS
+Causes \fBpppoe\-discovery\fR to use the Host-Uniq tag in its discovery
+packets.
+This lets you run multiple instances of \fBpppoe\-discovery\fR and/or
+\fBpppoe\fR without having their discovery packets interfere with one
+another.
+You must supply this option to \fIall\fR instances that you intend to
+run simultaneously.
+.RE
+.TP
+.BI \-S " service_name"
+.RS
+Specifies the desired service name.
+\fBpppoe\-discovery\fR will only accept access concentrators which can
+provide the specified service.
+In most cases, you should \fInot\fR specify this option.
+Use it only if you know that there are multiple access concentrators
+or know that you need a specific service name.
+.RE
+.TP
+.BI \-C " ac_name"
+.RS
+Specifies the desired access concentrator name.
+\fBpppoe\-discovery\fR will only accept the specified access
+concentrator.
+In most cases, you should \fInot\fR specify this option.
+Use it only if you know that there are multiple access concentrators.
+If both the \fB\-S\fR and \fB\-C\fR options are specified, they must
+\fIboth\fR match.
+.RE
+.TP
+.B \-A
+.RS
+This option is accepted for compatibility with \fBpppoe\fR, but has no
+effect.
+.RE
+.TP
+.BR \-V " | " \-h
+.RS
+Either of these options causes \fBpppoe\-discovery\fR to print its
+version number and usage information, then exit.
+.RE
+.SH AUTHORS
+\fBpppoe\-discovery\fR was written by Marco d'Itri <md@linux.it>,
+based on \fBpppoe\fR by David F. Skoll <dfs@roaringpenguin.com>.
+.SH SEE ALSO
+pppoe(8), pppoe-sniff(8)

View File

@ -0,0 +1,13 @@
diff -up ppp-2.4.5/scripts/ip-up.local.add.ppp_resolv ppp-2.4.5/scripts/ip-up.local.add
--- ppp-2.4.5/scripts/ip-up.local.add.ppp_resolv 2010-07-13 10:29:23.227943994 +0200
+++ ppp-2.4.5/scripts/ip-up.local.add 2010-07-13 10:32:27.729695487 +0200
@@ -18,6 +18,9 @@ if [ -n "$USEPEERDNS" -a -f /var/run/ppp
rscf=/var/run/ppp/resolv.new
grep domain /var/run/ppp/resolv.prev > $rscf
grep search /var/run/ppp/resolv.prev >> $rscf
+ if [ -f /var/run/ppp/resolv.conf ]; then
+ cat /var/run/ppp/resolv.conf >> $rscf
+ fi
change_resolv_conf $rscf
rm -f $rscf
else

View File

@ -1,7 +1,7 @@
Summary: The Point-to-Point Protocol daemon
Name: ppp
Version: 2.4.5
Release: 6%{?dist}
Release: 11%{?dist}
License: BSD and LGPLv2+ and GPLv2+ and Public Domain
Group: System Environment/Daemons
URL: http://www.samba.org/ppp
@ -26,6 +26,8 @@ Patch22: ppp-2.4.4-cbcp.patch
Patch23: ppp-2.4.2-dontwriteetc.patch
Patch24: ppp-2.4.4-fd_leak.patch
Patch25: ppp-2.4.5-var_run_ppp.patch
Patch26: ppp-2.4.5-manpg.patch
Patch27: ppp-2.4.5-ppp_resolv.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: pam-devel, libpcap-devel
@ -67,12 +69,17 @@ This package contains the header files for building plugins for ppp.
%patch23 -p1 -b .dontwriteetc
%patch24 -p1 -b .fd_leak
%patch25 -p1 -b .var_run_ppp
%patch26 -p1 -b .manpg
%patch27 -p1 -b .ppp_resolv
rm -f scripts/*.local
rm -f scripts/*.change_resolv_conf
rm -f scripts/*.usepeerdns-var_run_ppp_resolv
rm -f scripts/*.ppp_resolv
find . -type f -name "*.sample" | xargs rm -f
rm -f include/linux/if_pppol2tp.h
%build
#find . -name 'Makefile*' -print0 | xargs -0 perl -pi.no_strip -e "s: -s : :g"
RPM_OPT_FLAGS="$RPM_OPT_FLAGS -fPIC -Wall"
@ -114,6 +121,7 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man8/pppd-radattr.8*
%{_mandir}/man8/pppd-radius.8*
%{_mandir}/man8/pppstats.8*
%{_mandir}/man8/pppoe-discovery.8*
%{_libdir}/pppd
%dir /etc/ppp
%dir /var/run/ppp
@ -131,6 +139,22 @@ rm -rf $RPM_BUILD_ROOT
%doc PLUGINS
%changelog
* Mon Jun 06 2011 Jiri Skala <jskala@redhat.com> - 2.4.5-11
- rebuild with fd_leak patch of F14 (#664123)
* Thu Aug 05 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-10
- fixes #572174 - pppol2tp plugins not installed
- removed proprietary if_pppol2tp.h
* Tue Jul 13 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-9
- fixes #613717 - Missing line in example script ip-up.local.add
* Wed Apr 13 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-8
- increased release number to keep upgrade path
* Wed Apr 07 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-7
- added pppoe-discovery(8)
* Fri Feb 12 2010 Jiri Skala <jskala@redhat.com> - 2.4.5-6
- fixes #560014 - SELinux is preventing /usr/sbin/pppd "read write" access on pppd2.tdb