OpenBSD CVS

CVS log for src/usr.sbin/radiusd/radiusd.c


[BACK] Up to [local] / src / usr.sbin / radiusd

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.36 / (download) - annotate - [select for diffs], Wed Feb 14 02:44:58 2024 UTC (3 months, 3 weeks ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.35: +2 -1 lines
Diff to previous 1.35 (colored)

avoid use after free of q
found by smatch, ok miod@ deraadt@

Revision 1.35 / (download) - annotate - [select for diffs], Fri Feb 9 07:46:32 2024 UTC (4 months ago) by yasuoka
Branch: MAIN
Changes since 1.34: +135 -137 lines
Diff to previous 1.34 (colored)

Refactor some functions to prepare accounting support.

Revision 1.34 / (download) - annotate - [select for diffs], Mon Jan 8 04:16:48 2024 UTC (5 months ago) by yasuoka
Branch: MAIN
Changes since 1.33: +8 -1 lines
Diff to previous 1.33 (colored)

Pass the request packet to response decorations for future use.
This is required for many cases and will be used future.

Revision 1.33 / (download) - annotate - [select for diffs], Mon Oct 23 00:58:32 2023 UTC (7 months, 2 weeks ago) by yasuoka
Branch: MAIN
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored)

Fix radiusd(8) to fixup MPPE-{Send,Recv}-Key and Tunnel-Password
attributes of the response properly.

Revision 1.32 / (download) - annotate - [select for diffs], Fri Sep 8 05:56:22 2023 UTC (9 months ago) by yasuoka
Branch: MAIN
CVS Tags: OPENBSD_7_4_BASE, OPENBSD_7_4
Changes since 1.31: +224 -129 lines
Diff to previous 1.31 (colored)

Add request or response decoration feature which is used through the
radiusd module interface.  This makes additional modules can modify
RADIUS request or response messages.  Also add new "radius_standard"
module which uses this new feature, provides some generic features
like "strip-atmark-realm" which removes the realm part from the
User-Name attribute.  from IIJ.

Revision 1.31 / (download) - annotate - [select for diffs], Tue Sep 5 00:32:01 2023 UTC (9 months ago) by yasuoka
Branch: MAIN
Changes since 1.30: +3 -1 lines
Diff to previous 1.30 (colored)

Refuse an incomplete config, an authentication block which doesn't
have authentication module.  The code doesn't expect this.

Revision 1.30 / (download) - annotate - [select for diffs], Mon Sep 4 23:55:23 2023 UTC (9 months ago) by yasuoka
Branch: MAIN
Changes since 1.29: +14 -4 lines
Diff to previous 1.29 (colored)

Revert previous.  It caused the stdio of the modules be NONBLOCK.
Generally programs don't expect that.

Revision 1.29 / (download) - annotate - [select for diffs], Mon Sep 4 10:50:52 2023 UTC (9 months ago) by yasuoka
Branch: MAIN
Changes since 1.28: +4 -14 lines
Diff to previous 1.28 (colored)

Specify SOCK_NONBLOCK for socketpair(2) instead of fcntl(2).

Revision 1.28 / (download) - annotate - [select for diffs], Wed Dec 28 21:30:18 2022 UTC (17 months, 1 week ago) by jmc
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3
Changes since 1.27: +3 -3 lines
Diff to previous 1.27 (colored)

spelling fixes; from paul tagliamonte
any parts of his diff not taken are noted on tech

Revision 1.27 / (download) - annotate - [select for diffs], Fri Jun 28 13:32:49 2019 UTC (4 years, 11 months ago) by deraadt
Branch: MAIN
CVS Tags: OPENBSD_7_2_BASE, OPENBSD_7_2, OPENBSD_7_1_BASE, OPENBSD_7_1, OPENBSD_7_0_BASE, OPENBSD_7_0, OPENBSD_6_9_BASE, OPENBSD_6_9, OPENBSD_6_8_BASE, OPENBSD_6_8, OPENBSD_6_7_BASE, OPENBSD_6_7, OPENBSD_6_6_BASE, OPENBSD_6_6
Changes since 1.26: +5 -5 lines
Diff to previous 1.26 (colored)

When system calls indicate an error they return -1, not some arbitrary
value < 0.  errno is only updated in this case.  Change all (most?)
callers of syscalls to follow this better, and let's see if this strictness
helps us in the future.

Revision 1.26 / (download) - annotate - [select for diffs], Wed Apr 3 11:54:56 2019 UTC (5 years, 2 months ago) by yasuoka
Branch: MAIN
CVS Tags: OPENBSD_6_5_BASE, OPENBSD_6_5
Changes since 1.25: +11 -11 lines
Diff to previous 1.25 (colored)

Fix the bug that radius module didn't work when the size of radius message
changes.

Revision 1.25 / (download) - annotate - [select for diffs], Mon Apr 1 11:05:41 2019 UTC (5 years, 2 months ago) by yasuoka
Branch: MAIN
Changes since 1.24: +5 -6 lines
Diff to previous 1.24 (colored)

Pass the debug status to modules. Also some non functional changes
(comment, log message, and rearrange lines).

Revision 1.24 / (download) - annotate - [select for diffs], Mon Apr 1 10:34:02 2019 UTC (5 years, 2 months ago) by yasuoka
Branch: MAIN
Changes since 1.23: +6 -15 lines
Diff to previous 1.23 (colored)

Update authenticator and message authenticator always.  Previous was
to keep the original authenticators and modify them only if needed.
But actually, there supposed to be no case such that the original
authenticators can be used for the client.  Original diff from IIJ.

Revision 1.23 / (download) - annotate - [select for diffs], Sun Mar 31 04:51:45 2019 UTC (5 years, 2 months ago) by yasuoka
Branch: MAIN
Changes since 1.22: +1 -6 lines
Diff to previous 1.22 (colored)

Remove "proc" from pledge(2) since it is not needed even ifdef
RADIUSD_DEBUG.

Revision 1.22 / (download) - annotate - [select for diffs], Tue Oct 9 03:35:44 2018 UTC (5 years, 8 months ago) by yasuoka
Branch: MAIN
CVS Tags: OPENBSD_6_4_BASE, OPENBSD_6_4
Changes since 1.21: +2 -2 lines
Diff to previous 1.21 (colored)

Fix a spelling in log messages.
diff from Lukasz Ratajski

Revision 1.21 / (download) - annotate - [select for diffs], Wed Aug 1 17:17:42 2018 UTC (5 years, 10 months ago) by mestre
Branch: MAIN
Changes since 1.20: +5 -3 lines
Diff to previous 1.20 (colored)

Fix segmentation fault on radiusd(8) when exiting.
If one of the configured modules doesn't have a secret setup then
module->secret == NULL which would call strlen(NULL), within freezero(3),
and that shouldn't happen, but in this case since the call is done it
segfaults and the daemon is not properly shutdown.

cluebat stick provided by semarie@, OK tb@ and deraadt@

Revision 1.20 / (download) - annotate - [select for diffs], Tue Jun 13 05:40:22 2017 UTC (6 years, 11 months ago) by yasuoka
Branch: MAIN
CVS Tags: OPENBSD_6_3_BASE, OPENBSD_6_3, OPENBSD_6_2_BASE, OPENBSD_6_2
Changes since 1.19: +4 -1 lines
Diff to previous 1.19 (colored)

Initialize the length parameter for radius_get_vs_raw_attr() since
it's read/write.  diff from IIJ.

Revision 1.19 / (download) - annotate - [select for diffs], Sun May 21 02:37:52 2017 UTC (7 years ago) by deraadt
Branch: MAIN
Changes since 1.18: +2 -4 lines
Diff to previous 1.18 (colored)

A few more freezero() uses
ok yasuoka mikeb

Revision 1.18 / (download) - annotate - [select for diffs], Sat Apr 16 18:32:29 2016 UTC (8 years, 1 month ago) by krw
Branch: MAIN
CVS Tags: OPENBSD_6_1_BASE, OPENBSD_6_1, OPENBSD_6_0_BASE, OPENBSD_6_0
Changes since 1.17: +2 -2 lines
Diff to previous 1.17 (colored)

Change last non-/gnu/ fcntl(x, F_GETFL, 0) strays to fcntl(x, F_GETFL).

No functional change.

ok millert@

Revision 1.17 / (download) - annotate - [select for diffs], Wed Apr 13 06:33:36 2016 UTC (8 years, 1 month ago) by semarie
Branch: MAIN
Changes since 1.16: +2 -2 lines
Diff to previous 1.16 (colored)

remove "abort" promise from debugging code in radiusd

it is the default now, and the promise name isn't valid anymore.

ok yasuoka@

Revision 1.16 / (download) - annotate - [select for diffs], Mon Mar 21 00:49:36 2016 UTC (8 years, 2 months ago) by guenther
Branch: MAIN
Changes since 1.15: +4 -14 lines
Diff to previous 1.15 (colored)

Instead of creating a socket with socket() or accept() and then
setting the O_NONBLOCK flag on it with fcntl(F_SETFL) afterwards,
just pass SOCK_NONBLOCK to socket() or accept4() and get it right
to begin with.

ok millert@ krw@ beck@ deraadt@ jca@

Revision 1.15 / (download) - annotate - [select for diffs], Tue Feb 9 05:14:08 2016 UTC (8 years, 4 months ago) by jsg
Branch: MAIN
CVS Tags: OPENBSD_5_9_BASE, OPENBSD_5_9
Changes since 1.14: +4 -4 lines
Diff to previous 1.14 (colored)

fix a use after free in an error path
ok yasuoka@

Revision 1.14 / (download) - annotate - [select for diffs], Thu Dec 31 16:22:27 2015 UTC (8 years, 5 months ago) by millert
Branch: MAIN
Changes since 1.13: +4 -5 lines
Diff to previous 1.13 (colored)

Do not mix EX_* from sysexits.h and EXIT_* from stdlib.h, just use
EXIT_*.

Revision 1.13 / (download) - annotate - [select for diffs], Sat Dec 5 06:50:52 2015 UTC (8 years, 6 months ago) by mmcc
Branch: MAIN
Changes since 1.12: +4 -7 lines
Diff to previous 1.12 (colored)

Remove NULL-checks before free()

Revision 1.12 / (download) - annotate - [select for diffs], Tue Oct 27 04:48:06 2015 UTC (8 years, 7 months ago) by yasuoka
Branch: MAIN
Changes since 1.11: +2 -2 lines
Diff to previous 1.11 (colored)

Free the received radius packet when it is duplicated.

diff from Yuuichi Someya

Revision 1.11 / (download) - annotate - [select for diffs], Tue Oct 27 04:27:01 2015 UTC (8 years, 7 months ago) by yasuoka
Branch: MAIN
Changes since 1.10: +14 -2 lines
Diff to previous 1.10 (colored)

Set O_NONBLOCK for UDP sockets not to block on recv().  Actually
block had happened if an error of the socket is handled by send().

diff from Yuuichi Someya.

Revision 1.10 / (download) - annotate - [select for diffs], Tue Oct 27 04:18:36 2015 UTC (8 years, 7 months ago) by yasuoka
Branch: MAIN
Changes since 1.9: +9 -5 lines
Diff to previous 1.9 (colored)

Fix radiusd module to set O_NONBLOCK properly.

diff from Yuuichi Someya.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Oct 19 22:07:37 2015 UTC (8 years, 7 months ago) by yasuoka
Branch: MAIN
Changes since 1.8: +9 -1 lines
Diff to previous 1.8 (colored)

Add pledge(2) for radiusctl(8) and radiusd(8).
- radiusd: "stdio inet"
- radiusd_radius: "stdio inet"
- radiusd_bsdauth:
  - "stdio proc" for the non-priviledged process
  - "stdio getpw rpath proc exec" for the priviledged process
- radiusctl: "stdio dns inet"

"go ahead" deraadt

Revision 1.8 / (download) - annotate - [select for diffs], Mon Oct 19 06:56:58 2015 UTC (8 years, 7 months ago) by yasuoka
Branch: MAIN
Changes since 1.7: +6 -6 lines
Diff to previous 1.7 (colored)

Can't assert "module->fd >= 0" in radiusd_stop() since the module may
be closed already when error.

Revision 1.7 / (download) - annotate - [select for diffs], Tue Aug 25 01:12:59 2015 UTC (8 years, 9 months ago) by yasuoka
Branch: MAIN
Changes since 1.6: +4 -4 lines
Diff to previous 1.6 (colored)

Remove -h command line option from radiusd(8) to make it better style.

Patch from Michael Reed

Revision 1.6 / (download) - annotate - [select for diffs], Sun Aug 2 23:27:50 2015 UTC (8 years, 10 months ago) by yasuoka
Branch: MAIN
CVS Tags: OPENBSD_5_8_BASE, OPENBSD_5_8
Changes since 1.5: +3 -1 lines
Diff to previous 1.5 (colored)

Fire pending events when the module starts.

Revision 1.5 / (download) - annotate - [select for diffs], Sun Aug 2 21:48:55 2015 UTC (8 years, 10 months ago) by yasuoka
Branch: MAIN
Changes since 1.4: +4 -7 lines
Diff to previous 1.4 (colored)

Tweak XXX comments.

Revision 1.4 / (download) - annotate - [select for diffs], Sun Aug 2 21:24:25 2015 UTC (8 years, 10 months ago) by yasuoka
Branch: MAIN
Changes since 1.3: +6 -8 lines
Diff to previous 1.3 (colored)

Fix radiusd to start without -d.  Also stop using event_initialized()
to check whether the event handler is set.

Revision 1.3 / (download) - annotate - [select for diffs], Mon Jul 27 08:43:11 2015 UTC (8 years, 10 months ago) by yasuoka
Branch: MAIN
Changes since 1.2: +5 -5 lines
Diff to previous 1.2 (colored)

Use log_warn() instead of warn() in radiusd_module_load().  Also fix style.

Revision 1.2 / (download) - annotate - [select for diffs], Tue Jul 21 07:04:53 2015 UTC (8 years, 10 months ago) by schwarze
Branch: MAIN
Changes since 1.1: +2 -2 lines
Diff to previous 1.1 (colored)

add missing -n to the SYNOPSIS and usage() and -d to the DESCRIPTION;
OK yasuoka@

Revision 1.1 / (download) - annotate - [select for diffs], Tue Jul 21 04:06:04 2015 UTC (8 years, 10 months ago) by yasuoka
Branch: MAIN

Add radiusd(8) and radiusctl(8).  They are WIP.  radiusd(8) is a RADIUS
server and radiusctl(8) is to control the server.  radiusd(8) currently
supports bsdauth and radius (upstream radius servers) as authentication
backends.

fixes from jsg blambert
ok deraadt

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.