From 0c288beeb7bd9b697e4c612610de03b00e7654a5 Mon Sep 17 00:00:00 2001 From: Michal Sekletar Date: Fri, 22 Mar 2013 15:24:19 +0100 Subject: [PATCH] radius-plugin: ignore unknown directives We shouldn't be so strict when parsing radius client configuration file. Instead of exiting when encountering directive we don't recognize and don't care about, we should just warn and continue parsing. Resolves RHBZ #906913 --- ppp-2.4.5-radius-config.patch | 14 ++++++++++++++ ppp.spec | 8 +++++++- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ppp-2.4.5-radius-config.patch diff --git a/ppp-2.4.5-radius-config.patch b/ppp-2.4.5-radius-config.patch new file mode 100644 index 0000000..40ef6fc --- /dev/null +++ b/ppp-2.4.5-radius-config.patch @@ -0,0 +1,14 @@ +diff -up ppp-2.4.5/pppd/plugins/radius/config.c.radius ppp-2.4.5/pppd/plugins/radius/config.c +--- ppp-2.4.5/pppd/plugins/radius/config.c.radius 2009-11-16 23:26:07.000000000 +0100 ++++ ppp-2.4.5/pppd/plugins/radius/config.c 2013-03-22 16:18:58.374665717 +0100 +@@ -216,8 +216,8 @@ int rc_read_config(char *filename) + p[pos] = '\0'; + + if ((option = find_option(p, OT_ANY)) == NULL) { +- error("%s: line %d: unrecognized keyword: %s", filename, line, p); +- return (-1); ++ warn("%s: line %d: unrecognized keyword: %s", filename, line, p); ++ continue; + } + + if (option->status != ST_UNDEF) { diff --git a/ppp.spec b/ppp.spec index 5373315..da373b3 100644 --- a/ppp.spec +++ b/ppp.spec @@ -1,7 +1,7 @@ Summary: The Point-to-Point Protocol daemon Name: ppp Version: 2.4.5 -Release: 29%{?dist} +Release: 30%{?dist} License: BSD and LGPLv2+ and GPLv2+ and Public Domain Group: System Environment/Daemons URL: http://www.samba.org/ppp @@ -33,6 +33,7 @@ Patch29: ppp-2.4.5-man.patch Patch30: ppp-2.4.5-eth.patch Patch31: ppp-2.4.5-lock.patch Patch32: ppp-2.4.5-l2tp-multilink.patch +Patch33: ppp-2.4.5-radius-config.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: pam-devel, libpcap-devel, openssl-devel @@ -84,6 +85,7 @@ This package contains the header files for building plugins for ppp. # fixes bz#708260 - SELinux is preventing access on the file LCK..ttyUSB3 %patch31 -p1 -b .lock %patch32 -p1 -b .l2tp-multilink +%patch33 -p1 -b .radius rm -f scripts/*.local rm -f scripts/*.change_resolv_conf @@ -161,6 +163,10 @@ getent group dip >/dev/null 2>&1 || groupadd -r -g 40 dip >/dev/null 2>&1 || : %doc PLUGINS %changelog +* Wed May 29 2013 Michal Sekletar - 2.4.5-30 +- make radius plugin config parser less strict +- resolves : #906913 + * Wed Mar 20 2013 Michal Sekletar - 2.4.5-29 - Add creation of dip system group