From: Arran Cudbard-Bell Date: Tue, 9 Sep 2014 19:18:17 +0000 (-0400) Subject: striprealm should be strip_realm and a bool X-Git-Tag: release_3_0_5~582 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e8ccaedafb73aabcf5b259e6f4b26e5d203a73f;p=thirdparty%2Ffreeradius-server.git striprealm should be strip_realm and a bool --- diff --git a/src/include/realms.h b/src/include/realms.h index c30e55f7f7d..97a2beb1f14 100644 --- a/src/include/realms.h +++ b/src/include/realms.h @@ -146,7 +146,7 @@ typedef struct home_pool_t { typedef struct _realm { char const *name; - int striprealm; + bool strip_realm; home_pool_t *auth_pool; home_pool_t *acct_pool; diff --git a/src/main/process.c b/src/main/process.c index c2d0e0a7fd0..69d28202f86 100644 --- a/src/main/process.c +++ b/src/main/process.c @@ -2647,7 +2647,7 @@ static int request_will_proxy(REQUEST *request) * Doing it here catches the case of proxied tunneled * requests. */ - if (realm && (realm->striprealm == true) && + if (realm && (realm->strip_realm == true) && (strippedname = pairfind(request->proxy->vps, PW_STRIPPED_USER_NAME, 0, TAG_ANY)) != NULL) { /* * If there's a Stripped-User-Name attribute in diff --git a/src/main/realms.c b/src/main/realms.c index a09fcf0eb62..876dbd0a7d0 100644 --- a/src/main/realms.c +++ b/src/main/realms.c @@ -1745,7 +1745,7 @@ static int realm_add(realm_config_t *rc, CONF_SECTION *cs) memset(r, 0, sizeof(*r)); r->name = name2; - r->striprealm = 1; + r->strip_realm = true; #ifdef WITH_PROXY r->auth_pool = auth_pool; r->acct_pool = acct_pool; @@ -1767,7 +1767,7 @@ static int realm_add(realm_config_t *rc, CONF_SECTION *cs) cp = cf_pair_find(cs, "nostrip"); if (cp && (cf_pair_value(cp) == NULL)) { - r->striprealm = 0; + r->strip_realm = false; cf_log_info(cs, "\tnostrip"); } diff --git a/src/modules/rlm_realm/rlm_realm.c b/src/modules/rlm_realm/rlm_realm.c index f26046035c5..3c42ebd4279 100644 --- a/src/modules/rlm_realm/rlm_realm.c +++ b/src/modules/rlm_realm/rlm_realm.c @@ -191,7 +191,7 @@ static int check_for_realm(void *instance, REQUEST *request, REALM **returnrealm /* * If we've been told to strip the realm off, then do so. */ - if (realm->striprealm) { + if (realm->strip_realm) { /* * Create the Stripped-User-Name attribute, if it * doesn't exist.