arg->passwd);
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_create_principal", prime_arg,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
free(prime_arg);
arg->ks_tuple,
arg->passwd);
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_create_principal", prime_arg,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
free(prime_arg);
} else {
ret.code = kadm5_delete_principal((void *)handle, arg->princ);
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_delete_principal", prime_arg,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free(prime_arg);
ret.code = kadm5_modify_principal((void *)handle, &arg->rec,
arg->mask);
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_modify_principal", prime_arg,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
free(prime_arg);
ret.code = kadm5_rename_principal((void *)handle, arg->src,
arg->dest);
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
/* okay to cast lengths to int because trunc_name limits max value */
krb5_klog_syslog(LOG_NOTICE,
inet_ntoa(rqstp->rq_xprt->xp_raddr.sin_addr));
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
}
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done(funcname, prime_arg, errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
free(prime_arg);
arg->exp, &ret.princs,
&ret.count);
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_get_principals", prime_arg,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
if (ret.code != KADM5_AUTH_CHANGEPW) {
if (ret.code != 0)
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_chpass_principal", prime_arg,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
if(ret.code != KADM5_AUTH_CHANGEPW) {
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_chpass_principal", prime_arg,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
if(ret.code != KADM5_AUTH_SETKEY) {
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_setv4key_principal", prime_arg,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
if(ret.code != KADM5_AUTH_SETKEY) {
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_setkey_principal", prime_arg,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
if(ret.code != KADM5_AUTH_SETKEY) {
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_setkey_principal", prime_arg,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
if(ret.code != KADM5_AUTH_CHANGEPW) {
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done(funcname, prime_arg, errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
free(prime_arg);
if(ret.code != KADM5_AUTH_CHANGEPW) {
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done(funcname, prime_arg, errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
free(prime_arg);
ret.code = kadm5_create_policy((void *)handle, &arg->rec,
arg->mask);
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_create_policy",
((prime_arg == NULL) ? "(null)" : prime_arg),
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
} else {
ret.code = kadm5_delete_policy((void *)handle, arg->name);
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_delete_policy",
((prime_arg == NULL) ? "(null)" : prime_arg),
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
ret.code = kadm5_modify_policy((void *)handle, &arg->rec,
arg->mask);
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_modify_policy",
((prime_arg == NULL) ? "(null)" : prime_arg),
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
}
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done(funcname,
((prime_arg == NULL) ? "(null)" : prime_arg),
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
} else {
log_unauth(funcname, prime_arg,
arg->exp, &ret.pols,
&ret.count);
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_get_policies", prime_arg,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
}
free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
ret.code = kadm5_get_privs((void *)handle, &ret.privs);
if( ret.code != 0 )
- errmsg = krb5_get_error_message(handle ? handle->context : NULL, ret.code);
+ errmsg = krb5_get_error_message(handle->context, ret.code);
log_done("kadm5_get_privs", client_name.value,
errmsg ? errmsg : "success",
&client_name, &service_name, rqstp);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(handle->context, errmsg);
free_server_handle(handle);
gss_release_buffer(&minor_stat, &client_name);
inet_ntoa(rqstp->rq_xprt->xp_raddr.sin_addr),
rqstp->rq_cred.oa_flavor);
if (errmsg != NULL)
- krb5_free_error_message(handle ? handle->context : NULL, errmsg);
+ krb5_free_error_message(NULL, errmsg);
gss_release_buffer(&minor_stat, &client_name);
gss_release_buffer(&minor_stat, &service_name);