diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-09-22 20:22:49 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-09-22 20:22:49 +0000 |
commit | dd90b8fa4f0e10748605dee57ae175f7aa9532dd (patch) | |
tree | c061144e4d79ea2914347ff2f0bff5fea9de5ed5 /usr.sbin/npppd | |
parent | 817180963f03ab2109a0000f12a3401f22589a20 (diff) |
gcc2 doesn't like unnamed fields. make this compile on vax again.
"looks right" deraadt@
Diffstat (limited to 'usr.sbin/npppd')
-rw-r--r-- | usr.sbin/npppd/npppd/npppd.h | 4 | ||||
-rw-r--r-- | usr.sbin/npppd/npppd/npppd_auth.c | 32 | ||||
-rw-r--r-- | usr.sbin/npppd/npppd/parse.y | 14 |
3 files changed, 25 insertions, 25 deletions
diff --git a/usr.sbin/npppd/npppd/npppd.h b/usr.sbin/npppd/npppd/npppd.h index 7db48afd1c1..7b4cff74331 100644 --- a/usr.sbin/npppd/npppd/npppd.h +++ b/usr.sbin/npppd/npppd/npppd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd.h,v 1.10 2012/09/18 13:14:08 yasuoka Exp $ */ +/* $OpenBSD: npppd.h,v 1.11 2012/09/22 20:22:48 espie Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -160,7 +160,7 @@ struct authconf { struct radconf auth; struct radconf acct; } radius; - }; + } data; }; struct ipcpconf { diff --git a/usr.sbin/npppd/npppd/npppd_auth.c b/usr.sbin/npppd/npppd/npppd_auth.c index b6d838c2de7..d75fb45b204 100644 --- a/usr.sbin/npppd/npppd/npppd_auth.c +++ b/usr.sbin/npppd/npppd/npppd_auth.c @@ -1,4 +1,4 @@ -/* $OpenBSD: npppd_auth.c,v 1.10 2012/09/18 13:14:08 yasuoka Exp $ */ +/* $OpenBSD: npppd_auth.c,v 1.11 2012/09/22 20:22:48 espie Exp $ */ /*- * Copyright (c) 2009 Internet Initiative Japan Inc. @@ -26,7 +26,7 @@ * SUCH DAMAGE. */ /**@file authentication realm */ -/* $Id: npppd_auth.c,v 1.10 2012/09/18 13:14:08 yasuoka Exp $ */ +/* $Id: npppd_auth.c,v 1.11 2012/09/22 20:22:48 espie Exp $ */ #include <sys/types.h> #include <sys/stat.h> #include <sys/socket.h> @@ -525,28 +525,28 @@ npppd_auth_radius_reload(npppd_auth_base *base, struct authconf *auth) int i, nauth, nacct; _this->rad_auth_setting->timeout = - (auth->radius.auth.timeout == 0) - ? DEFAULT_RADIUS_TIMEOUT : auth->radius.auth.timeout; + (auth->data.radius.auth.timeout == 0) + ? DEFAULT_RADIUS_TIMEOUT : auth->data.radius.auth.timeout; _this->rad_acct_setting->timeout = - (auth->radius.acct.timeout == 0) - ? DEFAULT_RADIUS_TIMEOUT : auth->radius.acct.timeout; + (auth->data.radius.acct.timeout == 0) + ? DEFAULT_RADIUS_TIMEOUT : auth->data.radius.acct.timeout; _this->rad_auth_setting->max_tries = - (auth->radius.auth.max_tries == 0) - ? DEFAULT_RADIUS_MAX_TRIES : auth->radius.auth.max_tries; + (auth->data.radius.auth.max_tries == 0) + ? DEFAULT_RADIUS_MAX_TRIES : auth->data.radius.auth.max_tries; _this->rad_acct_setting->max_tries = - (auth->radius.acct.max_tries == 0) - ? DEFAULT_RADIUS_MAX_TRIES : auth->radius.acct.max_tries; + (auth->data.radius.acct.max_tries == 0) + ? DEFAULT_RADIUS_MAX_TRIES : auth->data.radius.acct.max_tries; _this->rad_auth_setting->max_failovers = - (auth->radius.auth.max_failovers == 0) + (auth->data.radius.auth.max_failovers == 0) ? DEFAULT_RADIUS_MAX_FAILOVERS - : auth->radius.auth.max_failovers; + : auth->data.radius.auth.max_failovers; _this->rad_acct_setting->max_failovers = - (auth->radius.acct.max_failovers == 0) + (auth->data.radius.acct.max_failovers == 0) ? DEFAULT_RADIUS_MAX_FAILOVERS - : auth->radius.acct.max_failovers; + : auth->data.radius.acct.max_failovers; _this->rad_acct_setting->curr_server = _this->rad_auth_setting->curr_server = 0; @@ -556,7 +556,7 @@ npppd_auth_radius_reload(npppd_auth_base *base, struct authconf *auth) for (i = 0; i < countof(rad->server); i++) memset(&rad->server[i], 0, sizeof(rad->server[0])); i = 0; - TAILQ_FOREACH(server, &auth->radius.auth.servers, entry) { + TAILQ_FOREACH(server, &auth->data.radius.auth.servers, entry) { if (i >= countof(rad->server)) break; memcpy(&rad->server[i].peer, &server->address, @@ -573,7 +573,7 @@ npppd_auth_radius_reload(npppd_auth_base *base, struct authconf *auth) for (i = 0; i < countof(rad->server); i++) memset(&rad->server[i], 0, sizeof(rad->server[0])); i = 0; - TAILQ_FOREACH(server, &auth->radius.acct.servers, entry) { + TAILQ_FOREACH(server, &auth->data.radius.acct.servers, entry) { if (i >= countof(rad->server)) break; memcpy(&rad->server[i].peer, &server->address, diff --git a/usr.sbin/npppd/npppd/parse.y b/usr.sbin/npppd/npppd/parse.y index cd2845da4f4..1a68f36e4a3 100644 --- a/usr.sbin/npppd/npppd/parse.y +++ b/usr.sbin/npppd/npppd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.1 2012/09/18 13:14:08 yasuoka Exp $ */ +/* $OpenBSD: parse.y,v 1.2 2012/09/22 20:22:48 espie Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -579,8 +579,8 @@ authentication : AUTHENTICATION STRING TYPE authtype { free($2); n->auth_type = $4; if ($4 == NPPPD_AUTH_TYPE_RADIUS) { - TAILQ_INIT(&n->radius.auth.servers); - TAILQ_INIT(&n->radius.acct.servers); + TAILQ_INIT(&n->data.radius.auth.servers); + TAILQ_INIT(&n->data.radius.acct.servers); } curr_authconf = n; } '{' optnl authopt_l '}' { @@ -621,7 +621,7 @@ authopt : USERNAME_SUFFIX STRING { "used for this type."); YYERROR; } - curr_radconf = &curr_authconf->radius.auth; + curr_radconf = &curr_authconf->data.radius.auth; } '{' optnl radopt_l '}' { curr_radconf = NULL; } @@ -631,7 +631,7 @@ authopt : USERNAME_SUFFIX STRING { "for this type."); YYERROR; } - curr_radconf = &curr_authconf->radius.acct; + curr_radconf = &curr_authconf->data.radius.acct; TAILQ_INIT(&curr_radconf->servers); } '{' optnl radopt_l '}' { curr_radconf = NULL; @@ -1478,8 +1478,8 @@ authconf_fini(struct authconf *auth) switch (auth->auth_type) { case NPPPD_AUTH_TYPE_RADIUS: - radconf_fini(&auth->radius.auth); - radconf_fini(&auth->radius.acct); + radconf_fini(&auth->data.radius.auth); + radconf_fini(&auth->data.radius.acct); break; } } |