From: yasuoka Date: Mon, 4 Sep 2023 12:28:18 +0000 (+0000) Subject: Don't surround by "" at much as possible. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c82695e7bc6492f146c0ebf0786b7c0551aec944;p=openbsd Don't surround by "" at much as possible. --- diff --git a/usr.sbin/radiusd/parse.y b/usr.sbin/radiusd/parse.y index 61934555006..ba3399fbf49 100644 --- a/usr.sbin/radiusd/parse.y +++ b/usr.sbin/radiusd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.14 2023/08/18 06:37:20 yasuoka Exp $ */ +/* $OpenBSD: parse.y,v 1.15 2023/09/04 12:28:18 yasuoka Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer @@ -99,6 +99,7 @@ typedef struct { %type prefix %type yesno %type strnum +%type key %% grammar : /* empty */ @@ -276,7 +277,7 @@ module : MODULE LOAD STRING STRING { free($4); TAILQ_INSERT_TAIL(&conf->module, module, next); } - | MODULE SET STRING STRING str_l { + | MODULE SET STRING key str_l { struct radiusd_module *module; module = find_module($3); @@ -301,6 +302,11 @@ setstrerr: free_str_l(&$5); } ; + +key : STRING + | SECRET { $$ = strdup("secret"); } + ; + authenticate : AUTHENTICATE { radiusd_authentication_init(&authen); } str_l optnl '{' authopts '}' { diff --git a/usr.sbin/radiusd/radiusd.conf.5 b/usr.sbin/radiusd/radiusd.conf.5 index 7da28773cd5..b2bd3f9d0ce 100644 --- a/usr.sbin/radiusd/radiusd.conf.5 +++ b/usr.sbin/radiusd/radiusd.conf.5 @@ -1,4 +1,4 @@ -.\" $OpenBSD: radiusd.conf.5,v 1.15 2022/12/13 00:59:53 yasuoka Exp $ +.\" $OpenBSD: radiusd.conf.5,v 1.16 2023/09/04 12:28:18 yasuoka Exp $ .\" .\" Copyright (c) 2014 Esdenera Networks GmbH .\" Copyright (c) 2014 Internet Initiative Japan Inc. @@ -15,7 +15,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: December 13 2022 $ +.Dd $Mdocdate: September 4 2023 $ .Dt RADIUSD.CONF 5 .Os .Sh NAME @@ -192,18 +192,18 @@ client 192.168.0.0/24 { msgauth-required yes } -module load "bsdauth" "/usr/libexec/radiusd/radiusd_bsdauth" -module set "bsdauth" "restrict-group" "operator" +module load bsdauth "/usr/libexec/radiusd/radiusd_bsdauth" +module set bsdauth restrict-group "operator" -module load "radius" "/usr/libexec/radiusd/radiusd_radius" -module set "radius" "secret" "testing123" -module set "radius" "server" "127.0.0.1" +module load radius "/usr/libexec/radiusd/radiusd_radius" +module set radius secret "testing123" +module set radius server "127.0.0.1" authenticate *@example.com { - authenticate-by "radius" + authenticate-by radius } authenticate * { - authenticate-by "bsdauth" + authenticate-by bsdauth } .Ed .Sh SEE ALSO