/[radius]/radius/lib/realms.c
ViewVC logotype

Diff of /radius/lib/realms.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12 by gray, Fri Oct 31 13:09:31 2003 UTC revision 1.13 by gray, Tue Nov 25 15:51:03 2003 UTC
# Line 173  realm_read_file(char *file, int auth_por Line 173  realm_read_file(char *file, int auth_por
173          return read_raddb_file(file, 1, read_realms_entry, &pd);          return read_raddb_file(file, 1, read_realms_entry, &pd);
174  }  }
175    
176  /*  /* Realm Lookup Functions */
177   * Realm Lookup Functions */  
178    static int
179    realm_match_name_p(const REALM *realm, const char *name)
180    {
181            return (envar_lookup_int(realm->args, "ignorecase", 0) ?
182                    strcasecmp : strcmp) (realm->realm, name) == 0;
183    }
184    
185  /* Find a realm in the REALM list */  /* Find a realm in the REALM list */
186  REALM *  REALM *
# Line 187  realm_lookup_name(char *realm) Line 193  realm_lookup_name(char *realm)
193                  return NULL;                  return NULL;
194    
195          for (p = iterator_first(itr); p; p = iterator_next(itr))          for (p = iterator_first(itr); p; p = iterator_next(itr))
196                  if (strcmp(p->realm, realm) == 0)                  if (realm_match_name_p(p, realm))
197                          break;                          break;
198            
199          if (!p && strcmp(realm, "NOREALM")) {          if (!p && strcmp(realm, "NOREALM")) {
200                  for (p = iterator_first(itr); p; p = iterator_next(itr))                  for (p = iterator_first(itr); p; p = iterator_next(itr))
201                          if (strcmp(p->realm, "DEFAULT") == 0)                          if (strcmp(p->realm, "DEFAULT") == 0)

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26