From 81e2e7dd402b7cae4e2591bd07b958948b7e335b Mon Sep 17 00:00:00 2001 From: Sam James Date: Mon, 12 Jun 2023 11:50:40 +0100 Subject: [PATCH] net-dialup/ppp: backport radiusclient.conf parsing fix Closes: https://bugs.gentoo.org/908396 Signed-off-by: Sam James --- .../ppp-2.5.0-radiusclient.conf-parsing.patch | 48 +++++++ net-dialup/ppp/ppp-2.5.0-r4.ebuild | 119 ++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 net-dialup/ppp/files/ppp-2.5.0-radiusclient.conf-parsing.patch create mode 100644 net-dialup/ppp/ppp-2.5.0-r4.ebuild diff --git a/net-dialup/ppp/files/ppp-2.5.0-radiusclient.conf-parsing.patch b/net-dialup/ppp/files/ppp-2.5.0-radiusclient.conf-parsing.patch new file mode 100644 index 0000000000000..9916f766c7af8 --- /dev/null +++ b/net-dialup/ppp/files/ppp-2.5.0-radiusclient.conf-parsing.patch @@ -0,0 +1,48 @@ +https://github.com/ppp-project/ppp/issues/411 +https://github.com/ppp-project/ppp/commit/7f89208b860ea0c41636410bfdb6a609b2772f47 +https://bugs.gentoo.org/908396 + +From 7f89208b860ea0c41636410bfdb6a609b2772f47 Mon Sep 17 00:00:00 2001 +From: Eivind Naess +Date: Sun, 23 Apr 2023 11:37:01 -0700 +Subject: [PATCH] Closes #411, Fixing up parsing in radiusclient.conf + +Adding curly braces to fix the code. + +Signed-off-by: Eivind Naess +--- a/pppd/plugins/radius/config.c ++++ b/pppd/plugins/radius/config.c +@@ -235,24 +235,28 @@ int rc_read_config(char *filename) + + switch (option->type) { + case OT_STR: +- if (set_option_str(filename, line, option, p) < 0) ++ if (set_option_str(filename, line, option, p) < 0) { + fclose(configfd); + return (-1); ++ } + break; + case OT_INT: +- if (set_option_int(filename, line, option, p) < 0) ++ if (set_option_int(filename, line, option, p) < 0) { + fclose(configfd); + return (-1); ++ } + break; + case OT_SRV: +- if (set_option_srv(filename, line, option, p) < 0) ++ if (set_option_srv(filename, line, option, p) < 0) { + fclose(configfd); + return (-1); ++ } + break; + case OT_AUO: +- if (set_option_auo(filename, line, option, p) < 0) ++ if (set_option_auo(filename, line, option, p) < 0) { + fclose(configfd); + return (-1); ++ } + break; + default: + fatal("rc_read_config: impossible case branch!"); + diff --git a/net-dialup/ppp/ppp-2.5.0-r4.ebuild b/net-dialup/ppp/ppp-2.5.0-r4.ebuild new file mode 100644 index 0000000000000..70a453504c7b0 --- /dev/null +++ b/net-dialup/ppp/ppp-2.5.0-r4.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit linux-info pam tmpfiles + +DESCRIPTION="Point-to-Point Protocol (PPP)" +HOMEPAGE="https://ppp.samba.org/" +SRC_URI=" + https://download.samba.org/pub/ppp/${P}.tar.gz + https://raw.githubusercontent.com/ppp-project/ppp/${P}/contrib/pppgetpass/pppgetpass.8 +" + +LICENSE="BSD GPL-2" +SLOT="0/${PV}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86" +IUSE="activefilter atm gtk pam systemd" + +DEPEND=" + dev-libs/openssl:0= + virtual/libcrypt:= + activefilter? ( net-libs/libpcap ) + atm? ( net-dialup/linux-atm ) + gtk? ( x11-libs/gtk+:2 ) + pam? ( sys-libs/pam ) + systemd? ( sys-apps/systemd ) +" +RDEPEND=" + ${DEPEND} + !