Compare commits

..

127 commits

Author SHA1 Message Date
Antonio Torres
43ef939726
Enable SELinux flag for JIT usage
Resolves: #2427017
Signed-off-by: Antonio Torres <antorres@redhat.com>
2026-01-07 11:21:33 +01:00
Antonio Torres
dda9220390
Update to 3.2.8
Signed-off-by: Antonio Torres <antorres@redhat.com>
2025-11-10 10:07:43 +01:00
Fedora Release Engineering
94437a86b0 Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 20:47:53 +00:00
Jitka Plesnikova
7b23cc2e89 Perl 5.42 rebuild 2025-07-08 14:25:54 +02:00
Bruno Vernay
62f35fae14 Fix chown syntax
Quoting the man page: "The BSD syntax user[.group] was changed to user[:group] in this  volume of POSIX.1‐2017 because the <period> is a valid character in login names (as specified by the Base Definitions volume of POSIX.1‐2017, login names consist of characters in the portable filename character set)."
2025-06-16 07:04:30 +00:00
Antonio Torres
7629f49dac
Update logrotate script with try-reload-or-restart
systemd has renamed reload-or-try-restart to try-reload-or-restart. The
former is still accepted, but may be removed in the future.

Resolves: rhbz#2371329
Signed-off-by: Antonio Torres <antorres@redhat.com>
2025-06-11 10:02:40 +02:00
Python Maint
d2672b8eee Rebuilt for Python 3.14 2025-06-02 20:20:01 +02:00
Antonio Torres
017f82cf90
Skip building rlm_sqlippool_tool helper script
This script relies on a Perl package that is no longer available.
Skip building it and let the users clone it manually instead, as it's
only a helper script for SQL modules users.

Signed-off-by: Antonio Torres <antorres@redhat.com>
2025-03-05 12:47:16 +01:00
Antonio Torres
cc31b38a9e
Update to upstream release 3.2.7
Signed-off-by: Antonio Torres <antorres@redhat.com>
2025-03-05 10:55:22 +01:00
Zbigniew Jędrzejewski-Szmek
8f48670e2a Drop call to %sysusers_create_compat
After https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers,
rpm will handle account creation automatically.
2025-02-12 20:49:21 +01:00
Björn Esser
e4d007f467
Add explicit BR: libxcrypt-devel
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2025-02-01 19:54:05 +01:00
Antonio Torres
4e419c7e37
Fix usage of /usr/sbin
Point to %_bindir instead, according to https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin

Resolves: #2340178
Signed-off-by: Antonio Torres <antorres@redhat.com>
2025-01-23 10:52:45 +01:00
Fedora Release Engineering
10de3e7243 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 18:49:50 +00:00
Yaakov Selkowitz
d3acc3cf6f Drop openssl-devel-engine dependency
The only use of OpenSSL ENGINE API is already guarded by OPENSSL_NO_ENGINE,
which is now automatically defined when openssl-devel-engine is absent.
This allows freeradius to be compiled without it.

https://fedoraproject.org/wiki/Changes/OpensslDeprecateEngine
2024-11-05 19:51:38 -05:00
Fedora Release Engineering
a49c1eef4f Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 23:38:19 +00:00
Antonio Torres
bf421ace12
Include openssl-devel-engine build dependency
Signed-off-by: Antonio Torres <antorres@redhat.com>
2024-07-09 16:28:49 +02:00
Antonio Torres
bead332d11
Update to 3.2.5
Signed-off-by: Antonio Torres <antorres@redhat.com>
2024-07-09 14:46:25 +02:00
Antonio Torres
005987d712
Generate certificates in auth test
Signed-off-by: Antonio Torres <antorres@redhat.com>
2024-06-26 12:24:50 +02:00
Jitka Plesnikova
2238015f6a Perl 5.40 rebuild 2024-06-12 12:52:04 +02:00
Python Maint
dbcdacd2d0 Rebuilt for Python 3.13 2024-06-07 08:46:18 +02:00
Antonio Torres
d549c4c107
Update to 3.2.4 upstream release
Signed-off-by: Antonio Torres <antorres@redhat.com>
2024-05-31 10:34:15 +02:00
Software Management Team
db785d8a9d Eliminate use of obsolete %patchN syntax (#2283636) 2024-05-30 12:46:46 +02:00
Fedora Release Engineering
d68944b4af Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 12:02:29 +00:00
Fedora Release Engineering
bcdc6e99f9 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 19:47:24 +00:00
Florian Weimer
1793f410aa Fix C compatibility issue in configure script
Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
2023-12-19 07:59:23 +01:00
Antonio Torres
ea6ff99048
Update to 3.2.3 upstream release
Signed-off-by: Antonio Torres <antorres@redhat.com>
2023-10-24 14:16:56 +02:00
Antonio Torres
edb8438bef
Ease OpenSSL version check requirement
FreeRADIUS includes an OpenSSL version check that compares built vs linked version,
and fails to start if this check fails. We can ease this requirement in Fedora/RHEL as
ABI changes are tracked and soname is changed accordingly, as discussed in previous
Bugzilla for this issue [1].

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1299388

Resolves: #2238511
Signed-off-by: Antonio Torres <antorres@redhat.com>
2023-09-12 14:35:31 +02:00
Fedora Release Engineering
ca09fc02d8 Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-19 20:14:54 +00:00
Jitka Plesnikova
d1c3541f66 Perl 5.38 rebuild 2023-07-11 15:55:37 +02:00
Python Maint
3f56050138 Rebuilt for Python 3.12 2023-06-14 00:18:40 +02:00
Antonio Torres
e6dba7c680
Add new packaged file to spec
Signed-off-by: Antonio Torres <antorres@redhat.com>
2023-03-21 10:08:47 +01:00
Antonio Torres
049df291ea
Update to 3.2.2 upstream release
Signed-off-by: Antonio Torres <antorres@redhat.com>
2023-03-21 09:39:33 +01:00
Antonio Torres
d04d68f8de
Migrate to SPDX license
Signed-off-by: Antonio Torres <antorres@redhat.com>
2023-03-15 11:50:38 +01:00
Fedora Release Engineering
8b93308d82 Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-19 03:53:53 +00:00
Jitka Plesnikova
db29b91ffb Remove perl(MODULE_COMPAT), it will be replaced by generators 2023-01-13 09:34:41 +01:00
Antonio Torres
8b7c576199
Bump release number
Signed-off-by: Antonio Torres <antorres@redhat.com>
2022-10-17 17:29:47 +02:00
Antonio Torres
38b3f086ca
Remove Python3 hack from spec file
Python 3 module has been marked as stable upstream, so we no longer need
this hack, disabling Python 2 support with a configure option is enough.

Signed-off-by: Antonio Torres <antorres@redhat.com>
2022-10-17 17:07:42 +02:00
Antonio Torres
d2db6eed8c
Update to upstream release 3.2.1
Resolves: #2131850
Signed-off-by: Antonio Torres <antorres@redhat.com>
2022-10-17 13:25:03 +02:00
Antonio Torres
491f4aac7b
Remove deprecated pcre-devel dependency
Resolves: #2128292
Signed-off-by: Antonio Torres <antorres@redhat.com>
2022-09-20 17:56:48 +02:00
Antonio Torres
d9e143bb12
configure: allow building with runstatedir option
In Fedora 38+, redhat-rpm-config adds --runstatedir=/run to %configure macro.
Since this is not supported in current FreeRADIUS configure scripts, add the option
placeholder so that we can continue building the package.

Resolves: #2123374

Signed-off-by: Antonio Torres <antorres@redhat.com>
2022-09-05 17:05:18 +02:00
Fedora Release Engineering
3d25326b00 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-21 03:37:41 +00:00
Antonio Torres
39a371f96e
Rebase to 3.2.0 upstream release
Resolves: #2077687
Signed-off-by: Antonio Torres <antorres@redhat.com>
2022-07-19 16:39:00 +02:00
Antonio Torres
fdb219a9d2
Use 95 GID/UID as it's reserved for FreeRADIUS
Since 95 is reserved GID/UID for FreeRADIUS, we can safely use it.
07f8debf03/f/uidgid (_107)

Signed-off-by: Antonio Torres <antorres@redhat.com>
2022-06-29 12:51:37 +02:00
Antonio Torres
a688847dcf
Use sysusers.d format for user and group creation
Resolves: 2095741
Signed-off-by: Antonio Torres <antorres@redhat.com>
2022-06-24 14:00:48 +02:00
Python Maint
3e1b0c3e5c Rebuilt for Python 3.11 2022-06-13 15:04:09 +02:00
Jitka Plesnikova
ba8509f831 Perl 5.36 rebuild 2022-05-31 08:35:42 +02:00
Antonio Torres
bb772e884b
Use infinite timeout when using LDAP+start-TLS
This will ensure that the TLS connection to the LDAP server will complete
before starting FreeRADIUS, as it forces libldap to use a blocking socket during
the process. Infinite timeout is the OpenLDAP default.
Avoids this: 87ffc60006/libraries/libldap/tls2.c (L1134)

Related: #1983063
Signed-off-by: Antonio Torres <antorres@redhat.com>
2022-04-22 15:39:07 +02:00
Fedora Release Engineering
49e8c0620e - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-20 03:25:40 +00:00
Antonio Torres
afc023e7f1 Fix file conflicts in SQL files
Resolves: bz#2014014
Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-10-14 12:53:53 +02:00
Antonio Torres
c241351c7b Update to 3.0.25
Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-10-08 11:46:20 +02:00
Antonio Torres
d5a8b5f69f Update to 3.0.24
Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-09-30 12:30:36 +02:00
Sahana Prasad
07d2148621 Rebuilt with OpenSSL 3.0.0 2021-09-14 19:01:54 +02:00
Fedora Release Engineering
1540d6c796 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-21 23:21:55 +00:00
Antonio Torres
0815a3326b Fix coredump not being able to be enabled
If resource hard limit is set to zero, then it cannot be raised again,
and this causes coredump to not being able to be enabled.

Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-07-15 13:00:52 +02:00
Björn Esser
58cf5cccf6
Rebuild for versioned symbols in json-c 2021-07-10 11:52:58 +02:00
Antonio Torres
508c8f0746 Fix rpath not being removed correctly
Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-06-29 16:26:48 +02:00
Antonio Torres
f7c2c07435 Remove RPATH usage from additional binaries
Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-06-29 14:53:31 +02:00
Antonio Torres
c54625805c Rebase to 3.0.23
Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-06-29 13:40:12 +02:00
Antonio Torres
1d17d3a57a Fix binaries not being correctly linked after RPATH removal
Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-06-29 12:19:11 +02:00
Antonio Torres
d2c4303d25 Fix python3 not being correctly linked
Since Python 3.8, there is a new way to link against libpython.
https://docs.python.org/3/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build

Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-06-25 17:10:33 +02:00
Antonio Torres
3b6878a0e0 Bump release number
Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-06-08 16:27:43 +02:00
Antonio Torres
15d6daaa28 Ignore badfuncs check from rpminspect
FreeRADIUS source code contains some legacy code that uses
deprecated functions detected by rpminspect's badfuncs check. Since
this causes build failures, disable this check until the problem
is fixed upstream.

Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-06-08 16:19:12 +02:00
Antonio Torres
63ee79a9ba Remove unused import from tests
Tests imported the psutil module, which is not needed for
execution.

Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-06-08 16:18:40 +02:00
Antonio Torres
0bee016e79 Remove broken RPATH usage from all conflicting files
Since Fedora 35, broken RPATH usage is detected and causes builds
to fail: https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild
This commit extends the list of files to remove the RPATH usage from.

Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-06-08 16:14:57 +02:00
Python Maint
a8e0c3d9ed Rebuilt for Python 3.10 2021-06-07 16:23:20 +02:00
Antonio Torres
c2fdf85d80 Disable broken RPATH usage in binaries
Since Fedora 35, broken RPATH usage is detected in packages, causing
a build failure: https://fedoraproject.org/wiki/Changes/Broken_RPATH_will_fail_rpmbuild
With this changes rpath usage is deleted in conflicting files.

Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-06-07 14:32:44 +02:00
Antonio Torres
eaa7823ffa Update to 3.0.22
Update to 3.0.22. This includes adaptation of patches
and addition of new files present in the release.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1961190
Signed-off-by: Antonio Torres <antorres@redhat.com>
2021-06-04 17:12:24 +02:00
Jitka Plesnikova
8c954761a5 Perl 5.34 rebuild 2021-05-21 23:11:33 +02:00
Robbie Harwood
cabc34e05a Disable automatic bootstrap 2021-03-10 22:21:12 +00:00
Robbie Harwood
4e468ec265 General package cleanup; no code changes 2021-03-10 15:40:14 -05:00
Zbigniew Jędrzejewski-Szmek
f4c10d8cdd Rebuilt for updated systemd-rpm-macros
See https://pagure.io/fesco/issue/2583.
2021-03-02 16:13:46 +01:00
Pavel Raiskup
8f248db2e6 rebuild for libpq ABI fix
Related: rhbz#1908268
2021-02-08 09:25:27 +01:00
Fedora Release Engineering
e2ccd9913f - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-26 05:55:34 +00:00
Alexander Scheel
2898c9222b
Again, apply patch
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2020-08-04 11:13:29 -04:00
Alexander Scheel
e260f8f12f
Apply patch this time
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2020-08-04 11:08:13 -04:00
Alexander Scheel
527b1c3a1d
Re-fix permissions issues
Since make is present on certain systems (and has the better certificate
generation logic), we should Require: make and add the relevant chmod
statements to bootstrap after executing make.

Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2020-08-04 10:22:02 -04:00
Fedora Release Engineering
1139a33473 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-07-27 17:49:44 +00:00
Troy Dawson
6b72fc1f50 no python2 for rhel8 2020-07-07 19:17:35 +00:00
Troy Dawson
bbe674aeb2 Minor conditional tweak for ELN
Signed-off-by: Troy Dawson tdawson@redhat.com
2020-07-07 16:40:16 +00:00
Jitka Plesnikova
08b8e23397 Perl 5.32 rebuild 2020-06-23 12:11:05 +02:00
Alexander Scheel
c30f7f08df
Fix certificate generation
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2020-05-13 12:16:58 -04:00
Björn Esser
2b4b411c94 Rebuild (json-c) 2020-04-22 00:31:13 +02:00
Alexander Scheel
f9610e3357
Correction: FreeRADIUS v3.0.21!
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2020-04-01 13:34:47 -04:00
Alexander Scheel
c66b001860
Rebase to FreeRADIUS v3.0.31
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2020-04-01 13:21:27 -04:00
Fedora Release Engineering
6bde0db76c - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-28 18:59:20 +00:00
Paul Wouters
f8c5aa19ae - fixup tmpfile to use /run instead of /var/run 2020-01-11 15:16:42 -05:00
Paul Wouters
ad10ca7db9 fixup tmpfile to not reference /var/run but /run
This prevents:

	/usr/lib/tmpfiles.d/radiusd.conf:1: Line references path below legacy directory /var/run/, updating /var/run/radiusd → /run/radiusd; please update the tmpfiles.d/ drop-in file accordingly.
2020-01-11 15:14:58 -05:00
Alexander Scheel
1ef8514cc3
Rebase to FreeRADIUS v3.0.20
Introduces the experimental rlm_python3 that is largely based off the
existing python2 module.

Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2019-11-15 15:03:30 -05:00
Fedora Release Engineering
f6335be9a2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 01:01:51 +00:00
Jitka Plesnikova
00f06bb8b3 Perl 5.30 rebuild 2019-05-31 07:12:47 +02:00
Alexander Scheel
93f241adb1
Fix permissions on generated certificates
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2019-05-09 14:20:20 -04:00
Alexander Scheel
a0af05f14f
Add additional BZ reference
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2019-05-08 14:10:58 -04:00
Alexander Scheel
765b2552b2
Fix certificate generation at build time
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2019-05-08 13:58:05 -04:00
Alexander Scheel
a9000f05d2
Add additional After= targets to radiusd.service
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2019-05-08 12:05:51 -04:00
Alexander Scheel
dc4edcad17
Finish dropping python2 package on Fedora 31+
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2019-05-08 10:41:49 -04:00
Alexander Scheel
ab22b18a78
Improvements to FreeRADIUS
- Better crypto-policies (previous commit)
- Better logrotation
- Better bootstrap

Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2019-05-08 10:37:04 -04:00
Alexander Scheel
60fac0135f
Update crypto-policies patch
Since introduction, more places for ciphersuites have been introduced by
FreeRADIUS; update the crypto-policies patch accordingly.

Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2019-05-08 10:34:35 -04:00
Alexander Scheel
40d2550f5f
Rebase to 3.0.19
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2019-04-10 13:51:15 -04:00
Alexander Scheel
1180d7fadb
Rebase to 3.0.18
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2019-03-06 13:07:44 -05:00
Igor Gnatenko
c374e8c2b3 Rebuild for readline 8.0 2019-02-17 09:30:50 +01:00
Alexander Scheel
ecea0d0429
Fix for bz#1672284
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2019-02-05 11:39:26 -05:00
Fedora Release Engineering
3bfe24f9cb - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-01-31 20:09:46 +00:00
Igor Gnatenko
1992d5f763 Remove obsolete Group tag
References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag
2019-01-28 20:24:02 +01:00
Björn Esser
7cb8369965
Rebuilt for libcrypt.so.2 (#1666033) 2019-01-14 19:01:37 +01:00
Alexander Scheel
f9f4db1e41
Add network-online.target instead of network.target in RADIUS spec file
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2018-12-14 15:17:24 -05:00
Alexander Scheel
7cf8f7ec5b Merge #2 Adds tests according to the CI 2018-11-30 17:53:46 +00:00
Alexander Scheel
7960729fb9
Update to upstream release v3.0.17
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
2018-10-18 16:21:59 -04:00
Nikolai Kondrashov
d99a39e697 Actually apply patches added previously 2018-09-24 10:37:12 +03:00
Nikolai Kondrashov
e5cfc720bd Fix a few minor manpage issues 2018-09-14 12:39:29 +03:00
Nikolai Kondrashov
99b478f15b Add make to BuildRequires and Requires(post) 2018-09-07 15:55:05 +03:00
Pavel Raiskup
943006a476 BuildRequires: s/postgresql-devel/libpq-devel/
That's because we moved libpq.so.5 into libpq package.

Related: rhbz#1618698, rhbz#1623764
2018-09-05 15:16:14 +02:00
Nikolai Kondrashov
dd2702700c Add gcc to BuildRequires 2018-09-04 15:35:01 +03:00
Fedora Release Engineering
1ba1452bf6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 00:50:50 +00:00
Jason Tibbitts
65540fe645 Remove needless use of %defattr 2018-07-10 00:52:45 -05:00
Jitka Plesnikova
97844b72f6 Perl 5.28 rebuild 2018-06-29 21:46:43 +02:00
Susant Sahani
bcef4f467c Adds tests according to the CI
Adds tests according to the CI

justification
Adds tests according to the CI wiki specifically the standard test interface in the spec.
The playbook includes Tier1 level test cases that have been tested in the following contexts and
is passing reliably: Classic. Test logs are stored in the artifacts directory.
The following steps are used to execute the tests using the standard test interface:

Test enveronment
Make sure you have installed packages from the spec
```
ansible-2.4.1.0-2.fc28.noarch
python2-dnf-2.7.5-1.fc28.noarch
libselinux-python-2.7-2.fc28.x86_64
standard-test-roles-2.5-1.fc28.noarch
Run tests for Classic
Snip of the example test run for Classic tests:
```
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Test
::   Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [ 16:21:19 ] :: [   LOG    ] :: Starting radius auth tests ...
:: [ 16:21:19 ] :: [   LOG    ] :: Starting radius auth tests ...
:: [ 16:21:19 ] :: [  BEGIN   ] :: Running '/usr/bin/python3 /usr/bin/freeradius-tests.py'
test_radius_plaintext_auth (__main__.RadiousTests) ... Sent Access-Request Id 17 from 0.0.0.0:49711 to 127.0.0.1:1812 length 79
        User-Name = "fedora-ci"
        User-Password = "password"
        NAS-IP-Address = 192.168.225.189
        NAS-Port = 100
        Message-Authenticator = 0x00
        Cleartext-Password = "password"
Received Access-Accept Id 17 from 127.0.0.1:1812 to 0.0.0.0:0 length 38
        Reply-Message = "Hello, fedora-ci"
ok

----------------------------------------------------------------------
Ran 1 test in 1.214s

OK
:: [ 16:21:20 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/freeradius-tests.py' (Expected 0, got 0)
:: [ 16:21:20 ] :: [   PASS   ] :: Command '/usr/bin/python3 /usr/bin/freeradius-tests.py' (Expected 0, got 0)
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
::   Duration: 1s
2018-06-06 19:24:54 +05:30
Björn Esser
b7902fd74a
Rebuilt for libjson-c.so.4 (json-c v0.13.1) 2018-03-06 15:15:03 +01:00
Igor Gnatenko
83d0428a1e
Escape macros in %changelog
Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2018-02-09 09:04:33 +01:00
Fedora Release Engineering
ab996217ec - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 10:09:48 +00:00
Björn Esser
074601dd02
Rebuilt for switch to libxcrypt 2018-01-20 23:06:43 +01:00
Iryna Shcherbina
ac797ee71b Update Python 2 dependency declarations to new packaging standards 2018-01-05 21:05:05 +01:00
Björn Esser
36a71aa388
Rebuilt for libjson-c.so.3 2017-12-10 20:50:33 +01:00
Nikolai Kondrashov
30bf3e1e02 Use mariadb-connector-c-devel instead of mysql/mariadb-devel 2017-10-26 21:52:32 +03:00
Zbigniew Jędrzejewski-Szmek
5821452012 Add Provides for the old name without %_isa 2017-08-20 09:27:35 -04:00
Zbigniew Jędrzejewski-Szmek
24ec0cc88b Python 2 binary package renamed to python2-freeradius 2017-08-19 09:38:16 -04:00
Fedora Release Engineering
07a5b04f1f - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 20:47:27 +00:00
Fedora Release Engineering
39d4d1b0e5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 08:45:30 +00:00
28 changed files with 1237 additions and 634 deletions

26
.gitignore vendored
View file

@ -1,3 +1,11 @@
# Ignore build artifacts and signatures
*.sig
.build*.log
freeradius-server-*/
x86_64/
freeradius-*.src.rpm
# Automatically added
/freeradius-server-2.1.9.tar.bz2
/freeradius-server-2.1.10.tar.bz2
/freeradius-server-2.1.11.tar.bz2
@ -20,3 +28,21 @@
/freeradius-server-3.0.13.tar.bz2
/freeradius-server-3.0.14.tar.bz2
/freeradius-server-3.0.15.tar.bz2
/freeradius-server-3.0.17.tar.bz2
/freeradius-server-3.0.18.tar.gz
/freeradius-server-3.0.18.tar.bz2
/freeradius-server-3.0.19.tar.bz2
/freeradius-server-3.0.20.tar.bz2
/freeradius-server-3.0.21.tar.bz2
/freeradius-server-3.0.22.tar.bz2
/freeradius-server-3.0.23.tar.bz2
/freeradius-server-3.0.24.tar.bz2
/freeradius-server-3.0.25.tar.bz2
/freeradius-server-3.2.0.tar.bz2
/freeradius-server-3.2.1.tar.bz2
/freeradius-server-3.2.2.tar.bz2
/freeradius-server-3.2.3.tar.bz2
/freeradius-server-3.2.4.tar.bz2
/freeradius-server-3.2.5.tar.bz2
/freeradius-server-3.2.7.tar.bz2
/freeradius-server-3.2.8.tar.bz2

View file

@ -1,385 +0,0 @@
#!/usr/bin/env python
import exceptions
import getopt
import os
import re
import rpm
import select
import subprocess
import sys
#------------------------------------------------------------------------------
def get_rlms(root):
rlm_re = re.compile(r'^rlm_')
version_re = re.compile(r'-[0-9.]+\.so$')
names = os.listdir(root)
names = [x for x in names if rlm_re.search(x)]
names = [x for x in names if not version_re.search(x)]
names.sort()
return names
#------------------------------------------------------------------------------
debug = False
verbose = False
exclude_rpms = ['glibc']
build = '2.0.2-1.fc8'
root_template = '/var/tmp/freeradius-%s-root-jdennis/usr/lib/freeradius'
libdirs = ['/lib','/usr/lib']
#------------------------------------------------------------------------------
def get_rpm_nvr_from_header(hdr):
'Given an RPM header return the package NVR as a string'
name = hdr['name']
version = hdr['version']
release = hdr['release']
return "%s-%s-%s" % (name, version, release)
def get_rpm_hdr_by_file_path(path):
if path is None:
return None
hdr = None
try:
ts = rpm.ts()
mi = ts.dbMatch(rpm.RPMTAG_BASENAMES, path)
for hdr in mi: break
except Exception, e:
print >> sys.stderr, "failed to retrieve rpm hdr for %s, %s" %(path, e)
hdr = None
return hdr
def get_rpm_nvr_by_file_path(path):
if path is None:
return None
hdr = get_rpm_hdr_by_file_path(path)
if not hdr:
print >> sys.stderr, "failed to retrieve rpm info for %s" %(path)
nvr = get_rpm_nvr_from_header(hdr)
return nvr
def get_rpm_name_by_file_path(path):
if path is None:
return None
hdr = get_rpm_hdr_by_file_path(path)
if not hdr:
print >> sys.stderr, "failed to retrieve rpm info for %s" %(path)
name = hdr['name']
return name
#------------------------------------------------------------------------------
class CmdError(exceptions.Exception):
def __init__(self, errno, msg):
self.errno = errno
self.msg = msg
class Command:
def __init__(self, cmd):
self.cmd = cmd
self.sub_process = None
self.bufsize = 1024
self.stdout_buf = ''
self.stderr_buf = ''
self.stdout_lines = []
self.stderr_lines = []
def run(self, stdout_callback=None, stderr_callback=None):
self.sub_process = subprocess.Popen(self.cmd, \
stdin=None, stdout=subprocess.PIPE, stderr=subprocess.PIPE, \
close_fds=True, shell=True)
self.stdout = self.sub_process.stdout
self.stderr = self.sub_process.stderr
read_watch = [self.stdout, self.stderr]
while read_watch:
readable = select.select(read_watch, [], [])[0]
for fd in readable:
if fd == self.stdout:
data = os.read(fd.fileno(), self.bufsize)
if not data:
read_watch.remove(fd)
else:
self.stdout_buf += data
for line in self.burst_lines('stdout_buf'):
if stdout_callback: stdout_callback(line)
self.stdout_lines.append(line)
if fd == self.stderr:
data = os.read(fd.fileno(), self.bufsize)
if not data:
read_watch.remove(fd)
else:
self.stderr_buf += data
for line in self.burst_lines('stderr_buf'):
if stdout_callback: stderr_callback(line)
self.stderr_lines.append(line)
self.returncode = self.sub_process.wait()
if self.returncode:
raise CmdError(self.returncode, "cmd \"%s\"\nreturned status %d\n%s" % (self.cmd, self.returncode, ''.join(self.stderr_lines)))
return self.returncode
def burst_lines(self, what):
buf = getattr(self, what)
start = 0
end = buf.find('\n', start)
while end >= 0:
end += 1 # include newline
line = buf[start:end]
yield line
start = end
end = buf.find('\n', start)
buf = buf[start:]
setattr(self, what, buf)
#------------------------------------------------------------------------------
def get_so_requires(path):
requires = {}
cmd = 'ldd %s' % (path)
so_re = re.compile(r'^\s*(\S+)\s+=>\s+(\S+)')
c = Command(cmd)
status = c.run()
for line in c.stdout_lines:
line = line.strip()
match = so_re.search(line)
if match:
so_name = match.group(1)
if match.group(2).startswith('/'):
so_path = match.group(2)
else:
so_path = None
requires[so_name] = so_path
return requires
def get_so_needed(path):
needed = []
cmd = 'readelf -d %s' % (path)
so_re = re.compile(r'\(NEEDED\)\s+Shared library:\s+\[([^\]]+)\]')
c = Command(cmd)
status = c.run()
for line in c.stdout_lines:
line = line.strip()
match = so_re.search(line)
if match:
so_name = match.group(1)
needed.append(so_name)
return needed
def format_size(size):
if size > 1000000000:
return '%.1f GB' % (size/1000000000.0)
if size > 1000000:
return '%.1f MB' % (size/1000000.0)
if size > 1000:
return '%.1f KB' % (size/1000.0)
return '%d' % (size)
#------------------------------------------------------------------------------
class RPM_Prop:
def __init__(self, path=None, name=None):
self.name = name
self.paths = {}
self.rpm_hdr = None
self.used_by = {}
if path:
self.register_path(path)
if not self.rpm_hdr:
self.rpm_hdr = get_rpm_hdr_by_file_path(path)
if self.rpm_hdr:
if not self.name:
self.name = self.rpm_hdr[rpm.RPMTAG_NAME]
self.size = self.rpm_hdr[rpm.RPMTAG_SIZE]
def __str__(self):
return "name=%s paths=%s" % (self.name, ','.join(self.paths.keys()))
def register_path(self, path, name=None):
if debug: print "%s.register_path: path=%s" % (self.__class__.__name__, path)
return self.paths.setdefault(path, path)
class RPM_Collection:
def __init__(self):
self.names = {}
self.paths = {}
def __str__(self):
text = ''
names = self.get_names()
for name in names:
text += "%s: %s\n" % (name, self.names[name])
return text
def register_path(self, path):
if debug: print "%s.register_path: path=%s" % (self.__class__.__name__, path)
rpm_prop = self.paths.get(path)
if not rpm_prop:
rpm_prop = self.paths.setdefault(path, RPM_Prop(path=path))
self.names.setdefault(rpm_prop.name, rpm_prop)
return rpm_prop
def get_names(self):
names = self.names.keys()
names.sort()
return names
def get_name(self, name):
return self.names.get(name)
class SO_File:
def __init__(self, name=None, path=None):
self.name = name
self.path = path
self.rpm = None
def __str__(self):
if self.rpm:
rpm_name = self.rpm.name
else:
rpm_name = None
return "name=%s rpm=%s" % (self.name, rpm_name)
class SO_Collection:
def __init__(self):
self.names = {}
self.paths = {}
def __str__(self):
text = ''
names = self.get_names()
for name in names:
text += "%s: %s\n" % (name, self.names[name])
return text
def register_path(self, path, name=None):
if debug: print "%s.register_path: path=%s" % (self.__class__.__name__, path)
so_prop = self.paths.get(path)
if not so_prop:
so_prop = self.paths.setdefault(path, SO_File(name, path=path))
self.names.setdefault(name, so_prop)
return so_prop
def get_names(self):
names = self.names.keys()
names.sort()
return names
class LoadableModule:
def __init__(self, path, name=None):
if name is None:
name = os.path.basename(path)
self.name = name
self.path = path
self.rpm_names = {}
self.sos = SO_Collection()
self.get_so_requires()
def __str__(self):
text = '%s\n' % (self.name)
text += " RPM's: %s\n" % (','.join(self.get_rpm_names()))
text += " SO's: %s\n" % (','.join(self.sos.get_names()))
return text
def get_so_requires(self):
requires = get_so_requires(self.path)
needed = get_so_needed(self.path)
#print "%s requires=%s" % (self.name, requires)
#print "%s needed=%s" % (self.name, needed)
for so_name, so_path in requires.items():
if so_name not in needed: continue
if so_path:
so_prop = self.sos.register_path(so_path, so_name)
rpm_prop = rpms.register_path(so_prop.path)
rpm_prop.used_by[self.name] = 1
self.rpm_names.setdefault(rpm_prop.name, rpm_prop.name)
so_prop.rpm = rpm_prop
else:
so_prop = None
if verbose: print "found so='%s' %s" % (so_name, so_prop)
def register_so(self, so):
if debug: print "%s.register_so: so=%s" % (self.__class__.__name__, so)
self.sos.setdefault(so, so)
self.names.setdefault(so.name, so)
return so
def get_rpm_names(self):
rpm_names = self.rpm_names.keys()
rpm_names.sort()
return rpm_names
def get_sos(self):
sos = self.sos.keys()
sos.sort(lambda a,b: cmp(a.name, b.name))
return sos
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
opts, args = getopt.getopt(sys.argv[1:], "b:v", ['build=','verbose'])
for o, a in opts:
if o in ['-b', '--build']:
build = a
elif o in ['-v', '--verbose']:
verbose = True
else:
print >> sys.stderr, "Unknown arg: %s" % o
sys.exit(1)
root = root_template % build
modules = get_rlms(root)
module_paths = [os.path.join(root,x) for x in modules]
rpms = RPM_Collection()
lms = []
for module_path in module_paths[:]:
lm = LoadableModule(module_path)
lms.append(lm)
print "RLM Modules(%s): %s\n" % (len(modules), ','.join(modules))
for lm in lms:
rpm_names = [x for x in lm.get_rpm_names() if x not in exclude_rpms]
if rpm_names:
print lm.name
print ' %s' % (','.join(rpm_names))
print "--------------"
rpm_props = [x for x in rpms.names.values() if len(x.used_by) and x.name not in exclude_rpms]
rpm_props.sort(lambda a,b: cmp(a.name, b.name))
for rpm_prop in rpm_props:
used_by = rpm_prop.used_by.keys()
used_by.sort()
print "%s: %s" % (rpm_prop.name, ','.join(used_by))
print "--------------"
rpm_props.sort(lambda a,b: cmp(a.size, b.size))
for rpm_prop in rpm_props:
print '%10s %s' % (format_size(rpm_prop.size), rpm_prop.name)
print "--------------"
for lm in lms:
print lm

View file

@ -3,33 +3,36 @@ From: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Date: Mon, 8 Sep 2014 12:32:13 +0300
Subject: [PATCH] Adjust configuration to fit Red Hat specifics
[antorres@redhat.com]: update patch to match 3.2.7 release
---
raddb/mods-available/eap | 4 ++--
raddb/radiusd.conf.in | 7 +++----
2 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/raddb/mods-available/eap b/raddb/mods-available/eap
index 2621e183c..94494b2c6 100644
index 84660d7c1e..ffcef4b406 100644
--- a/raddb/mods-available/eap
+++ b/raddb/mods-available/eap
@@ -472,7 +472,7 @@ eap {
@@ -696,7 +696,7 @@ eap {
# and create the temporary directory with the
# systemd `RuntimeDirectory` unit option.
#
# You should also delete all of the files
# in the directory when the server starts.
- # tmpdir = /tmp/radiusd
+ # tmpdir = /var/run/radiusd/tmp
- # tmpdir = /tmp/radiusd
+ # tmpdir = /var/run/radiusd/tmp
# The command used to verify the client cert.
# We recommend using the OpenSSL command-line
@@ -486,7 +486,7 @@ eap {
# in PEM format. This file is automatically
@@ -711,7 +711,7 @@ eap {
# deleted by the server when the command
# returns.
- # client = "/path/to/openssl verify -CApath ${..ca_path} %{TLS-Client-Cert-Filename}"
+ # client = "/usr/bin/openssl verify -CApath ${..ca_path} %{TLS-Client-Cert-Filename}"
#
- # client = "/path/to/openssl verify -CApath ${..ca_path} %{TLS-Client-Cert-Filename}"
+ # client = "/usr/bin/openssl verify -CApath ${..ca_path} %{TLS-Client-Cert-Filename}"
}
#
# OCSP Configuration
diff --git a/raddb/radiusd.conf.in b/raddb/radiusd.conf.in
index a83c1f687..e500cf97b 100644
--- a/raddb/radiusd.conf.in

View file

@ -1,33 +1,44 @@
From d78bf5ab1f5c8102b2b6051cfb1198488be9597d Mon Sep 17 00:00:00 2001
From: Nikolai Kondrashov <Nikolai.Kondrashov@redhat.com>
Date: Mon, 26 Sep 2016 19:48:36 +0300
Subject: [PATCH] Use system crypto policy by default
From a7ed62fbcc043a9ec7a4f09962a2cd2acffa019b Mon Sep 17 00:00:00 2001
From: Alexander Scheel <ascheel@redhat.com>
Date: Wed, 8 May 2019 10:16:31 -0400
Subject: [PATCH] Use system-provided crypto-policies by default
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
[antorres@redhat.com]: update patch to 3.2.1 state
---
raddb/mods-available/eap | 2 +-
raddb/mods-available/eap | 4 ++--
raddb/mods-available/inner-eap | 2 +-
raddb/sites-available/abfab-tls | 2 +-
raddb/sites-available/tls | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/raddb/mods-available/eap b/raddb/mods-available/eap
index 94494b2c6..9a8dc9327 100644
index 62152a6dfc..9f64963034 100644
--- a/raddb/mods-available/eap
+++ b/raddb/mods-available/eap
@@ -323,7 +323,7 @@ eap {
#
# For EAP-FAST, use "ALL:!EXPORT:!eNULL:!SSLv2"
@@ -400,7 +400,7 @@ eap {
# TLS cipher suites. The format is listed
# in "man 1 ciphers".
#
- cipher_list = "DEFAULT"
+ cipher_list = "PROFILE=SYSTEM"
# If enabled, OpenSSL will use server cipher list
# (possibly defined by cipher_list option above)
# Set this option to specify the allowed
# TLS signature algorithms for OpenSSL 1.1.1 and above.
@@ -1082,7 +1082,7 @@ eap {
# "DEFAULT" as "DEFAULT" contains "!aNULL" so instead it is
# recommended "ALL:!EXPORT:!eNULL:!SSLv2" is used
#
- # cipher_list = "ALL:!EXPORT:!eNULL:!SSLv2"
+ # cipher_list = "PROFILE=SYSTEM"
# PAC lifetime in seconds (default: seven days)
#
diff --git a/raddb/mods-available/inner-eap b/raddb/mods-available/inner-eap
index 2b4df6267..af9aa88cd 100644
index 576eb7739e..ffa07188e2 100644
--- a/raddb/mods-available/inner-eap
+++ b/raddb/mods-available/inner-eap
@@ -68,7 +68,7 @@ eap inner-eap {
@@ -77,7 +77,7 @@ eap inner-eap {
# certificates. If so, edit this file.
ca_file = ${cadir}/ca.pem
@ -37,23 +48,23 @@ index 2b4df6267..af9aa88cd 100644
# You may want to set a very small fragment size.
# The TLS data here needs to go inside of the
diff --git a/raddb/sites-available/abfab-tls b/raddb/sites-available/abfab-tls
index 5dbe143da..46b5fea78 100644
index b8d0626bbe..073b2933c2 100644
--- a/raddb/sites-available/abfab-tls
+++ b/raddb/sites-available/abfab-tls
@@ -19,7 +19,7 @@ listen {
@@ -20,7 +20,7 @@ listen {
dh_file = ${certdir}/dh
fragment_size = 8192
ca_path = ${cadir}
- cipher_list = "DEFAULT"
+ cipher_list = "PROFILE=SYSTEM"
cache {
enable = no
lifetime = 24 # hours
diff --git a/raddb/sites-available/tls b/raddb/sites-available/tls
index cf1cd7a8a..7dd59cb6f 100644
index 137fcbc6cc..a65f8a8711 100644
--- a/raddb/sites-available/tls
+++ b/raddb/sites-available/tls
@@ -197,7 +197,7 @@ listen {
@@ -292,7 +292,7 @@ listen {
# Set this option to specify the allowed
# TLS cipher suites. The format is listed
# in "man 1 ciphers".
@ -62,15 +73,15 @@ index cf1cd7a8a..7dd59cb6f 100644
# If enabled, OpenSSL will use server cipher list
# (possibly defined by cipher_list option above)
@@ -499,7 +499,7 @@ home_server tls {
@@ -676,7 +676,7 @@ home_server tls {
# Set this option to specify the allowed
# TLS cipher suites. The format is listed
# in "man 1 ciphers".
- cipher_list = "DEFAULT"
+ cipher_list = "PROFILE=SYSTEM"
}
}
#
# Connection timeout for outgoing TLS connections.
--
2.13.2
2.21.0

View file

@ -1,21 +0,0 @@
#!/bin/sh -e
parentdir=`dirname $0`
cd $parentdir
parentdir=`pwd`
libtoolize -f -c
#aclocal
autoheader
autoconf
mysubdirs="$mysubdirs `find src/modules/ -name configure -print | sed 's%/configure%%'`"
mysubdirs=`echo $mysubdirs`
for F in $mysubdirs
do
echo "Configuring in $F..."
(cd $F && grep "^AC_CONFIG_HEADER" configure.in > /dev/null && autoheader -I$parentdir)
(cd $F && autoconf -I$parentdir)
done

View file

@ -0,0 +1,89 @@
From acaf4be8e301a01041acba189194d9502994611d Mon Sep 17 00:00:00 2001
From: Alexander Scheel <ascheel@redhat.com>
Date: Wed, 13 May 2020 10:01:47 -0400
Subject: [PATCH] Don't clobber existing files on bootstrap
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
---
raddb/certs/bootstrap | 31 +++++++++++++++----------------
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/raddb/certs/bootstrap b/raddb/certs/bootstrap
index ede09bc..e555491 100755
--- a/raddb/certs/bootstrap
+++ b/raddb/certs/bootstrap
@@ -20,56 +20,55 @@ cd `dirname $0`
# Don't edit the following text. Instead, edit the Makefile, and
# re-generate these commands.
#
-if [ ! -f dh ]; then
+if [ ! -e dh ]; then
openssl dhparam -out dh 2048 || exit 1
- if [ -e /dev/urandom ] ; then
- ln -sf /dev/urandom random
- else
- date > ./random;
- fi
+ ln -sf /dev/urandom random
fi
-if [ ! -f server.key ]; then
+if [ ! -e server.key ]; then
openssl req -new -out server.csr -keyout server.key -config ./server.cnf || exit 1
chmod g+r server.key
fi
-if [ ! -f ca.key ]; then
+if [ ! -e ca.key ]; then
openssl req -new -x509 -keyout ca.key -out ca.pem -days `grep default_days ca.cnf | sed 's/.*=//;s/^ *//'` -config ./ca.cnf || exit 1
fi
-if [ ! -f index.txt ]; then
+if [ ! -e index.txt ]; then
touch index.txt
fi
-if [ ! -f serial ]; then
+if [ ! -e serial ]; then
echo '01' > serial
fi
-if [ ! -f server.crt ]; then
+if [ ! -e server.crt ]; then
openssl ca -batch -keyfile ca.key -cert ca.pem -in server.csr -key `grep output_password ca.cnf | sed 's/.*=//;s/^ *//'` -out server.crt -extensions xpserver_ext -extfile xpextensions -config ./server.cnf || exit 1
fi
-if [ ! -f server.p12 ]; then
+if [ ! -e server.p12 ]; then
openssl pkcs12 -export -in server.crt -inkey server.key -out server.p12 -passin pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` -passout pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` || exit 1
chmod g+r server.p12
fi
-if [ ! -f server.pem ]; then
+if [ ! -e server.pem ]; then
openssl pkcs12 -in server.p12 -out server.pem -passin pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` -passout pass:`grep output_password server.cnf | sed 's/.*=//;s/^ *//'` || exit 1
openssl verify -CAfile ca.pem server.pem || exit 1
chmod g+r server.pem
fi
-if [ ! -f ca.der ]; then
+if [ ! -e ca.der ]; then
openssl x509 -inform PEM -outform DER -in ca.pem -out ca.der || exit 1
fi
-if [ ! -f client.key ]; then
+if [ ! -e client.key ]; then
openssl req -new -out client.csr -keyout client.key -config ./client.cnf
chmod g+r client.key
fi
-if [ ! -f client.crt ]; then
+if [ ! -e client.crt ]; then
openssl ca -batch -keyfile ca.key -cert ca.pem -in client.csr -key `grep output_password ca.cnf | sed 's/.*=//;s/^ *//'` -out client.crt -extensions xpclient_ext -extfile xpextensions -config ./client.cnf
fi
+
+chown root:radiusd dh ca.* client.* server.*
+chmod 640 dh ca.* client.* server.*
--
2.26.2

View file

@ -0,0 +1,29 @@
From ea164ceafa05f96079204a3f0ae379e46e64a455 Mon Sep 17 00:00:00 2001
From: Alexander Scheel <ascheel@redhat.com>
Date: Tue, 4 Aug 2020 10:08:15 -0400
Subject: [PATCH] Fix permissions after generating certificates with make
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
---
raddb/certs/bootstrap | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/raddb/certs/bootstrap b/raddb/certs/bootstrap
index 336a2bd..9920ecf 100755
--- a/raddb/certs/bootstrap
+++ b/raddb/certs/bootstrap
@@ -21,7 +21,10 @@ make -h > /dev/null 2>&1
#
if [ "$?" = "0" ]; then
make all
- exit $?
+ ret=$?
+ chown root:radiusd dh ca.* client.* server.*
+ chmod 640 dh ca.* client.* server.*
+ exit $ret
fi
#
--
2.26.2

View file

@ -0,0 +1,35 @@
The backtrace_symbols function expects a pointer to an array of void *
values, not a pointer to an array of a single element. Removing the
address operator ensures that the right type is used.
This avoids an unconditional failure of this probe with compilers that
treat incompatible pointer types as a compilation error.
Submitted upstream: <https://github.com/FreeRADIUS/freeradius-server/pull/5246>
diff --git a/configure b/configure
index ed01ee2bdd912f63..1e6d2284779cdd58 100755
--- a/configure
+++ b/configure
@@ -13390,7 +13390,7 @@ main (void)
{
void *sym[1];
- backtrace_symbols(&sym, sizeof(sym))
+ backtrace_symbols(sym, sizeof(sym))
;
return 0;
}
diff --git a/configure.ac b/configure.ac
index 76320213b51d7bb4..6a689711d6c90483 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2168,7 +2168,7 @@ if test "x$ac_cv_header_execinfo_h" = "xyes"; then
#include <execinfo.h>
]], [[
void *sym[1];
- backtrace_symbols(&sym, sizeof(sym)) ]])],[
+ backtrace_symbols(sym, sizeof(sym)) ]])],[
AC_MSG_RESULT(yes)
ac_cv_lib_execinfo_backtrace_symbols="yes"
],[

View file

@ -0,0 +1,35 @@
From: Antonio Torres <antorres@redhat.com>
Date: Tue, 12 Sep 2023
Subject: Ease OpenSSL version check requirement
FreeRADIUS includes an OpenSSL version check that compares built vs linked version,
and fails to start if this check fails. We can ease this requirement in Fedora/RHEL as
ABI changes are tracked and soname is changed accordingly, as discussed in previous
Bugzilla for this issue [1].
[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1299388
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2238511
Signed-off-by: Antonio Torres <antorres@redhat.com>
---
src/main/version.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/version.c b/src/main/version.c
index c190337c1d..fee2150eb2 100644
--- a/src/main/version.c
+++ b/src/main/version.c
@@ -79,11 +79,11 @@ int ssl_check_consistency(void)
*/
if ((ssl_linked & 0x0000000f) != (ssl_built & 0x0000000f)) {
mismatch:
- ERROR("libssl version mismatch. built: %lx linked: %lx",
+ DEBUG2("libssl version mismatch. built: %lx linked: %lx",
(unsigned long) ssl_built,
(unsigned long) ssl_linked);
- return -1;
+ return 0;
}
/*

View file

@ -0,0 +1,31 @@
From: Antonio Torres <antorres@redhat.com>
Date: Fri, 28 Jan 2022
Subject: Use infinite timeout when using LDAP+start-TLS
This will ensure that the TLS connection to the LDAP server will complete
before starting FreeRADIUS, as it forces libldap to use a blocking socket during
the process. Infinite timeout is the OpenLDAP default.
Avoids this: https://git.openldap.org/openldap/openldap/-/blob/87ffc60006298069a5a044b8e63dab27a61d3fdf/libraries/libldap/tls2.c#L1134
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1992551
Signed-off-by: Antonio Torres <antorres@redhat.com>
---
src/modules/rlm_ldap/ldap.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/modules/rlm_ldap/ldap.c b/src/modules/rlm_ldap/ldap.c
index cf7a84e069..841bf888a1 100644
--- a/src/modules/rlm_ldap/ldap.c
+++ b/src/modules/rlm_ldap/ldap.c
@@ -1472,7 +1472,10 @@ void *mod_conn_create(TALLOC_CTX *ctx, void *instance)
}
#ifdef LDAP_OPT_NETWORK_TIMEOUT
- if (inst->net_timeout) {
+ bool using_tls = inst->start_tls ||
+ inst->port == 636 ||
+ strncmp(inst->server, "ldaps://", strlen("ldaps://")) == 0;
+ if (inst->net_timeout && !using_tls) {
memset(&tv, 0, sizeof(tv));
tv.tv_sec = inst->net_timeout;

View file

@ -14,6 +14,7 @@
nocreate
missingok
compress
su radiusd radiusd
}
/var/log/radius/checkrad.log {
@ -22,6 +23,7 @@
create
missingok
compress
su radiusd radiusd
}
/var/log/radius/radius.log {
@ -30,8 +32,9 @@
create
missingok
compress
su radiusd radiusd
postrotate
/usr/bin/systemctl reload-or-try-restart radiusd
/usr/bin/systemctl try-reload-or-restart radiusd
endscript
}
@ -41,6 +44,7 @@
create
compress
missingok
su radiusd radiusd
}
/var/log/radius/sqltrace.sql {
monthly
@ -48,4 +52,5 @@
create
compress
missingok
su radiusd radiusd
}

View file

@ -0,0 +1,105 @@
From e6f7c9d4c2af1cda7760ca8155166bb5d4d541d0 Mon Sep 17 00:00:00 2001
From: Alexander Scheel <ascheel@redhat.com>
Date: Wed, 8 May 2019 12:58:02 -0400
Subject: [PATCH] Don't generate certificates in reproducible builds
[antorres@redhat.com]: updated to match upstream release 3.2.7
Signed-off-by: Alexander Scheel <ascheel@redhat.com>
---
Make.inc.in | 5 +++++
configure | 3 +++
configure.ac | 3 +++
raddb/all.mk | 4 ++++
4 files changed, 15 insertions(+)
diff --git a/Make.inc.in b/Make.inc.in
index 0b2cd74de8..8c623cf95c 100644
--- a/Make.inc.in
+++ b/Make.inc.in
@@ -174,6 +174,10 @@ else
TESTBIN = ./$(BUILD_DIR)/bin
endif
+#
+# With reproducible builds, do not generate certificates during installation
+#
+ENABLE_REPRODUCIBLE_BUILDS = @ENABLE_REPRODUCIBLE_BUILDS@
#
# For creating documentation via doc/all.mk
diff --git a/configure b/configure
index f1dfa97c44..ba5c53768d 100755
--- a/configure
+++ b/configure
@@ -681,6 +681,7 @@ ACLOCAL
LAST
RUSERS
SNMPWALK
+ENABLE_REPRODUCIBLE_BUILDS
SNMPGET
openssl_version_check_config
WITH_RADLAST
@@ -7001,6 +7002,7 @@ fi
# Check whether --enable-reproducible-builds was given.
+ENABLE_REPRODUCIBLE_BUILDS=yes
if test ${enable_reproducible_builds+y}
then :
enableval=$enable_reproducible_builds; case "$enableval" in
@@ -7012,6 +7014,7 @@ printf "%s\n" "#define ENABLE_REPRODUCIBLE_BUILDS 1" >>confdefs.h
;;
*)
reproducible_builds=no
+ ENABLE_REPRODUCIBLE_BUILDS=no
esac
fi
diff --git a/configure.ac b/configure.ac
index ce4d9b0ae5..790cbf02a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -697,6 +697,7 @@ AC_SUBST([openssl_version_check_config])
dnl #
dnl # extra argument: --enable-reproducible-builds
dnl #
+ENABLE_REPRODUCIBLE_BUILDS=yes
AC_ARG_ENABLE(reproducible-builds,
[AS_HELP_STRING([--enable-reproducible-builds],
[ensure the build does not change each time])],
@@ -708,8 +709,10 @@ AC_ARG_ENABLE(reproducible-builds,
;;
*)
reproducible_builds=no
+ ENABLE_REPRODUCIBLE_BUILDS=no
esac ]
)
+AC_SUBST(ENABLE_REPRODUCIBLE_BUILDS)
dnl #
dnl # Enable the -fsanitize=fuzzer and link in the address sanitizer
dnl #############################################################
diff --git a/raddb/all.mk b/raddb/all.mk
index c966edd657..c8e976a499 100644
--- a/raddb/all.mk
+++ b/raddb/all.mk
@@ -124,7 +124,11 @@ $(R)$(raddbdir)/users: $(R)$(modconfdir)/files/authorize
ifneq "$(LOCAL_CERT_PRODUCTS)" ""
$(LOCAL_CERT_PRODUCTS):
@echo BOOTSTRAP raddb/certs/
+ifeq "$(ENABLE_REPRODUCIBLE_BUILDS)" "yes"
+ @$(MAKE) -C $(R)$(raddbdir)/certs/ passwords.mk
+else
@$(MAKE) -C $(R)$(raddbdir)/certs/
+endif
# Bootstrap is special
$(R)$(raddbdir)/certs/bootstrap: | raddb/certs/bootstrap $(LOCAL_CERT_PRODUCTS)
--
2.21.0

View file

@ -0,0 +1,28 @@
From: Antonio Torres <antorres@redhat.com>
Date: Wed, 5 Mar 2025
Subject: Remove sqlippool tool
This script relies on a Perl package, perl-Net-IP, that won't be available.
Remove it from build script and let the user pull it manually instead, as it's
just a helper script for SQL module users.
---
diff --git a/scripts/all.mk b/scripts/all.mk
index a6e90aa3eb..517adb8590 100644
--- a/scripts/all.mk
+++ b/scripts/all.mk
@@ -1,5 +1,5 @@
install: $(R)$(sbindir)/rc.radiusd $(R)$(sbindir)/raddebug \
- $(R)$(bindir)/radsqlrelay $(R)$(bindir)/radcrypt $(R)$(bindir)/rlm_sqlippool_tool
+ $(R)$(bindir)/radsqlrelay $(R)$(bindir)/radcrypt
$(R)$(sbindir)/rc.radiusd: scripts/rc.radiusd
@mkdir -p $(dir $@)
@@ -16,7 +16,3 @@ $(R)$(bindir)/radsqlrelay: scripts/sql/radsqlrelay
$(R)$(bindir)/radcrypt: scripts/cryptpasswd
@mkdir -p $(dir $@)
@$(INSTALL) -m 755 $< $@
-
-$(R)$(bindir)/rlm_sqlippool_tool: scripts/sql/rlm_sqlippool_tool
- @mkdir -p $(dir $@)
- @$(INSTALL) -m 755 $< $@

View file

@ -0,0 +1,54 @@
diff --git a/configure b/configure
index 1e6d228..40a26f5 100755
--- a/configure
+++ b/configure
@@ -10518,7 +10518,7 @@ smart_prefix=
printf "%s\n" "#define HAVE_OPENSSL_SSL_H 1" >>confdefs.h
- for ac_header in openssl/asn1.h openssl/conf.h openssl/crypto.h openssl/err.h openssl/evp.h openssl/hmac.h openssl/md5.h openssl/md4.h openssl/rand.h openssl/sha.h openssl/ssl.h openssl/ocsp.h openssl/engine.h
+ for ac_header in openssl/asn1.h openssl/conf.h openssl/crypto.h openssl/err.h openssl/evp.h openssl/hmac.h openssl/md5.h openssl/md4.h openssl/rand.h openssl/sha.h openssl/ssl.h openssl/ocsp.h
do :
as_ac_Header=`printf "%s\n" "ac_cv_header_$ac_header" | $as_tr_sh`
ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
diff --git a/configure.ac b/configure.ac
index 6a68971..4a95148 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1449,8 +1449,7 @@ if test "x$WITH_OPENSSL" = xyes; then
openssl/rand.h \
openssl/sha.h \
openssl/ssl.h \
- openssl/ocsp.h \
- openssl/engine.h,
+ openssl/ocsp.h,
[ OPENSSL_CPPFLAGS="$smart_include" ],
[
AC_MSG_FAILURE([failed locating OpenSSL headers. Use --with-openssl-include-dir=<path>, or --with-openssl=no (builds without OpenSSL)])
diff --git a/src/include/autoconf.h.in b/src/include/autoconf.h.in
index 4774482..21d5cea 100644
--- a/src/include/autoconf.h.in
+++ b/src/include/autoconf.h.in
@@ -285,9 +285,6 @@
/* Define to 1 if you have the <openssl/crypto.h> header file. */
#undef HAVE_OPENSSL_CRYPTO_H
-/* Define to 1 if you have the <openssl/engine.h> header file. */
-#undef HAVE_OPENSSL_ENGINE_H
-
/* Define to 1 if you have the <openssl/err.h> header file. */
#undef HAVE_OPENSSL_ERR_H
diff --git a/src/include/tls-h b/src/include/tls-h
index 506fb19..514e03a 100644
--- a/src/include/tls-h
+++ b/src/include/tls-h
@@ -37,7 +37,7 @@ RCSIDH(tls_h, "$Id$")
# define OPENSSL_NO_KRB5
#endif
#include <openssl/err.h>
-#ifdef HAVE_OPENSSL_ENGINE_H
+#ifndef OPENSSL_NO_ENGINE
# include <openssl/engine.h>
#endif
#include <openssl/ssl.h>

View file

@ -1,113 +0,0 @@
#!/bin/sh
#
# radiusd Start/Stop the FreeRADIUS daemon
#
# chkconfig: - 88 10
# description: Extensible, configurable, high performance RADIUS server.
### BEGIN INIT INFO
# Provides: radiusd
# Required-Start: $network
# Required-Stop:
# Default-Start:
# Default-Stop:
# Should-Start: $time $syslog mysql ldap postgresql samba krb5-kdc
# Should-Stop:
# Short-Description: FreeRADIUS server
# Description: Extensible, configurable, high performance RADIUS server.
### END INIT INFO
# Source function library.
. /etc/rc.d/init.d/functions
prog=radiusd
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
exec=${exec:=/usr/sbin/$prog}
config_dir=${config_dir:=/etc/raddb}
config=${config:=$config_dir/radiusd.conf}
pidfile=${pidfile:=/var/run/$prog/$prog.pid}
lockfile=${lockfile:=/var/lock/subsys/radiusd}
start() {
[ -x $exec ] || exit 5
[ -f $config ] || exit 6
echo -n $"Starting $prog: "
daemon --pidfile $pidfile $exec -d $config_dir
retval=$?
echo
[ $retval -eq 0 ] && touch $lockfile
return $retval
}
stop() {
echo -n $"Stopping $prog: "
killproc -p $pidfile $prog
retval=$?
echo
[ $retval -eq 0 ] && rm -f $lockfile
return $retval
}
restart() {
stop
start
}
reload() {
# radiusd may not be capable of a 100% configuration reload depending
# on which loadable modules are in use, if sending the server a
# HUP is not sufficient then use restart here instead. However, we
# prefer by default to use HUP since it's what is usually desired.
#
# restart
kill -HUP `pidofproc -p $pidfile $prog`
}
force_reload() {
restart
}
rh_status() {
# run checks to determine if the service is running or use generic status
status -p $pidfile $prog
}
rh_status_q() {
rh_status >/dev/null 2>&1
}
case "$1" in
start)
rh_status_q && exit 0
$1
;;
stop)
rh_status_q || exit 0
$1
;;
restart)
$1
;;
reload)
rh_status_q || exit 7
$1
;;
force-reload)
force_reload
;;
status)
rh_status
;;
condrestart|try-restart)
rh_status_q || exit 0
restart
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit 2
esac
exit $?

View file

@ -1 +1 @@
D /var/run/radiusd 0710 radiusd radiusd -
D /run/radiusd 0710 radiusd radiusd -

File diff suppressed because it is too large Load diff

3
freeradius.sysusers Normal file
View file

@ -0,0 +1,3 @@
#Type Name ID GECOS Home directory Shell
u radiusd 95 "radiusd user" /var/lib/radiusd /sbin/nologin
g radiusd 95 - - -

View file

@ -1,11 +1,11 @@
[Unit]
Description=FreeRADIUS high performance RADIUS server.
After=syslog.target network.target ipa.service dirsrv.target krb5kdc.service
After=syslog.target network-online.target ipa.service dirsrv.target krb5kdc.service mysql.service mariadb.service postgresql.service
[Service]
Type=forking
PIDFile=/var/run/radiusd/radiusd.pid
ExecStartPre=-/bin/chown -R radiusd.radiusd /var/run/radiusd
ExecStartPre=-/bin/chown -R radiusd:radiusd /var/run/radiusd
ExecStartPre=/usr/sbin/radiusd -C
ExecStart=/usr/sbin/radiusd -d /etc/raddb
ExecReload=/usr/sbin/radiusd -C

3
rpminspect.yaml Normal file
View file

@ -0,0 +1,3 @@
---
inspections:
badfuncs: off

View file

@ -1 +1 @@
SHA512 (freeradius-server-3.0.15.tar.bz2) = a2808f0b70b73f11c4c7d00edcb4a56a2ab8f73ce0ff74a9834c8b613ce5ed75ece372f852b0891f68c6a33f50c1bababb76d2eff9326a7fc29fe6b45ec9af88
SHA512 (freeradius-server-3.2.8.tar.bz2) = 31db199c3847bfdb80b726e16cece0d660bd741fae0fca8ba96aaaee30972c657438c4e1fdaa7ef070f84d8b7889a8da8db1defc542b0c0e18f247156f17e0ae

36
tests/auth-tests/Makefile Normal file
View file

@ -0,0 +1,36 @@
# SPDX-License-Identifier: LGPL-2.1+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/freeradius
# Description: Test if freeradius authentication workd ok
# Author: Susant Sahani<susant@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/freeradius
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
test -x runtest.sh || chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Susant Sahani<susant@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test if the ABI hasn't changed" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: freeradius" >> $(METADATA)
@echo "Requires: freeradius" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
@echo "Releases: -Fedora 28" >> $(METADATA)
rhts-lint $(METADATA)

3
tests/auth-tests/PURPOSE Normal file
View file

@ -0,0 +1,3 @@
PURPOSE of /CoreOS/freeradius
Description: tests for freeradius
Author: Susant Sahani<susant@redhat.com>

View file

@ -0,0 +1,2 @@
fedora-ci Cleartext-Password := "password"
Reply-Message = "Hello, %{User-Name}"

View file

@ -0,0 +1,6 @@
client localhost {
ipaddr = 127.0.0.1
secret = testing123
require_message_authenticator = no
nastype = other
}

View file

@ -0,0 +1,67 @@
#!/usr/bin/env python3
# SPDX-License-Identifier: LGPL-2.1+
# ~~~
# Description: Tests for freeradius
#
# Author: Susant Sahani <susant@redhat.com>
# Copyright (c) 2018 Red Hat, Inc.
# ~~~
import errno
import os
import sys
import time
import unittest
import subprocess
import signal
import shutil
import socket
RADIUSD_PID_FILE='/var/run/radiusd/radiusd.pid'
def setUpModule():
"""Initialize the environment, and perform sanity checks on it."""
if shutil.which('radiusd') is None:
raise OSError(errno.ENOENT, 'radiusd not found')
if shutil.which('radtest') is None:
raise OSError(errno.ENOENT, 'radtest not found')
if subprocess.call(['systemctl', 'is-active', '--quiet',
'radiusd.service']) == 0:
raise unittest.SkipTest('radiusd.service is already active')
def tearDownModule():
pass
class GenericUtilities():
"""Provide a set of utility functions start stop daemons. write config files etc """
def StartRadiusServer(self):
"""Start radiusd"""
subprocess.check_output(['systemctl', 'start', 'radiusd'])
def StopRadiusServer(self):
"""stop radiusd"""
subprocess.check_output(['systemctl', 'stop', 'radiusd'])
class RadiousTests(unittest.TestCase, GenericUtilities):
def setUp(self):
self.StartRadiusServer()
def tearDown(self):
self.StopRadiusServer()
def test_radius_plaintext_auth(self):
time.sleep(1)
output=subprocess.check_output(['radtest', 'fedora-ci', 'password', '127.0.0.1', '100', 'testing123']).rstrip().decode('utf-8')
print(output)
self.assertRegex(output, "Received Access-Accept")
self.assertRegex(output, "Reply-Message = \"Hello, fedora-ci\"")
if __name__ == '__main__':
unittest.main(testRunner=unittest.TextTestRunner(stream=sys.stdout,
verbosity=3))

69
tests/auth-tests/runtest.sh Executable file
View file

@ -0,0 +1,69 @@
#!/bin/bash
# SPDX-License-Identifier: LGPL-2.1+
# ~~~
# runtest.sh of freeradius
# Description: RADIUS server
#
# Author: Susant Sahani <susant@redhat.com>
# Copyright (c) 2018 Red Hat, Inc.
# ~~~
# Include Beaker environment
. /usr/share/beakerlib/beakerlib.sh || exit 1
PACKAGE="freeradius"
RADIUS_CLIENT_CONF="/etc/raddb/clients.conf"
RADIUD_PALIN_TEXT_AUTH_FILE="/etc/raddb/mods-config/files/authorize"
generate_cert(){
pushd /etc/raddb/certs/
#remove certificates if exists;generate new certificates
if [[ -f /etc/raddb/certs/bootstrap ]]; then
rlLog "Destroy and create new default certificates via bootstrap script"
rm -f *.pem *.der *.csr *.crt *.key *.p12 serial* index.txt* dh
rlRun "sh /etc/raddb/certs/bootstrap" 0 "Gnenerating certificates"
else
rlLogWarning "!!! WARNING bootsrap file does not exist !!!"
rlLog "Destroy and create new default certificates via make scripts"
make destroycerts -C /etc/raddb/certs/
#create new certificates
make -C /etc/raddb/certs/
chown root:radiusd dh ca.* client.* server.*
chmod 640 dh ca.* client.* server.*
fi
popd
}
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "systemctl stop firewalld" 0,5
rlRun "systemctl stop radiusd.service"
rlRun "setenforce 0"
rlFileBackup "$RADIUS_CLIENT_CONF"
rlFileBackup "$RADIUD_PALIN_TEXT_AUTH_FILE"
rlRun "cp freeradius-tests.py /usr/bin/"
rlRun "cp clients.conf $RADIUS_CLIENT_CONF"
rlRun "cp authorize $RADIUD_PALIN_TEXT_AUTH_FILE"
rlRun "systemctl daemon-reload"
generate_cert
rlPhaseEnd
rlPhaseStartTest
rlLog "Starting radius auth tests ..."
rlRun "/usr/bin/python3 /usr/bin/freeradius-tests.py"
rlPhaseEnd
rlPhaseStartCleanup
rlRun "rm /usr/bin/freeradius-tests.py"
rlRun "systemctl start firewalld" 0,5
rlRun "setenforce 1"
rlFileRestore
rlLog "freeradius tests done"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd
rlGetTestState

12
tests/tests.yml Normal file
View file

@ -0,0 +1,12 @@
- hosts: localhost
roles:
- role: standard-test-beakerlib
tags:
- classic
tests:
- auth-tests
required_packages:
- python3
- systemd
- freeradius
- freeradius-utils