svn rev #24054: trunk/src/lib/kadm5/ clnt/
ghudson@MIT.EDU
ghudson at MIT.EDU
Tue May 18 12:17:15 EDT 2010
http://src.mit.edu/fisheye/changelog/krb5/?cs=24054
Commit By: ghudson
Log Message:
Improve the error message from kadmin when hostname resolution fails
for the admin server. (The extended message won't be displayed by
kadmin currently; that's a separate issue.)
Changed Files:
U trunk/src/lib/kadm5/alt_prof.c
U trunk/src/lib/kadm5/clnt/client_init.c
U trunk/src/lib/kadm5/kadm_err.et
Modified: trunk/src/lib/kadm5/alt_prof.c
===================================================================
--- trunk/src/lib/kadm5/alt_prof.c 2010-05-17 23:53:46 UTC (rev 24053)
+++ trunk/src/lib/kadm5/alt_prof.c 2010-05-18 16:17:15 UTC (rev 24054)
@@ -875,7 +875,11 @@
hp = gethostbyname(params_out.admin_server);
if (hp == NULL) {
- ret = errno;
+ ret = KADM5_CANT_RESOLVE;
+ krb5_set_error_message(ctx, ret,
+ "Cannot resolve address of admin server \"%s\" "
+ "for realm \"%s\"", params_out.admin_server,
+ realm_in);
goto err_params;
}
if (strlen(hp->h_name) + sizeof("kadmin/") > maxlen) {
Modified: trunk/src/lib/kadm5/clnt/client_init.c
===================================================================
--- trunk/src/lib/kadm5/clnt/client_init.c 2010-05-17 23:53:46 UTC (rev 24053)
+++ trunk/src/lib/kadm5/clnt/client_init.c 2010-05-18 16:17:15 UTC (rev 24054)
@@ -452,10 +452,8 @@
code = kadm5_get_admin_service_name(handle->context,
handle->params.realm,
svcname, sizeof(svcname));
- if (code) {
- code = KADM5_MISSING_KRB5_CONF_PARAMS;
+ if (code)
goto error;
- }
} else {
strncpy(svcname, svcname_in, sizeof(svcname));
svcname[sizeof(svcname)-1] = '\0';
Modified: trunk/src/lib/kadm5/kadm_err.et
===================================================================
--- trunk/src/lib/kadm5/kadm_err.et 2010-05-17 23:53:46 UTC (rev 24053)
+++ trunk/src/lib/kadm5/kadm_err.et 2010-05-18 16:17:15 UTC (rev 24054)
@@ -60,4 +60,5 @@
error_code KADM5_SETKEY3_ETYPE_MISMATCH, "Mismatched enctypes for setkey3"
error_code KADM5_MISSING_KRB5_CONF_PARAMS, "Missing parameters in krb5.conf required for kadmin client"
error_code KADM5_XDR_FAILURE, "XDR encoding error"
+error_code KADM5_CANT_RESOLVE, "Cannot resolve network address for admin server in requested realm"
end
More information about the cvs-krb5
mailing list