(find_cells): make file parameter const

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@10928 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Johan Danielsson
2002-04-18 10:51:18 +00:00
parent 57cabc8efc
commit 4de5f97133

View File

@@ -1,5 +1,5 @@
/* /*
* Copyright (c) 1997 - 2001 Kungliga Tekniska H<>gskolan * Copyright (c) 1997 - 2002 Kungliga Tekniska H<>gskolan
* (Royal Institute of Technology, Stockholm, Sweden). * (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved. * All rights reserved.
* *
@@ -168,7 +168,7 @@ dns_find_cell(const char *cell, char *dbserver, size_t len)
* Try to find the cells we should try to klog to in "file". * Try to find the cells we should try to klog to in "file".
*/ */
static void static void
find_cells(char *file, char ***cells, int *index) find_cells(const char *file, char ***cells, int *index)
{ {
FILE *f; FILE *f;
char cell[64]; char cell[64];
@@ -362,8 +362,7 @@ _kafs_get_cred(kafs_data *data,
/* comments on the ordering of these tests */ /* comments on the ordering of these tests */
/* If the user passes a realm, she probably knows something we don't /* If the user passes a realm, she probably knows something we don't
* know and we should try afs@realm_hint (otherwise we're talking with a * know and we should try afs@realm_hint.
* blondino and she might as well have it.)
*/ */
if (realm_hint) { if (realm_hint) {
@@ -393,6 +392,12 @@ _kafs_get_cred(kafs_data *data,
ret = (*data->get_cred)(data, AUTH_SUPERUSER, cell, realm, c); ret = (*data->get_cred)(data, AUTH_SUPERUSER, cell, realm, c);
if (ret == 0) return 0; if (ret == 0) return 0;
/* try this case again, if cell and realm differs */
if(strcmp(CELL, realm) != 0) {
ret = (*data->get_cred)(data, AUTH_SUPERUSER, "", realm, c);
if (ret == 0) return 0;
}
/* /*
* We failed to get ``first class tickets'' for afs, * We failed to get ``first class tickets'' for afs,
* fall back to cross-cell authentication. * fall back to cross-cell authentication.