if((kret = krb5_db_create(kcontext, db5util_db_args))) {
const char *emsg = krb5_get_error_message(kcontext, kret);
- /*
- * See if something (like DAL KDB plugin) has set a specific error
- * message and use that otherwise use default.
- */
-
- if (emsg != NULL) {
- fprintf(stderr, "%s: %s\n", progname, emsg);
- krb5_free_error_message (kcontext, emsg);
- } else {
- fprintf(stderr, dbcreaterr_fmt,
- progname, dbname, error_message(kret));
- }
+ fprintf(stderr, "%s: %s\n", progname, emsg);
+ krb5_free_error_message (kcontext, emsg);
exit_status++;
if (dumpfile) fclose(f);
return;
if ((kret = krb5_db_open(kcontext, db5util_db_args,
KRB5_KDB_OPEN_RW | KRB5_KDB_SRV_TYPE_ADMIN))) {
const char *emsg = krb5_get_error_message(kcontext, kret);
- /*
- * See if something (like DAL KDB plugin) has set a specific
- * error message and use that otherwise use default.
- */
-
- if (emsg != NULL) {
- fprintf(stderr, "%s: %s\n", progname, emsg);
- krb5_free_error_message (kcontext, emsg);
- } else {
- fprintf(stderr, dbinit_err_fmt,
- progname, error_message(kret));
- }
+ fprintf(stderr, "%s: %s\n", progname, emsg);
+ krb5_free_error_message (kcontext, emsg);
exit_status++;
goto error;
}
((initerr = (*server_init_proc)(context, &pctx)) != 0)) {
const char *emsg;
emsg = krb5_get_error_message(context, initerr);
- if (emsg) {
- krb5_klog_syslog(LOG_ERR,
- "authdata %s failed to initialize: %s",
- ftable->name, emsg);
- krb5_free_error_message(context, emsg);
- }
+ krb5_klog_syslog(LOG_ERR,
+ "authdata %s failed to initialize: %s",
+ ftable->name, emsg);
+ krb5_free_error_message(context, emsg);
memset(&authdata_systems[k], 0, sizeof(authdata_systems[k]));
continue;
((initerr = (*server_init_proc)(context, &pctx)) != 0)) {
const char *emsg;
emsg = krb5_get_error_message(context, initerr);
- if (emsg) {
- krb5_klog_syslog(LOG_ERR,
- "authdata %s failed to initialize: %s",
- ftable->name, emsg);
- krb5_free_error_message(context, emsg);
- }
+ krb5_klog_syslog(LOG_ERR,
+ "authdata %s failed to initialize: %s",
+ ftable->name, emsg);
+ krb5_free_error_message(context, emsg);
memset(&authdata_systems[k], 0, sizeof(authdata_systems[k]));
continue;
if (initerr) {
const char *emsg;
emsg = krb5_get_error_message(context, initerr);
- if (emsg) {
- krb5_klog_syslog(LOG_ERR,
- "preauth %s failed to initialize: %s",
- ftable->name, emsg);
- krb5_free_error_message(context, emsg);
- }
+ krb5_klog_syslog(LOG_ERR,
+ "preauth %s failed to initialize: %s",
+ ftable->name, emsg);
+ krb5_free_error_message(context, emsg);
memset(&preauth_systems[k], 0,
sizeof(preauth_systems[k]));
{
const char *e = krb5_get_error_message(context, ret);
- if (e) {
- krb5_klog_syslog(LOG_ERR, "kadm5_hook %s failed postcommit %s: %s",
- name, function, e);
- }
+ krb5_klog_syslog(LOG_ERR, "kadm5_hook %s failed postcommit %s: %s",
+ name, function, e);
krb5_free_error_message(context, e);
}
if (retval != 0) {
const char * errmsg;
errmsg = krb5_get_error_message(context, retval);
- if (errmsg) {
- krb5_set_error_message(context, retval,
- "%s constructing AP-REQ armor", errmsg);
- krb5_free_error_message(context, errmsg);
- }
+ krb5_set_error_message(context, retval,
+ "%s constructing AP-REQ armor", errmsg);
+ krb5_free_error_message(context, errmsg);
}
}
if (ccache)
} else if (strcmp(tmpbuf, "kerr") == 0) {
kerr = va_arg(ap, krb5_error_code);
p = krb5_get_error_message(context, kerr);
- krb5int_buf_add_fmt(&buf, "%ld/%s", (long) kerr,
- (kerr == 0) ? "success" : p);
+ krb5int_buf_add_fmt(&buf, "%ld/%s", (long) kerr, p);
krb5_free_error_message(context, p);
} else if (strcmp(tmpbuf, "keyblock") == 0) {
keyblock = va_arg(ap, const krb5_keyblock *);