[package] update ppp to v2.4.4 (#5102)
[openwrt/svn-archive/archive.git] / package / ppp / patches / 204-radius_config.patch
1 diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/config.c ppp-2.4.4/pppd/plugins/radius/config.c
2 --- ppp-2.4.4.orig/pppd/plugins/radius/config.c 2004-11-14 02:26:26.000000000 -0500
3 +++ ppp-2.4.4/pppd/plugins/radius/config.c 2009-05-07 19:31:14.000000000 -0400
4 @@ -369,31 +369,37 @@
5 }
6 #endif
7
8 +#if 0
9 if (rc_conf_int("login_tries") <= 0)
10 {
11 error("%s: login_tries <= 0 is illegal", filename);
12 return (-1);
13 }
14 +#endif
15 if (rc_conf_str("seqfile") == NULL)
16 {
17 error("%s: seqfile not specified", filename);
18 return (-1);
19 }
20 +#if 0
21 if (rc_conf_int("login_timeout") <= 0)
22 {
23 error("%s: login_timeout <= 0 is illegal", filename);
24 return (-1);
25 }
26 +#endif
27 if (rc_conf_str("mapfile") == NULL)
28 {
29 error("%s: mapfile not specified", filename);
30 return (-1);
31 }
32 +#if 0
33 if (rc_conf_str("nologin") == NULL)
34 {
35 error("%s: nologin not specified", filename);
36 return (-1);
37 }
38 +#endif
39
40 return 0;
41 }
42 diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/options.h ppp-2.4.4/pppd/plugins/radius/options.h
43 --- ppp-2.4.4.orig/pppd/plugins/radius/options.h 2004-11-14 02:26:26.000000000 -0500
44 +++ ppp-2.4.4/pppd/plugins/radius/options.h 2009-05-07 19:31:14.000000000 -0400
45 @@ -31,24 +31,21 @@
46 static SERVER acctserver = {0};
47 static SERVER authserver = {0};
48
49 -int default_tries = 4;
50 -int default_timeout = 60;
51 -
52 static OPTION config_options[] = {
53 /* internally used options */
54 {"config_file", OT_STR, ST_UNDEF, NULL},
55 /* General options */
56 {"auth_order", OT_AUO, ST_UNDEF, NULL},
57 -{"login_tries", OT_INT, ST_UNDEF, &default_tries},
58 -{"login_timeout", OT_INT, ST_UNDEF, &default_timeout},
59 -{"nologin", OT_STR, ST_UNDEF, "/etc/nologin"},
60 -{"issue", OT_STR, ST_UNDEF, "/etc/radiusclient/issue"},
61 +{"login_tries", OT_INT, ST_UNDEF, NULL},
62 +{"login_timeout", OT_INT, ST_UNDEF, NULL},
63 +{"nologin", OT_STR, ST_UNDEF, NULL},
64 +{"issue", OT_STR, ST_UNDEF, NULL},
65 /* RADIUS specific options */
66 {"authserver", OT_SRV, ST_UNDEF, &authserver},
67 {"acctserver", OT_SRV, ST_UNDEF, &acctserver},
68 {"servers", OT_STR, ST_UNDEF, NULL},
69 {"dictionary", OT_STR, ST_UNDEF, NULL},
70 -{"login_radius", OT_STR, ST_UNDEF, "/usr/sbin/login.radius"},
71 +{"login_radius", OT_STR, ST_UNDEF, NULL},
72 {"seqfile", OT_STR, ST_UNDEF, NULL},
73 {"mapfile", OT_STR, ST_UNDEF, NULL},
74 {"default_realm", OT_STR, ST_UNDEF, NULL},
75 diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/config.c ppp-2.4.4/pppd/plugins/radius/config.c
76 --- ppp-2.4.4.orig/pppd/plugins/radius/config.c 2004-11-14 02:26:26.000000000 -0500
77 +++ ppp-2.4.4/pppd/plugins/radius/config.c 2009-05-07 19:31:14.000000000 -0400
78 @@ -369,31 +369,37 @@
79 }
80 #endif
81
82 +#if 0
83 if (rc_conf_int("login_tries") <= 0)
84 {
85 error("%s: login_tries <= 0 is illegal", filename);
86 return (-1);
87 }
88 +#endif
89 if (rc_conf_str("seqfile") == NULL)
90 {
91 error("%s: seqfile not specified", filename);
92 return (-1);
93 }
94 +#if 0
95 if (rc_conf_int("login_timeout") <= 0)
96 {
97 error("%s: login_timeout <= 0 is illegal", filename);
98 return (-1);
99 }
100 +#endif
101 if (rc_conf_str("mapfile") == NULL)
102 {
103 error("%s: mapfile not specified", filename);
104 return (-1);
105 }
106 +#if 0
107 if (rc_conf_str("nologin") == NULL)
108 {
109 error("%s: nologin not specified", filename);
110 return (-1);
111 }
112 +#endif
113
114 return 0;
115 }
116 diff -Naur ppp-2.4.4.orig/pppd/plugins/radius/options.h ppp-2.4.4/pppd/plugins/radius/options.h
117 --- ppp-2.4.4.orig/pppd/plugins/radius/options.h 2004-11-14 02:26:26.000000000 -0500
118 +++ ppp-2.4.4/pppd/plugins/radius/options.h 2009-05-07 19:31:14.000000000 -0400
119 @@ -31,24 +31,21 @@
120 static SERVER acctserver = {0};
121 static SERVER authserver = {0};
122
123 -int default_tries = 4;
124 -int default_timeout = 60;
125 -
126 static OPTION config_options[] = {
127 /* internally used options */
128 {"config_file", OT_STR, ST_UNDEF, NULL},
129 /* General options */
130 {"auth_order", OT_AUO, ST_UNDEF, NULL},
131 -{"login_tries", OT_INT, ST_UNDEF, &default_tries},
132 -{"login_timeout", OT_INT, ST_UNDEF, &default_timeout},
133 -{"nologin", OT_STR, ST_UNDEF, "/etc/nologin"},
134 -{"issue", OT_STR, ST_UNDEF, "/etc/radiusclient/issue"},
135 +{"login_tries", OT_INT, ST_UNDEF, NULL},
136 +{"login_timeout", OT_INT, ST_UNDEF, NULL},
137 +{"nologin", OT_STR, ST_UNDEF, NULL},
138 +{"issue", OT_STR, ST_UNDEF, NULL},
139 /* RADIUS specific options */
140 {"authserver", OT_SRV, ST_UNDEF, &authserver},
141 {"acctserver", OT_SRV, ST_UNDEF, &acctserver},
142 {"servers", OT_STR, ST_UNDEF, NULL},
143 {"dictionary", OT_STR, ST_UNDEF, NULL},
144 -{"login_radius", OT_STR, ST_UNDEF, "/usr/sbin/login.radius"},
145 +{"login_radius", OT_STR, ST_UNDEF, NULL},
146 {"seqfile", OT_STR, ST_UNDEF, NULL},
147 {"mapfile", OT_STR, ST_UNDEF, NULL},
148 {"default_realm", OT_STR, ST_UNDEF, NULL},