Lines Matching +full:realm +full:-

2  * Copyright (c) 1997 - 2005 Kungliga Tekniska Högskolan
44 #define ToAsciiUpper(c) ((c) - 'a' + 'A')
112 parms.in_size = t - buf; in kafs_settoken_rxkad()
124 * (EndTimestamp - BeginTimestamp) is odd. By decrementing EndTime in _kafs_fixup_viceid()
127 * (issue_date, life) -> (StartTime, EndTime) -> (issue_date, life) in _kafs_fixup_viceid()
132 if (!ODD(ct->EndTimestamp - ct->BeginTimestamp)) in _kafs_fixup_viceid()
133 ct->EndTimestamp--; in _kafs_fixup_viceid()
137 if (ODD(ct->EndTimestamp - ct->BeginTimestamp)) in _kafs_fixup_viceid()
138 ct->EndTimestamp--; in _kafs_fixup_viceid()
142 /* Try to get a db-server for an AFS cell from a AFSDB record */
148 int ok = -1; in dns_find_cell()
151 struct rk_resource_record *rr = r->head; in dns_find_cell()
153 if(rr->type == rk_ns_t_afsdb && rr->u.afsdb->preference == 1){ in dns_find_cell()
155 rr->u.afsdb->domain, in dns_find_cell()
160 rr = rr->next; in dns_find_cell()
185 for (; t >= cell; t--) in find_cells()
220 int er = (*data->afslog_uid)(data, cells[i], 0, uid, homedir); in afslog_cells()
257 free(cells[--idx]); in _kafs_afslog_all_local_cells()
265 const char *cell, char **realm, int exact) in file_find_cell() argument
270 int ret = -1; in file_find_cell()
293 * Read next line on the form ip-address '#' hostname in file_find_cell()
301 if (buf[strlen(buf) - 1] == '\n') in file_find_cell()
302 buf[strlen(buf) - 1] = '\0'; in file_find_cell()
303 *realm = (*data->get_realm)(data, p); in file_find_cell()
304 if (*realm && **realm != '\0') in file_find_cell()
314 /* Find the realm associated with cell. Do this by opening CellServDB
315 file and getting the realm-of-host for the first VL-server for the
318 This does not work when the VL-server is living in one realm, but
319 the cell it is serving is living in another realm.
321 Return 0 on success, -1 otherwise.
326 const char *cell, char **realm) in _kafs_realm_of_cell() argument
331 ret = file_find_cell(data, cell, realm, 1); in _kafs_realm_of_cell()
335 *realm = (*data->get_realm)(data, buf); in _kafs_realm_of_cell()
336 if(*realm != NULL) in _kafs_realm_of_cell()
339 return file_find_cell(data, cell, realm, 0); in _kafs_realm_of_cell()
344 const char *realm, uid_t uid, struct kafs_token *kt) in _kafs_try_get_cred() argument
348 ret = (*data->get_cred)(data, user, cell, realm, uid, kt); in _kafs_try_get_cred()
350 const char *estr = (*data->get_error)(data, ret); in _kafs_try_get_cred()
352 asprintf(&str, "%s tried afs%s%s@%s -> %s (%d)", in _kafs_try_get_cred()
353 data->name, cell ? "/" : "", in _kafs_try_get_cred()
354 cell ? cell : "", realm, estr ? estr : "unknown", ret); in _kafs_try_get_cred()
357 (*data->free_error)(data, estr); in _kafs_try_get_cred()
369 const char *realm, in _kafs_get_cred() argument
373 int ret = -1; in _kafs_get_cred()
377 /* We're about to find the realm that holds the key for afs in in _kafs_get_cred()
378 * the specified cell. The problem is that null-instance in _kafs_get_cred()
379 * afs-principals are common and that hitting the wrong realm might in _kafs_get_cred()
382 * Any realm passed to us is preferred. in _kafs_get_cred()
384 * If there is a realm with the same name as the cell, it is most in _kafs_get_cred()
385 * likely the correct realm to talk to. in _kafs_get_cred()
388 * will live in the realm we are looking for. in _kafs_get_cred()
390 * Try the local realm, but if the previous cases fail, this is in _kafs_get_cred()
397 /* If the user passes a realm, she probably knows something we don't in _kafs_get_cred()
414 * REALM we still don't have to resort to cross-cell authentication. in _kafs_get_cred()
415 * Try afs.cell@REALM. in _kafs_get_cred()
418 cell, realm, uid, kt); in _kafs_get_cred()
422 * If cell == realm we don't need no cross-cell authentication. in _kafs_get_cred()
423 * Try afs@REALM. in _kafs_get_cred()
425 if (strcmp(CELL, realm) == 0) { in _kafs_get_cred()
427 NULL, realm, uid, kt); in _kafs_get_cred()
433 * fall back to cross-cell authentication. in _kafs_get_cred()
445 * Perhaps the cell doesn't correspond to any realm? in _kafs_get_cred()
446 * Use realm of first volume location DB server. in _kafs_get_cred()
451 && strcmp(vl_realm, realm) != 0 in _kafs_get_cred()