diff --git a/lib/kafs/common.c b/lib/kafs/common.c index 855bed536..533d160a7 100644 --- a/lib/kafs/common.c +++ b/lib/kafs/common.c @@ -437,17 +437,6 @@ _kafs_get_cred(struct kafs_data *data, _kafs_foldup(CELL, cell); - /* - * If cell == realm we don't need no cross-cell authentication. - * Try afs@REALM. - */ - if (strcmp(CELL, realm) == 0) { - ret = _kafs_try_get_cred(data, AUTH_SUPERUSER, - "", realm, uid, kt); - if (ret == 0) return 0; - /* Try afs.cell@REALM below. */ - } - /* * If the AFS servers have a file /usr/afs/etc/krb.conf containing * REALM we still don't have to resort to cross-cell authentication. @@ -457,6 +446,16 @@ _kafs_get_cred(struct kafs_data *data, cell, realm, uid, kt); if (ret == 0) return 0; + /* + * If cell == realm we don't need no cross-cell authentication. + * Try afs@REALM. + */ + if (strcmp(CELL, realm) == 0) { + ret = _kafs_try_get_cred(data, AUTH_SUPERUSER, + "", realm, uid, kt); + if (ret == 0) return 0; + } + /* * We failed to get ``first class tickets'' for afs, * fall back to cross-cell authentication.