+2004-06-24 Tom Yu <tlyu@mit.edu>
+
+ * alt_prof.c (kadm5_get_admin_service_name): Fix call to
+ kadm5_get_config_params().
+
2004-06-16 Ken Raeburn <raeburn@mit.edu>
* Makefile.in (clean-mac): Target deleted.
memset(¶ms_in, 0, sizeof(params_in));
memset(¶ms_out, 0, sizeof(params_out));
- params_in.mask |= KADM5_CONFIG_ADMIN_SERVER;
- ret = kadm5_get_config_params(ctx, NULL, NULL, ¶ms_in, ¶ms_out);
+ params_in.mask |= KADM5_CONFIG_REALM;
+ params_in.realm = realm_in;
+ ret = kadm5_get_config_params(ctx, DEFAULT_PROFILE_PATH,
+ "KRB5_CONFIG", ¶ms_in, ¶ms_out);
if (ret)
return ret;
+ if (!(params_out.mask & KADM5_CONFIG_ADMIN_SERVER)) {
+ ret = KADM5_MISSING_KRB5_CONF_PARAMS;
+ goto err_params;
+ }
+
hp = gethostbyname(params_out.admin_server);
if (hp == NULL) {
ret = errno;
sprintf(admin_name, "kadmin/%s", hp->h_name);
err_params:
- free(params_out.admin_server);
+ kadm5_free_config_params(ctx, ¶ms_out);
return ret;
}