mirror of
https://git.openafs.org/openafs.git
synced 2025-01-22 17:00:15 +00:00
Translate messages from ktc_SetToken
Error messages from ktc_SetToken weren't being passed through com_err, leading to the confusing unable to obtain tokens for cell inf.ed.ac.uk (status: 11862788). error message. Instead, call into afs_com_err here, which gives: a pioctl failed while obtaining tokens for cell inf.ed.ac.uk Much nicer ... Change-Id: Id4c7e6f6a2f52efc6ac1db9fa007ba1a452092fe Reviewed-on: http://gerrit.openafs.org/822 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
fda55b178c
commit
146b732fc8
@ -818,8 +818,9 @@ static int auth_to_cell(krb5_context context, char *cell, char *realm)
|
|||||||
strcpy(aclient.instance, "");
|
strcpy(aclient.instance, "");
|
||||||
strncpy(aclient.cell, realm_of_user, MAXKTCREALMLEN - 1);
|
strncpy(aclient.cell, realm_of_user, MAXKTCREALMLEN - 1);
|
||||||
if ((status = ktc_SetToken(&aserver, &atoken, &aclient, 0))) {
|
if ((status = ktc_SetToken(&aserver, &atoken, &aclient, 0))) {
|
||||||
fprintf(stderr, "%s: unable to obtain tokens for cell %s "
|
afs_com_err(progname, status,
|
||||||
"(status: %d).\n", progname, cell_to_use, status);
|
"while obtaining tokens for cell %s",
|
||||||
|
cell_to_use);
|
||||||
status = AKLOG_TOKEN;
|
status = AKLOG_TOKEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -877,9 +878,8 @@ static int auth_to_cell(krb5_context context, char *cell, char *realm)
|
|||||||
write(2,"",0); /* dummy write */
|
write(2,"",0); /* dummy write */
|
||||||
#endif
|
#endif
|
||||||
if ((status = ktc_SetToken(&aserver, &atoken, &aclient, afssetpag))) {
|
if ((status = ktc_SetToken(&aserver, &atoken, &aclient, afssetpag))) {
|
||||||
fprintf(stderr,
|
afs_com_err(progname, status, "while obtaining tokens for cell %s",
|
||||||
"%s: unable to obtain tokens for cell %s (status: %d).\n",
|
cell_to_use);
|
||||||
progname, cell_to_use, status);
|
|
||||||
status = AKLOG_TOKEN;
|
status = AKLOG_TOKEN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user