Sfoglia il codice sorgente

Import freeradius2

Also bump to version 2.2.5 and add myself as maintainer.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Daniel Golle 10 anni fa
parent
commit
0238c3c231

+ 14
- 0
net/freeradius2/Config.in Vedi File

@@ -0,0 +1,14 @@
1
+# FreeRADIUS avanced configuration
2
+
3
+choice
4
+	prompt "SSL library"
5
+	default FREERADIUS_OPENSSL
6
+	depends on PACKAGE_freeradius2-common
7
+
8
+config FREERADIUS_NOSSL
9
+	bool "No SSL support"
10
+
11
+config FREERADIUS_OPENSSL
12
+	bool "OpenSSL"
13
+
14
+endchoice

+ 632
- 0
net/freeradius2/Makefile Vedi File

@@ -0,0 +1,632 @@
1
+#
2
+# Copyright (C) 2008-2014 OpenWrt.org
3
+#
4
+# This is free software, licensed under the GNU General Public License v2.
5
+# See /LICENSE for more information.
6
+#
7
+
8
+include $(TOPDIR)/rules.mk
9
+
10
+PKG_NAME:=freeradius2
11
+PKG_VERSION:=2.2.5
12
+PKG_RELEASE:=1
13
+
14
+PKG_SOURCE:=freeradius-server-$(PKG_VERSION).tar.bz2
15
+PKG_SOURCE_URL:=ftp://ftp.freeradius.org/pub/freeradius/
16
+PKG_MD5SUM:=40535bace507d7a3134c3d858f3cbc5a
17
+PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>
18
+
19
+PKG_BUILD_DIR:=$(BUILD_DIR)/freeradius-server-$(PKG_VERSION)
20
+PKG_FIXUP:=autoreconf
21
+
22
+PKG_CONFIG_DEPENDS := \
23
+  FREERADIUS_OPENSSL \
24
+  FREERADIUS_NOSSL
25
+
26
+include $(INCLUDE_DIR)/package.mk
27
+
28
+define Package/freeradius2/config
29
+  source "$(SOURCE)/Config.in"
30
+endef
31
+
32
+define Package/freeradius2/Default
33
+  SECTION:=net
34
+  CATEGORY:=Network
35
+  URL:=http://freeradius.org/
36
+  SUBMENU:=FreeRADIUS (version 2)
37
+endef
38
+
39
+define Package/freeradius2
40
+  $(call Package/freeradius2/Default)
41
+  DEPENDS:=+libltdl +libreadline +freeradius2-common
42
+  TITLE:=A flexible RADIUS server (version 2)
43
+endef
44
+
45
+define Package/freeradius2/conffiles
46
+/etc/freeradius2/clients.conf
47
+/etc/freeradius2/radiusd.conf
48
+/etc/freeradius2/sites/default
49
+endef
50
+
51
+define Package/freeradius2-democerts
52
+  $(call Package/freeradius2/Default)
53
+  DEPENDS:=freeradius2
54
+  TITLE:=Demo certificates to test the server
55
+endef
56
+
57
+define Package/freeradius2-common
58
+  $(call Package/freeradius2/Default)
59
+  TITLE:=common files
60
+  DEPENDS:=+libpthread +FREERADIUS_OPENSSL:libopenssl
61
+endef
62
+
63
+define Package/freeradius2-mod-chap
64
+  $(call Package/freeradius2/Default)
65
+  DEPENDS:=freeradius2
66
+  TITLE:=CHAP module
67
+endef
68
+
69
+define Package/freeradius2-mod-chap/conffiles
70
+/etc/freeradius2/modules/chap
71
+endef
72
+
73
+define Package/freeradius2-mod-detail
74
+  $(call Package/freeradius2/Default)
75
+  DEPENDS:=freeradius2
76
+  TITLE:=Detailed accounting module
77
+endef
78
+
79
+define Package/freeradius2-mod-detail/conffiles
80
+/etc/freeradius2/modules/detail
81
+endef
82
+
83
+define Package/freeradius2-mod-eap
84
+  $(call Package/freeradius2/Default)
85
+  DEPENDS:=freeradius2
86
+  TITLE:=Base EAP module
87
+endef
88
+
89
+define Package/freeradius2-mod-eap/conffiles
90
+/etc/freeradius2/eap.conf
91
+endef
92
+
93
+define Package/freeradius2-mod-eap-gtc
94
+  $(call Package/freeradius2/Default)
95
+  DEPENDS:=freeradius2-mod-eap
96
+  TITLE:=EAP/GTC module
97
+endef
98
+
99
+define Package/freeradius2-mod-eap-md5
100
+  $(call Package/freeradius2/Default)
101
+  DEPENDS:=freeradius2-mod-eap
102
+  TITLE:=EAP/MD5 module
103
+endef
104
+
105
+define Package/freeradius2-mod-eap-mschapv2
106
+  $(call Package/freeradius2/Default)
107
+  DEPENDS:=freeradius2-mod-eap +freeradius2-mod-mschap
108
+  TITLE:=EAP/MS-CHAPv2 module
109
+endef
110
+
111
+define Package/freeradius2-mod-eap-peap
112
+  $(call Package/freeradius2/Default)
113
+  DEPENDS:=freeradius2-mod-eap @FREERADIUS_OPENSSL
114
+  TITLE:=EAP/PEAP module
115
+endef
116
+
117
+define Package/freeradius2-mod-eap-tls
118
+  $(call Package/freeradius2/Default)
119
+  DEPENDS:=freeradius2-mod-eap @FREERADIUS_OPENSSL
120
+  TITLE:=EAP/TLS module
121
+endef
122
+
123
+define Package/freeradius2-mod-eap-ttls
124
+  $(call Package/freeradius2/Default)
125
+  DEPENDS:=freeradius2-mod-eap-tls
126
+  TITLE:=EAP/TTLS module
127
+endef
128
+
129
+define Package/freeradius2-mod-exec
130
+  $(call Package/freeradius2/Default)
131
+  DEPENDS:=freeradius2
132
+  TITLE:=EXEC module
133
+endef
134
+
135
+define Package/freeradius2-mod-exec/conffiles
136
+/etc/freeradius2/modules/exec
137
+endef
138
+
139
+define Package/freeradius2-mod-expiration
140
+  $(call Package/freeradius2/Default)
141
+  DEPENDS:=freeradius2
142
+  TITLE:=Expiration module
143
+endef
144
+
145
+define Package/freeradius2-mod-expiration/conffiles
146
+/etc/freeradius2/modules/expiration
147
+endef
148
+
149
+define Package/freeradius2-mod-always
150
+  $(call Package/freeradius2/Default)
151
+  DEPENDS:=freeradius2
152
+  TITLE:=Always module
153
+endef
154
+
155
+define Package/freeradius2-mod-always/conffiles
156
+/etc/freeradius2/modules/always
157
+endef
158
+
159
+define Package/freeradius2-mod-expr
160
+  $(call Package/freeradius2/Default)
161
+  DEPENDS:=freeradius2
162
+  TITLE:=EXPR module
163
+endef
164
+
165
+define Package/freeradius2-mod-expr/conffiles
166
+/etc/freeradius2/modules/expr
167
+endef
168
+
169
+define Package/freeradius2-mod-attr-filter
170
+  $(call Package/freeradius2/Default)
171
+  DEPENDS:=freeradius2
172
+  TITLE:=ATTR filter module
173
+endef
174
+
175
+define Package/freeradius2-mod-attr-filter/conffiles
176
+/etc/freeradius2/modules/attr_filter
177
+/etc/freeradius2/attrs
178
+/etc/freeradius2/attrs.access_reject
179
+/etc/freeradius2/attrs.accounting_response
180
+/etc/freeradius2/attrs.pre-proxy
181
+endef
182
+
183
+define Package/freeradius2-mod-attr-rewrite
184
+  $(call Package/freeradius2/Default)
185
+  DEPENDS:=freeradius2
186
+  TITLE:=ATTR rewrite module
187
+endef
188
+
189
+define Package/freeradius2-mod-attr-rewrite/conffiles
190
+/etc/freeradius2/modules/attr_rewrite
191
+endef
192
+
193
+define Package/freeradius2-mod-files
194
+  $(call Package/freeradius2/Default)
195
+  DEPENDS:=freeradius2
196
+  TITLE:=Module using local files for authorization
197
+endef
198
+
199
+define Package/freeradius2-mod-files/conffiles
200
+/etc/freeradius2/acct_users
201
+/etc/freeradius2/preproxy_users
202
+/etc/freeradius2/users
203
+/etc/freeradius2/modules/files
204
+endef
205
+
206
+define Package/freeradius2-mod-passwd
207
+  $(call Package/freeradius2/Default)
208
+  DEPENDS:=freeradius2
209
+  TITLE:=Rlm passwd module
210
+endef
211
+
212
+define Package/freeradius2-mod-passwd/conffiles
213
+/etc/freeradius2/modules/passwd
214
+endef
215
+
216
+define Package/freeradius2-mod-ldap
217
+  $(call Package/freeradius2/Default)
218
+  DEPENDS:=freeradius2 +PACKAGE_freeradius2-mod-ldap:libopenldap
219
+  TITLE:=LDAP module
220
+endef
221
+
222
+define Package/freeradius2-mod-ldap/conffiles
223
+/etc/freeradius2/ldap.attrmap
224
+/etc/freeradius2/modules/ldap
225
+endef
226
+
227
+define Package/freeradius2-mod-logintime
228
+  $(call Package/freeradius2/Default)
229
+  DEPENDS:=freeradius2
230
+  TITLE:=Logintime module
231
+endef
232
+
233
+define Package/freeradius2-mod-logintime/conffiles
234
+/etc/freeradius2/modules/logintime
235
+endef
236
+
237
+define Package/freeradius2-mod-mschap
238
+  $(call Package/freeradius2/Default)
239
+  DEPENDS:=freeradius2
240
+  TITLE:=MS-CHAP and MS-CHAPv2 module
241
+endef
242
+
243
+define Package/freeradius2-mod-mschap/conffiles
244
+/etc/freeradius2/modules/mschap
245
+endef
246
+
247
+define Package/freeradius2-mod-pap
248
+  $(call Package/freeradius2/Default)
249
+  DEPENDS:=freeradius2
250
+  TITLE:=PAP module
251
+endef
252
+
253
+define Package/freeradius2-mod-pap/conffiles
254
+/etc/freeradius2/modules/pap
255
+endef
256
+
257
+define Package/freeradius2-mod-preprocess
258
+  $(call Package/freeradius2/Default)
259
+  DEPENDS:=freeradius2
260
+  TITLE:=Request pre-processing module
261
+endef
262
+
263
+define Package/freeradius2-mod-preprocess/conffiles
264
+/etc/freeradius2/hints
265
+/etc/freeradius2/huntgroups
266
+/etc/freeradius2/modules/preprocess
267
+endef
268
+
269
+define Package/freeradius2-mod-realm
270
+  $(call Package/freeradius2/Default)
271
+  DEPENDS:=freeradius2
272
+  TITLE:=Realms handling module
273
+endef
274
+
275
+define Package/freeradius2-mod-realm/conffiles
276
+/etc/freeradius2/proxy.conf
277
+/etc/freeradius2/modules/realm
278
+endef
279
+
280
+define Package/freeradius2-mod-sql
281
+  $(call Package/freeradius2/Default)
282
+  DEPENDS:=freeradius2
283
+  TITLE:=Base SQL module
284
+endef
285
+
286
+define Package/freeradius2-mod-sql/conffiles
287
+/etc/freeradius2/sql.conf
288
+endef
289
+
290
+define Package/freeradius2-mod-sql-mysql
291
+  $(call Package/freeradius2/Default)
292
+  DEPENDS:=freeradius2-mod-sql \
293
+  	+PACKAGE_freeradius2-mod-sql-mysql:libmysqlclient-r
294
+  TITLE:=MySQL module
295
+endef
296
+
297
+define Package/freeradius2-mod-sql-pgsql
298
+  $(call Package/freeradius2/Default)
299
+  DEPENDS:=freeradius2-mod-sql \
300
+  	+PACKAGE_freeradius2-mod-sql-pgsql:libpq
301
+  TITLE:=PostgreSQL module
302
+endef
303
+
304
+define Package/freeradius2-mod-sql-sqlite
305
+  $(call Package/freeradius2/Default)
306
+  DEPENDS:=freeradius2-mod-sql \
307
+  	+PACKAGE_freeradius2-mod-sql-sqlite:libsqlite3
308
+  TITLE:=SQLite module
309
+endef
310
+
311
+define Package/freeradius2-mod-sqlcounter
312
+  $(call Package/freeradius2/Default)
313
+  DEPENDS:=freeradius2-mod-sql
314
+  TITLE:=Generic SQL Counter module
315
+endef
316
+
317
+define Package/freeradius2-mod-radutmp
318
+  $(call Package/freeradius2/Default)
319
+  DEPENDS:=freeradius2
320
+  TITLE:=Radius UTMP module
321
+endef
322
+
323
+define Package/freeradius2-mod-radutmp/conffiles
324
+/etc/freeradius2/modules/radutmp
325
+/etc/freeradius2/modules/sradutmp
326
+endef
327
+
328
+define Package/freeradius2-utils
329
+  $(call Package/freeradius2/Default)
330
+  DEPENDS:=+freeradius2-common
331
+  TITLE:=Misc. client utilities
332
+endef
333
+
334
+define Package/freeradius2-mod-sqllog
335
+  $(call Package/freeradius2/Default)
336
+  DEPENDS:=freeradius2
337
+  TITLE:=SQL Logging module
338
+endef
339
+
340
+CONFIGURE_ARGS+= \
341
+	--libdir=/usr/lib/freeradius2 \
342
+	--libexecdir=/usr/lib/freeradius2 \
343
+	--enable-shared \
344
+	--disable-static \
345
+	--disable-developer \
346
+	--with-threads \
347
+	$(if $(CONFIG_FREERADIUS_OPENSSL),--with,--without)-openssl \
348
+	$(if $(CONFIG_FREERADIUS_OPENSSL),--with-openssl-includes="$(STAGING_DIR)/usr/include",) \
349
+	$(if $(CONFIG_FREERADIUS_OPENSSL),--with-openssl-libraries="$(STAGING_DIR)/usr/lib",) \
350
+	--with-system-libtool \
351
+	--with-system-libltdl \
352
+	--enable-strict-dependencies \
353
+	--with-raddbdir=/etc/freeradius2 \
354
+	--with-radacctdir=/var/db/radacct \
355
+	--with-logdir=/var/log \
356
+	--without-edir \
357
+	--without-snmp \
358
+	--without-rlm_checkval \
359
+	--without-rlm_dbm \
360
+	--without-rlm_counter \
361
+	--with-rlm_expr \
362
+	--with-rlm_eap \
363
+	--without-rlm_eap_sim \
364
+	--without-rlm_example \
365
+	--without-rlm_ippool \
366
+	--without-rlm_krb5 \
367
+	--without-rlm_otp \
368
+	--without-rlm_smsotp \
369
+	--without-rlm_pam \
370
+	--without-rlm_perl \
371
+	--without-rlm_python \
372
+	--without-rlm_smb \
373
+	--with-rlm_sql \
374
+	--with-rlm_sqlcounter \
375
+	--without-rlm_sqlhpwippool \
376
+	--without-rlm_sqlippool \
377
+	--without-rlm_sql_db2 \
378
+	--without-rlm_sql_firebird \
379
+	--without-rlm_sql_freetds \
380
+	--without-rlm_sql_iodbc \
381
+	--without-rlm_sql_oracle \
382
+	--without-rlm_sql_sybase \
383
+	--without-rlm_sql_unixodbc \
384
+	--without-rlm_sql_log \
385
+	--without-rlm_unix \
386
+	--without-rlm_eap_tnc \
387
+	--without-rlm_eap_ikev2 \
388
+	--without-rlm_opendirectory \
389
+	--without-rlm_wimax \
390
+	--without-rlm_ruby \
391
+	--without-rlm_caching \
392
+	--without-rlm_redis \
393
+	--without-rlm_rediswho \
394
+	--without-rlm_soh \
395
+	--without-rlm_sim \
396
+	--without-rlm_replicate \
397
+	--without-rlm_protocol_filter \
398
+	--without-rlm_policy \
399
+	--without-rlm_linelog \
400
+	--without-rlm_jradius \
401
+	--without-rlm_fastusers \
402
+	--without-rlm_eap_leap \
403
+	--without-rlm_dynamic_clients \
404
+	--without-rlm_digest \
405
+	--without-rlm_cram \
406
+	--without-rlm_copy_packet \
407
+	--without-rlm_acct_unique \
408
+	--without-rlm_acctlog
409
+	
410
+
411
+PKG_DICTIONARIES:= \
412
+	freeradius freeradius.internal \
413
+	rfc2865 rfc2866 rfc2867 rfc2868 rfc2869 rfc3162 rfc3576 rfc3580 \
414
+	rfc4372 rfc4675 rfc4679 \
415
+	microsoft \
416
+	wispr \
417
+
418
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-ldap),)
419
+  CONFIGURE_ARGS+= \
420
+		--with-rlm_ldap-include-dir="$(STAGING_DIR)/usr/include" \
421
+		--with-rlm_ldap-lib-dir="$(STAGING_DIR)/usr/lib"
422
+  CONFIGURE_LIBS+= -lcrypto -lssl
423
+else
424
+  CONFIGURE_ARGS+= --without-rlm_ldap
425
+endif
426
+
427
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-sql-mysql),)
428
+  CONFIGURE_ARGS+= \
429
+		--with-mysql-include-dir="$(STAGING_DIR)/usr/include" \
430
+		--with-mysql-lib-dir="$(STAGING_DIR)/usr/lib/mysql"
431
+  CONFIGURE_LIBS+= -lz
432
+  CONFIGURE_VARS+= ac_cv_lib_mysqlclient_r_mysql_init=yes
433
+else
434
+  CONFIGURE_ARGS+= --without-rlm_sql_mysql
435
+endif
436
+
437
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-sql-pgsql),)
438
+  CONFIGURE_ARGS+= \
439
+		--with-rlm_sql_postgresql-include-dir="$(STAGING_DIR)/usr/include" \
440
+		--with-rlm_sql_postgresql-lib-dir="$(STAGING_DIR)/usr/lib"
441
+else
442
+  CONFIGURE_ARGS+= --without-rlm_sql_postgresql
443
+endif
444
+
445
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-sqllog),)
446
+  CONFIGURE_ARGS+= \
447
+        --with-rlm_sql_log \
448
+        --with-experimental-modules \
449
+else
450
+  CONFIGURE_ARGS+= --without-rlm_sql_log
451
+endif
452
+
453
+
454
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-sql-sqlite),)
455
+  CONFIGURE_ARGS+= \
456
+	--with-rlm_sql_sqlite \
457
+	--with-experimental-modules \
458
+	--with-sqlite-include-dir="$(STAGING_DIR)/usr/include" \
459
+	--with-sqlite-lib-dir="$(STAGING_DIR)/usr/lib"
460
+else
461
+  CONFIGURE_ARGS+= --without-rlm_sql_sqlite
462
+endif
463
+
464
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-eap-peap),)
465
+  CONFIGURE_ARGS+= \
466
+  		--with-rlm_eap_peap \
467
+		--with-rlm_eap_peap-include-dir="$(STAGING_DIR)/usr/include" \
468
+		--with-rlm_eap_peap-lib-dir="$(STAGING_DIR)/usr/lib"
469
+  CONFIGURE_LIBS+= -lcrypto -lssl
470
+else
471
+  CONFIGURE_ARGS+= --without-rlm_eap_peap
472
+endif
473
+
474
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-eap-tls),)
475
+  CONFIGURE_ARGS+= \
476
+  		--with-rlm_eap_tls \
477
+		--with-rlm_eap_tls-include-dir="$(STAGING_DIR)/usr/include" \
478
+		--with-rlm_eap_tls-lib-dir="$(STAGING_DIR)/usr/lib"
479
+  CONFIGURE_LIBS+= -lcrypto -lssl
480
+else
481
+  CONFIGURE_ARGS+= --without-rlm_eap_tls
482
+endif
483
+
484
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-eap-ttls),)
485
+  CONFIGURE_ARGS+= \
486
+  		--with-rlm_eap_ttls \
487
+		--with-rlm_eap_ttls-include-dir="$(STAGING_DIR)/usr/include" \
488
+		--with-rlm_eap_ttls-lib-dir="$(STAGING_DIR)/usr/lib"
489
+  CONFIGURE_LIBS+= -lcrypto -lssl
490
+else
491
+  CONFIGURE_ARGS+= --without-rlm_eap_ttls
492
+endif
493
+
494
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-attr-rewrite),)
495
+  CONFIGURE_ARGS+= --with-rlm_attr-rewrite
496
+else
497
+  CONFIGURE_ARGS+= --without-rlm_attr-rewrite
498
+endif
499
+
500
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-radutmp),)
501
+  CONFIGURE_ARGS+= --with-rlm_radutmp
502
+else
503
+  CONFIGURE_ARGS+= --without-rlm_radutmp
504
+endif
505
+
506
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-logintime),)
507
+  CONFIGURE_ARGS+= --with-rlm_logintime
508
+else
509
+  CONFIGURE_ARGS+= --without-rlm_logintime
510
+endif
511
+
512
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-expiration),)
513
+  CONFIGURE_ARGS+= --with-rlm_expiration
514
+else
515
+  CONFIGURE_ARGS+= --without-rlm_expiration
516
+endif
517
+
518
+ifneq ($(SDK)$(CONFIG_PACKAGE_freeradius2-mod-always),)
519
+  CONFIGURE_ARGS+= --with-rlm_always
520
+else
521
+  CONFIGURE_ARGS+= --without-rlm_always
522
+endif
523
+
524
+CONFIGURE_VARS+= \
525
+	LDFLAGS="$$$$LDFLAGS" \
526
+	LIBS="$(CONFIGURE_LIBS)" \
527
+	MYSQL_CONFIG="no" \
528
+	ac_cv_lib_readline=no \
529
+
530
+define Build/Compile
531
+	$(MAKE) -C $(PKG_BUILD_DIR) \
532
+		R="$(PKG_INSTALL_DIR)" \
533
+		INSTALLSTRIP="" \
534
+		all certs install
535
+endef
536
+
537
+define Package/freeradius2-common/install
538
+	$(INSTALL_DIR) $(1)/etc/freeradius2
539
+	chmod 771 $(1)/etc/freeradius2
540
+	$(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/dictionary $(1)/etc/freeradius2/ ; \
541
+	$(INSTALL_DIR) $(1)/usr/lib/freeradius2
542
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius2/libfreeradius-radius{,-*}.so $(1)/usr/lib/freeradius2
543
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius2/libfreeradius-eap{,-*}.so $(1)/usr/lib/freeradius2
544
+	$(INSTALL_DIR) $(1)/usr/share/freeradius2
545
+	$(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary $(1)/usr/share/freeradius2/
546
+	$(SED) "s,^\(\$$$$INCLUDE\),#\1,g" $(1)/usr/share/freeradius2/dictionary
547
+	for f in $(PKG_DICTIONARIES); do \
548
+		$(CP) $(PKG_INSTALL_DIR)/usr/share/freeradius/dictionary.$$$${f} $(1)/usr/share/freeradius2/ ; \
549
+		$(SED) "s,^#\(\$$$$INCLUDE dictionary\.$$$${f}\),\1,g" $(1)/usr/share/freeradius2/dictionary ; \
550
+	done
551
+endef
552
+
553
+define Package/freeradius2/install
554
+	$(INSTALL_DIR) $(1)/etc/freeradius2/modules
555
+	$(INSTALL_DIR) $(1)/etc/freeradius2/sites
556
+	for f in clients.conf radiusd.conf policy.conf; do \
557
+		$(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/$$$${f} $(1)/etc/freeradius2/ ; \
558
+	done
559
+	$(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/sites-available/default $(1)/etc/freeradius2/sites/default
560
+	$(INSTALL_DIR) $(1)/usr/sbin
561
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/radiusd $(1)/usr/sbin/
562
+	$(INSTALL_DIR) $(1)/etc/init.d
563
+	$(INSTALL_BIN) ./files/radiusd.init $(1)/etc/init.d/radiusd
564
+endef
565
+
566
+define Package/freeradius2-democerts/install
567
+	$(INSTALL_DIR) $(1)/etc/freeradius2/certs
568
+	$(CP) \
569
+		$(PKG_BUILD_DIR)/raddb/certs/ca.pem \
570
+		$(PKG_BUILD_DIR)/raddb/certs/dh \
571
+		$(PKG_BUILD_DIR)/raddb/certs/random \
572
+		$(PKG_BUILD_DIR)/raddb/certs/server.pem \
573
+		$(1)/etc/freeradius2/certs/
574
+endef
575
+
576
+define Package/freeradius2-utils/install
577
+	$(INSTALL_DIR) $(1)/usr/bin
578
+	for f in radclient radeapclient radwho; do \
579
+		$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$$$${f} $(1)/usr/bin/ ; \
580
+	done
581
+endef
582
+
583
+define BuildPlugin
584
+  define Package/$(1)/install
585
+	[ -z "$(2)" ] || $(INSTALL_DIR) $$(1)/usr/lib/freeradius2
586
+	for m in $(2); do \
587
+		$(CP) $(PKG_INSTALL_DIR)/usr/lib/freeradius2/$$$$$$$${m}{,-*}.so $$(1)/usr/lib/freeradius2 ; \
588
+	done
589
+	[ -z "$(3)" ] || $(INSTALL_DIR) $$(1)/etc/freeradius2
590
+	[ -z "$(4)" ] || $(INSTALL_DIR) $$(1)/etc/freeradius2/$(4)
591
+	for f in $(3); do \
592
+		$(CP) $(PKG_INSTALL_DIR)/etc/freeradius2/$$$$$$$${f} $$(1)/etc/freeradius2/$$$$$$$${f} ; \
593
+	done
594
+  endef
595
+
596
+  $$(eval $$(call BuildPackage,$(1)))
597
+endef
598
+
599
+$(eval $(call BuildPackage,freeradius2))
600
+$(eval $(call BuildPackage,freeradius2-common))
601
+$(eval $(call BuildPackage,freeradius2-democerts))
602
+$(eval $(call BuildPlugin,freeradius2-mod-chap,rlm_chap,modules/chap,modules,))
603
+$(eval $(call BuildPlugin,freeradius2-mod-detail,rlm_detail,modules/detail,modules,))
604
+$(eval $(call BuildPlugin,freeradius2-mod-eap,rlm_eap,eap.conf))
605
+$(eval $(call BuildPlugin,freeradius2-mod-eap-gtc,rlm_eap_gtc,))
606
+$(eval $(call BuildPlugin,freeradius2-mod-eap-md5,rlm_eap_md5,))
607
+$(eval $(call BuildPlugin,freeradius2-mod-eap-mschapv2,rlm_eap_mschapv2,))
608
+$(eval $(call BuildPlugin,freeradius2-mod-eap-peap,rlm_eap_peap,))
609
+$(eval $(call BuildPlugin,freeradius2-mod-eap-tls,rlm_eap_tls,))
610
+$(eval $(call BuildPlugin,freeradius2-mod-eap-ttls,rlm_eap_ttls,))
611
+$(eval $(call BuildPlugin,freeradius2-mod-exec,rlm_exec,modules/exec modules/echo ,modules,))
612
+$(eval $(call BuildPlugin,freeradius2-mod-attr-rewrite,rlm_attr_rewrite,modules/attr_rewrite,modules,))
613
+$(eval $(call BuildPlugin,freeradius2-mod-files,rlm_files,acct_users preproxy_users users modules/files,modules,))
614
+$(eval $(call BuildPlugin,freeradius2-mod-passwd,rlm_passwd,modules/passwd,modules,))
615
+$(eval $(call BuildPlugin,freeradius2-mod-ldap,rlm_ldap,ldap.attrmap modules/ldap,modules,))
616
+$(eval $(call BuildPlugin,freeradius2-mod-mschap,rlm_mschap,modules/mschap,modules,))
617
+$(eval $(call BuildPlugin,freeradius2-mod-pap,rlm_pap,modules/pap,modules,))
618
+$(eval $(call BuildPlugin,freeradius2-mod-preprocess,rlm_preprocess,hints huntgroups modules/preprocess,modules,))
619
+$(eval $(call BuildPlugin,freeradius2-mod-realm,rlm_realm,proxy.conf modules/realm modules/inner-eap,modules,))
620
+$(eval $(call BuildPlugin,freeradius2-mod-sql,rlm_sql,sql.conf,))
621
+$(eval $(call BuildPlugin,freeradius2-mod-sql-mysql,rlm_sql_mysql,))
622
+$(eval $(call BuildPlugin,freeradius2-mod-sql-pgsql,rlm_sql_postgresql,))
623
+$(eval $(call BuildPlugin,freeradius2-mod-sql-sqlite,rlm_sql_sqlite,))
624
+$(eval $(call BuildPlugin,freeradius2-mod-sqlcounter,rlm_sqlcounter,))
625
+$(eval $(call BuildPlugin,freeradius2-mod-sqllog,rlm_sql_log,))
626
+$(eval $(call BuildPlugin,freeradius2-mod-radutmp,rlm_radutmp,modules/radutmp modules/sradutmp,modules,))
627
+$(eval $(call BuildPlugin,freeradius2-mod-logintime,rlm_logintime,modules/logintime,modules,))
628
+$(eval $(call BuildPlugin,freeradius2-mod-expr,rlm_expr,modules/expr,modules,))
629
+$(eval $(call BuildPlugin,freeradius2-mod-attr-filter,rlm_attr_filter,modules/attr_filter attrs attrs.access_reject attrs.accounting_response attrs.pre-proxy,modules,,))
630
+$(eval $(call BuildPlugin,freeradius2-mod-expiration,rlm_expiration,modules/expiration,modules,))
631
+$(eval $(call BuildPlugin,freeradius2-mod-always,rlm_always,modules/always,modules,))
632
+$(eval $(call BuildPackage,freeradius2-utils))

+ 22
- 0
net/freeradius2/files/radiusd.init Vedi File

@@ -0,0 +1,22 @@
1
+#!/bin/sh /etc/rc.common
2
+# Copyright (C) 2006 OpenWrt.org
3
+START=50
4
+
5
+DEFAULT=/etc/default/radiusd
6
+LOG_D=/var/log
7
+RUN_D=/var/run
8
+PID_F=$RUN_D/radiusd.pid
9
+RADACCT_D=/var/db/radacct
10
+IPADDR=$(ifconfig br-lan | sed -n 's/.*dr:\(.*\)Bc.*/\1/p')
11
+
12
+start() {
13
+	[ -f $DEFAULT ] && . $DEFAULT
14
+	mkdir -p $LOG_D
15
+	mkdir -p $RUN_D
16
+	mkdir -p $RADACCT_D
17
+	radiusd -i $IPADDR -p 1812,1813 $OPTIONS
18
+}
19
+
20
+stop() {
21
+	[ -f $PID_F ] && kill $(cat $PID_F)
22
+}

+ 10
- 0
net/freeradius2/patches/001-fix-makefile.patch Vedi File

@@ -0,0 +1,10 @@
1
+--- a/Make.inc.in
2
++++ b/Make.inc.in
3
+@@ -5,6 +5,7 @@
4
+ #
5
+ 
6
+ # Location of files.
7
++SHELL		= @SHELL@
8
+ prefix		= @prefix@
9
+ exec_prefix	= @exec_prefix@
10
+ sysconfdir	= @sysconfdir@

+ 588
- 0
net/freeradius2/patches/002-config.patch Vedi File

@@ -0,0 +1,588 @@
1
+--- a/raddb/dictionary.in
2
++++ b/raddb/dictionary.in
3
+@@ -11,7 +11,7 @@
4
+ #
5
+ #	The filename given here should be an absolute path. 
6
+ #
7
+-$INCLUDE	@prefix@/share/freeradius/dictionary
8
++$INCLUDE	@prefix@/share/freeradius2/dictionary
9
+ 
10
+ #
11
+ #	Place additional attributes or $INCLUDEs here.  They will
12
+--- a/raddb/eap.conf
13
++++ b/raddb/eap.conf
14
+@@ -27,7 +27,7 @@
15
+ 		#  then that EAP type takes precedence over the
16
+ 		#  default type configured here.
17
+ 		#
18
+-		default_eap_type = md5
19
++		default_eap_type = peap
20
+ 
21
+ 		#  A list is maintained to correlate EAP-Response
22
+ 		#  packets with EAP-Request packets.  After a
23
+@@ -72,8 +72,8 @@
24
+ 		#  for wireless connections.  It is insecure, and does
25
+ 		#  not provide for dynamic WEP keys.
26
+ 		#
27
+-		md5 {
28
+-		}
29
++#		md5 {
30
++#		}
31
+ 
32
+ 		# Cisco LEAP
33
+ 		#
34
+@@ -87,8 +87,8 @@
35
+ 		#  User-Password, or the NT-Password attributes.
36
+ 		#  'System' authentication is impossible with LEAP.
37
+ 		#
38
+-		leap {
39
+-		}
40
++#		leap {
41
++#		}
42
+ 
43
+ 		#  Generic Token Card.
44
+ 		#
45
+@@ -101,7 +101,7 @@
46
+ 		#  the users password will go over the wire in plain-text,
47
+ 		#  for anyone to see.
48
+ 		#
49
+-		gtc {
50
++#		gtc {
51
+ 			#  The default challenge, which many clients
52
+ 			#  ignore..
53
+ 			#challenge = "Password: "
54
+@@ -118,8 +118,8 @@
55
+ 			#  configured for the request, and do the
56
+ 			#  authentication itself.
57
+ 			#
58
+-			auth_type = PAP
59
+-		}
60
++#			auth_type = PAP
61
++#		}
62
+ 
63
+ 		## EAP-TLS
64
+ 		#
65
+@@ -215,7 +215,7 @@
66
+ 			#  In these cases, fragment size should be
67
+ 			#  1024 or less.
68
+ 			#
69
+-		#	fragment_size = 1024
70
++			fragment_size = 1024
71
+ 
72
+ 			#  include_length is a flag which is
73
+ 			#  by default set to yes If set to
74
+@@ -225,7 +225,7 @@
75
+ 			#  message is included ONLY in the
76
+ 			#  First packet of a fragment series.
77
+ 			#
78
+-		#	include_length = yes
79
++			include_length = yes
80
+ 
81
+ 			#  Check the Certificate Revocation List
82
+ 			#
83
+@@ -297,7 +297,7 @@
84
+ 			# for the server to print out an error message,
85
+ 			# and refuse to start.
86
+ 			#
87
+-			make_cert_command = "${certdir}/bootstrap"
88
++		#	make_cert_command = "${certdir}/bootstrap"
89
+ 
90
+ 			#
91
+ 			#  Elliptical cryptography configuration
92
+@@ -332,7 +332,7 @@
93
+ 			#  You probably also want "use_tunneled_reply = yes"
94
+ 			#  when using fast session resumption.
95
+ 			#
96
+-			cache {
97
++		#	cache {
98
+ 			      #
99
+ 			      #  Enable it.  The default is "no".
100
+ 			      #  Deleting the entire "cache" subsection
101
+@@ -348,14 +348,14 @@
102
+ 			      #  enable resumption for just one user
103
+ 			      #  by setting the above attribute to "yes".
104
+ 			      #
105
+-			      enable = no
106
++		#	      enable = no
107
+ 
108
+ 			      #
109
+ 			      #  Lifetime of the cached entries, in hours.
110
+ 			      #  The sessions will be deleted after this
111
+ 			      #  time.
112
+ 			      #
113
+-			      lifetime = 24 # hours
114
++		#	      lifetime = 24 # hours
115
+ 
116
+ 			      #
117
+ 			      #  The maximum number of entries in the
118
+@@ -364,8 +364,8 @@
119
+ 			      #  This could be set to the number of users
120
+ 			      #  who are logged in... which can be a LOT.
121
+ 			      #
122
+-			      max_entries = 255
123
+-			}
124
++		#	      max_entries = 255
125
++		#	}
126
+ 
127
+ 			#
128
+ 			#  As of version 2.1.10, client certificates can be
129
+@@ -503,7 +503,7 @@
130
+ 		#
131
+ 		#  in the control items for a request.
132
+ 		#
133
+-		ttls {
134
++#		ttls {
135
+ 			#  The tunneled EAP session needs a default
136
+ 			#  EAP type which is separate from the one for
137
+ 			#  the non-tunneled EAP module.  Inside of the
138
+@@ -511,7 +511,7 @@
139
+ 			#  If the request does not contain an EAP
140
+ 			#  conversation, then this configuration entry
141
+ 			#  is ignored.
142
+-			default_eap_type = md5
143
++#			default_eap_type = mschapv2
144
+ 
145
+ 			#  The tunneled authentication request does
146
+ 			#  not usually contain useful attributes
147
+@@ -527,7 +527,7 @@
148
+ 			#  is copied to the tunneled request.
149
+ 			#
150
+ 			# allowed values: {no, yes}
151
+-			copy_request_to_tunnel = no
152
++#			copy_request_to_tunnel = yes
153
+ 
154
+ 			#  The reply attributes sent to the NAS are
155
+ 			#  usually based on the name of the user
156
+@@ -540,7 +540,7 @@
157
+ 			#  the tunneled request.
158
+ 			#
159
+ 			# allowed values: {no, yes}
160
+-			use_tunneled_reply = no
161
++#			use_tunneled_reply = no
162
+ 
163
+ 			#
164
+ 			#  The inner tunneled request can be sent
165
+@@ -552,13 +552,13 @@
166
+ 			#  the virtual server that processed the
167
+ 			#  outer requests.
168
+ 			#
169
+-			virtual_server = "inner-tunnel"
170
++#			virtual_server = "inner-tunnel"
171
+ 
172
+ 			#  This has the same meaning as the
173
+ 			#  same field in the "tls" module, above.
174
+ 			#  The default value here is "yes".
175
+ 		#	include_length = yes
176
+-		}
177
++#		}
178
+ 
179
+ 		##################################################
180
+ 		#
181
+@@ -627,14 +627,14 @@
182
+ 
183
+ 			#  the PEAP module also has these configuration
184
+ 			#  items, which are the same as for TTLS.
185
+-			copy_request_to_tunnel = no
186
+-			use_tunneled_reply = no
187
++			copy_request_to_tunnel = yes
188
++			use_tunneled_reply = yes
189
+ 
190
+ 			#  When the tunneled session is proxied, the
191
+ 			#  home server may not understand EAP-MSCHAP-V2.
192
+ 			#  Set this entry to "no" to proxy the tunneled
193
+ 			#  EAP-MSCHAP-V2 as normal MSCHAPv2.
194
+-		#	proxy_tunneled_request_as_eap = yes
195
++			proxy_tunneled_request_as_eap = no
196
+ 
197
+ 			#
198
+ 			#  The inner tunneled request can be sent
199
+@@ -646,7 +646,8 @@
200
+ 			#  the virtual server that processed the
201
+ 			#  outer requests.
202
+ 			#
203
+-			virtual_server = "inner-tunnel"
204
++		#	virtual_server = "inner-tunnel"
205
++			EAP-TLS-Require-Client-Cert = no
206
+ 
207
+ 			# This option enables support for MS-SoH
208
+ 			# see doc/SoH.txt for more info.
209
+--- a/raddb/modules/counter
210
++++ b/raddb/modules/counter
211
+@@ -69,7 +69,7 @@
212
+ #  'check-name' attribute.
213
+ #
214
+ counter daily {
215
+-	filename = ${db_dir}/db.daily
216
++	filename = ${radacctdir}/db.daily
217
+ 	key = User-Name
218
+ 	count-attribute = Acct-Session-Time
219
+ 	reset = daily
220
+--- a/raddb/modules/pap
221
++++ b/raddb/modules/pap
222
+@@ -18,5 +18,5 @@
223
+ #
224
+ #  http://www.openldap.org/faq/data/cache/347.html
225
+ pap {
226
+-	auto_header = no
227
++	auto_header = yes
228
+ }
229
+--- a/raddb/modules/radutmp
230
++++ b/raddb/modules/radutmp
231
+@@ -12,7 +12,7 @@ radutmp {
232
+ 	#  Where the file is stored.  It's not a log file,
233
+ 	#  so it doesn't need rotating.
234
+ 	#
235
+-	filename = ${logdir}/radutmp
236
++	filename = ${radacctdir}/radutmp
237
+ 
238
+ 	#  The field in the packet to key on for the
239
+ 	#  'user' name,  If you have other fields which you want
240
+--- a/raddb/modules/sradutmp
241
++++ b/raddb/modules/sradutmp
242
+@@ -10,7 +10,7 @@
243
+ # then name "sradutmp" to identify it later in the "accounting"
244
+ # section.
245
+ radutmp sradutmp {
246
+-	filename = ${logdir}/sradutmp
247
++	filename = ${radacctdir}/sradutmp
248
+ 	perm = 0644
249
+ 	callerid = "no"
250
+ }
251
+--- a/raddb/radiusd.conf.in
252
++++ b/raddb/radiusd.conf.in
253
+@@ -66,7 +66,7 @@ name = radiusd
254
+ 
255
+ #  Location of config and logfiles.
256
+ confdir = ${raddbdir}
257
+-run_dir = ${localstatedir}/run/${name}
258
++run_dir = ${localstatedir}/run
259
+ 
260
+ # Should likely be ${localstatedir}/lib/radiusd
261
+ db_dir = ${raddbdir}
262
+@@ -323,7 +323,7 @@ listen {
263
+ 	#  If your system does not support this feature, you will
264
+ 	#  get an error if you try to use it.
265
+ 	#
266
+-#	interface = eth0
267
++	interface = br-lan
268
+ 
269
+ 	#  Per-socket lists of clients.  This is a very useful feature.
270
+ 	#
271
+@@ -350,7 +350,7 @@ listen {
272
+ #	ipv6addr = ::
273
+ 	port = 0
274
+ 	type = acct
275
+-#	interface = eth0
276
++	interface = br-lan
277
+ #	clients = per_socket_clients
278
+ }
279
+ 
280
+@@ -584,8 +584,8 @@ security {
281
+ #
282
+ #  allowed values: {no, yes}
283
+ #
284
+-proxy_requests  = yes
285
+-$INCLUDE proxy.conf
286
++proxy_requests  = no
287
++#$INCLUDE proxy.conf
288
+ 
289
+ 
290
+ # CLIENTS CONFIGURATION
291
+@@ -782,7 +782,7 @@ instantiate {
292
+ 	#  The entire command line (and output) must fit into 253 bytes.
293
+ 	#
294
+ 	#  e.g. Framed-Pool = `%{exec:/bin/echo foo}`
295
+-	exec
296
++#	exec
297
+ 
298
+ 	#
299
+ 	#  The expression module doesn't do authorization,
300
+@@ -799,15 +799,15 @@ instantiate {
301
+ 	#  other xlat functions such as md5, sha1 and lc.
302
+ 	#
303
+ 	#  We do not recommend removing it's listing here.
304
+-	expr
305
++#	expr
306
+ 
307
+ 	#
308
+ 	# We add the counter module here so that it registers
309
+ 	# the check-name attribute before any module which sets
310
+ 	# it
311
+ #	daily
312
+-	expiration
313
+-	logintime
314
++#	expiration
315
++#	logintime
316
+ 
317
+ 	# subsections here can be thought of as "virtual" modules.
318
+ 	#
319
+@@ -831,7 +831,7 @@ instantiate {
320
+ #	to multiple times.
321
+ #
322
+ ######################################################################
323
+-$INCLUDE policy.conf
324
++#$INCLUDE policy.conf
325
+ 
326
+ ######################################################################
327
+ #
328
+@@ -841,9 +841,9 @@ $INCLUDE policy.conf
329
+ #	match the regular expression: /[a-zA-Z0-9_.]+/
330
+ #
331
+ #	It allows you to define new virtual servers simply by placing
332
+-#	a file into the raddb/sites-enabled/ directory.
333
++#	a file into the /etc/freeradius2/sites/ directory.
334
+ #
335
+-$INCLUDE sites-enabled/
336
++$INCLUDE sites/
337
+ 
338
+ ######################################################################
339
+ #
340
+@@ -851,7 +851,7 @@ $INCLUDE sites-enabled/
341
+ #	"authenticate {}", "accounting {}", have been moved to the
342
+ #	the file:
343
+ #
344
+-#		raddb/sites-available/default
345
++#		/etc/freeradius2/sites/default
346
+ #
347
+ #	This is the "default" virtual server that has the same
348
+ #	configuration as in version 1.0.x and 1.1.x.  The default
349
+--- a/raddb/sites-available/default
350
++++ b/raddb/sites-available/default
351
+@@ -85,7 +85,7 @@ authorize {
352
+ 	#
353
+ 	#  It takes care of processing the 'raddb/hints' and the
354
+ 	#  'raddb/huntgroups' files.
355
+-	preprocess
356
++#	preprocess
357
+ 
358
+ 	#
359
+ 	#  If you want to have a log of authentication requests,
360
+@@ -96,7 +96,7 @@ authorize {
361
+ 	#
362
+ 	#  The chap module will set 'Auth-Type := CHAP' if we are
363
+ 	#  handling a CHAP request and Auth-Type has not already been set
364
+-	chap
365
++#	chap
366
+ 
367
+ 	#
368
+ 	#  If the users are logging in with an MS-CHAP-Challenge
369
+@@ -104,13 +104,13 @@ authorize {
370
+ 	#  the MS-CHAP-Challenge attribute, and add 'Auth-Type := MS-CHAP'
371
+ 	#  to the request, which will cause the server to then use
372
+ 	#  the mschap module for authentication.
373
+-	mschap
374
++#	mschap
375
+ 
376
+ 	#
377
+ 	#  If you have a Cisco SIP server authenticating against
378
+ 	#  FreeRADIUS, uncomment the following line, and the 'digest'
379
+ 	#  line in the 'authenticate' section.
380
+-	digest
381
++#	digest
382
+ 
383
+ 	#
384
+ 	#  The WiMAX specification says that the Calling-Station-Id
385
+@@ -133,7 +133,7 @@ authorize {
386
+ 	#  Otherwise, when the first style of realm doesn't match,
387
+ 	#  the other styles won't be checked.
388
+ 	#
389
+-	suffix
390
++#	suffix
391
+ #	ntdomain
392
+ 
393
+ 	#
394
+@@ -195,8 +195,8 @@ authorize {
395
+ 	# Use the checkval module
396
+ #	checkval
397
+ 
398
+-	expiration
399
+-	logintime
400
++#	expiration
401
++#	logintime
402
+ 
403
+ 	#
404
+ 	#  If no other module has claimed responsibility for
405
+@@ -277,7 +277,7 @@ authenticate {
406
+ 	#  If you have a Cisco SIP server authenticating against
407
+ 	#  FreeRADIUS, uncomment the following line, and the 'digest'
408
+ 	#  line in the 'authorize' section.
409
+-	digest
410
++#	digest
411
+ 
412
+ 	#
413
+ 	#  Pluggable Authentication Modules.
414
+@@ -294,7 +294,7 @@ authenticate {
415
+ 	#  be used for authentication ONLY for compatibility with legacy
416
+ 	#  FreeRADIUS configurations.
417
+ 	#
418
+-	unix
419
++#	unix
420
+ 
421
+ 	# Uncomment it if you want to use ldap for authentication
422
+ 	#
423
+@@ -330,8 +330,8 @@ authenticate {
424
+ #
425
+ #  Pre-accounting.  Decide which accounting type to use.
426
+ #
427
+-preacct {
428
+-	preprocess
429
++#preacct {
430
++#	preprocess
431
+ 
432
+ 	#
433
+ 	#  Session start times are *implied* in RADIUS.
434
+@@ -354,7 +354,7 @@ preacct {
435
+ 	#
436
+ 	#  Ensure that we have a semi-unique identifier for every
437
+ 	#  request, and many NAS boxes are broken.
438
+-	acct_unique
439
++#	acct_unique
440
+ 
441
+ 	#
442
+ 	#  Look for IPASS-style 'realm/', and if not found, look for
443
+@@ -364,13 +364,13 @@ preacct {
444
+ 	#  Accounting requests are generally proxied to the same
445
+ 	#  home server as authentication requests.
446
+ #	IPASS
447
+-	suffix
448
++#	suffix
449
+ #	ntdomain
450
+ 
451
+ 	#
452
+ 	#  Read the 'acct_users' file
453
+-	files
454
+-}
455
++#	files
456
++#}
457
+ 
458
+ #
459
+ #  Accounting.  Log the accounting data.
460
+@@ -380,7 +380,7 @@ accounting {
461
+ 	#  Create a 'detail'ed log of the packets.
462
+ 	#  Note that accounting requests which are proxied
463
+ 	#  are also logged in the detail file.
464
+-	detail
465
++#	detail
466
+ #	daily
467
+ 
468
+ 	#  Update the wtmp file
469
+@@ -432,7 +432,7 @@ accounting {
470
+ 	exec
471
+ 
472
+ 	#  Filter attributes from the accounting response.
473
+-	attr_filter.accounting_response
474
++	#attr_filter.accounting_response
475
+ 
476
+ 	#
477
+ 	#  See "Autz-Type Status-Server" for how this works.
478
+@@ -458,7 +458,7 @@ session {
479
+ #  Post-Authentication
480
+ #  Once we KNOW that the user has been authenticated, there are
481
+ #  additional steps we can take.
482
+-post-auth {
483
++#post-auth {
484
+ 	#  Get an address from the IP Pool.
485
+ #	main_pool
486
+ 
487
+@@ -488,7 +488,7 @@ post-auth {
488
+ #	ldap
489
+ 
490
+ 	# For Exec-Program and Exec-Program-Wait
491
+-	exec
492
++#	exec
493
+ 
494
+ 	#
495
+ 	#  Calculate the various WiMAX keys.  In order for this to work,
496
+@@ -572,12 +572,12 @@ post-auth {
497
+ 	#  Add the ldap module name (or instance) if you have set 
498
+ 	#  'edir_account_policy_check = yes' in the ldap module configuration
499
+ 	#
500
+-	Post-Auth-Type REJECT {
501
+-		# log failed authentications in SQL, too.
502
++#	Post-Auth-Type REJECT {
503
++#		# log failed authentications in SQL, too.
504
+ #		sql
505
+-		attr_filter.access_reject
506
+-	}
507
+-}
508
++#		attr_filter.access_reject
509
++#	}
510
++#}
511
+ 
512
+ #
513
+ #  When the server decides to proxy a request to a home server,
514
+@@ -587,7 +587,7 @@ post-auth {
515
+ #
516
+ #  Only a few modules currently have this method.
517
+ #
518
+-pre-proxy {
519
++#pre-proxy {
520
+ #	attr_rewrite
521
+ 
522
+ 	#  Uncomment the following line if you want to change attributes
523
+@@ -603,14 +603,14 @@ pre-proxy {
524
+ 	#  server, un-comment the following line, and the
525
+ 	#  'detail pre_proxy_log' section, above.
526
+ #	pre_proxy_log
527
+-}
528
++#}
529
+ 
530
+ #
531
+ #  When the server receives a reply to a request it proxied
532
+ #  to a home server, the request may be massaged here, in the
533
+ #  post-proxy stage.
534
+ #
535
+-post-proxy {
536
++#post-proxy {
537
+ 
538
+ 	#  If you want to have a log of replies from a home server,
539
+ 	#  un-comment the following line, and the 'detail post_proxy_log'
540
+@@ -634,7 +634,7 @@ post-proxy {
541
+ 	#  hidden inside of the EAP packet, and the end server will
542
+ 	#  reject the EAP request.
543
+ 	#
544
+-	eap
545
++#	eap
546
+ 
547
+ 	#
548
+ 	#  If the server tries to proxy a request and fails, then the
549
+@@ -656,5 +656,5 @@ post-proxy {
550
+ #	Post-Proxy-Type Fail {
551
+ #			detail
552
+ #	}
553
+-}
554
++#}
555
+ 
556
+--- a/raddb/users
557
++++ b/raddb/users
558
+@@ -169,22 +169,22 @@
559
+ #	by the terminal server in which case there may not be a "P" suffix.
560
+ #	The terminal server sends "Framed-Protocol = PPP" for auto PPP.
561
+ #
562
+-DEFAULT	Framed-Protocol == PPP
563
+-	Framed-Protocol = PPP,
564
+-	Framed-Compression = Van-Jacobson-TCP-IP
565
++#DEFAULT	Framed-Protocol == PPP
566
++#	Framed-Protocol = PPP,
567
++#	Framed-Compression = Van-Jacobson-TCP-IP
568
+ 
569
+ #
570
+ # Default for CSLIP: dynamic IP address, SLIP mode, VJ-compression.
571
+ #
572
+-DEFAULT	Hint == "CSLIP"
573
+-	Framed-Protocol = SLIP,
574
+-	Framed-Compression = Van-Jacobson-TCP-IP
575
++#DEFAULT	Hint == "CSLIP"
576
++#	Framed-Protocol = SLIP,
577
++#	Framed-Compression = Van-Jacobson-TCP-IP
578
+ 
579
+ #
580
+ # Default for SLIP: dynamic IP address, SLIP mode.
581
+ #
582
+-DEFAULT	Hint == "SLIP"
583
+-	Framed-Protocol = SLIP
584
++#DEFAULT	Hint == "SLIP"
585
++#	Framed-Protocol = SLIP
586
+ 
587
+ #
588
+ # Last default: rlogin to our main server.

+ 4253
- 0
net/freeradius2/patches/004-ldap_configure.patch
File diff suppressed because it is too large
Vedi File


+ 15
- 0
net/freeradius2/patches/008-honor_ccpflags.patch Vedi File

@@ -0,0 +1,15 @@
1
+--- a/src/modules/rules.mak
2
++++ b/src/modules/rules.mak
3
+@@ -63,10 +63,10 @@ $(LT_OBJS): $(SERVER_HEADERS)
4
+ #
5
+ #######################################################################
6
+ %.lo: %.c
7
+-	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) $(RLM_CFLAGS) -c $<
8
++	$(LIBTOOL) --mode=compile --tag=CC $(CC) $(CFLAGS) $(CPPFLAGS) $(RLM_CFLAGS) -c $<
9
+ 
10
+ %.lo: %.cpp
11
+-	$(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(CFLAGS) $(RLM_CFLAGS) -c $<
12
++	$(LIBTOOL) --mode=compile --tag=CXX $(CXX) $(CFLAGS) $(CPPFLAGS) $(RLM_CFLAGS) -c $<
13
+ 
14
+ ifneq ($(TARGET),)
15
+ #######################################################################

+ 38
- 0
net/freeradius2/patches/010-disbale-openssl-check.patch Vedi File

@@ -0,0 +1,38 @@
1
+--- a/configure.in
2
++++ b/configure.in
3
+@@ -832,35 +832,6 @@ if test "x$WITH_OPENSSL" = xyes; then
4
+     OPENSSL_INCLUDE="-DOPENSSL_NO_KRB5"
5
+   fi
6
+ 
7
+-  dnl #
8
+-  dnl #  Now check that the header versions match the library
9
+-  dnl #
10
+-  AC_MSG_CHECKING([OpenSSL library and header version consistency])
11
+-  AC_RUN_IFELSE(
12
+-    [AC_LANG_PROGRAM(
13
+-      [[
14
+-        #include <stdio.h>
15
+-        #include <openssl/opensslv.h>
16
+-        #include <openssl/crypto.h>
17
+-      ]],
18
+-      [[
19
+-        if (SSLeay() == OPENSSL_VERSION_NUMBER) {
20
+-          return 0;
21
+-        } else {
22
+-          printf("library: %lx header: %lx... ", (unsigned long) SSLeay(), (unsigned long) OPENSSL_VERSION_NUMBER);
23
+-          return 1;
24
+-        }
25
+-      ]]
26
+-    )],
27
+-    [
28
+-      AC_MSG_RESULT(yes)
29
+-    ],
30
+-    [
31
+-      AC_MSG_RESULT(no)
32
+-      AC_MSG_FAILURE([OpenSSL library version does not match header version])
33
+-    ]
34
+-  )
35
+-
36
+   if test "x$OPENSSL_LIBS" = x; then
37
+     LIBS=$old_LIBS
38
+     LDFLAGS="$old_LDFLAGS"