summaryrefslogtreecommitdiff
path: root/net-dialup/ppp/files/ppp-2.5.0-radiusclient.conf-parsing.patch
blob: 9916f766c7af884abb43fe968bbb6ba24fb8ac12 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 <eivnaes@yahoo.com>
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 <eivnaes@yahoo.com>
--- 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!");