striprealm should be strip_realm and a bool
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 9 Sep 2014 19:18:17 +0000 (15:18 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 9 Sep 2014 19:18:17 +0000 (15:18 -0400)
src/include/realms.h
src/main/process.c
src/main/realms.c
src/modules/rlm_realm/rlm_realm.c

index c30e55f..97a2beb 100644 (file)
@@ -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;
index c2d0e0a..69d2820 100644 (file)
@@ -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
index a09fcf0..876dbd0 100644 (file)
@@ -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");
        }
 
index f260460..3c42ebd 100644 (file)
@@ -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.