+Mon Feb 26 15:22:44 2001 Ezra Peisach <epeisach@mit.edu>
+
+ *adm_conn.c, adm_rw.c, kadm5_defs.h, kpasswd.c, main.c,
+ proto_serv.c, srv_net.c: Warnings cleanup including assignments in
+ conditionals, shadowed variables, unused variables, prototypes.
+
2000-10-17 Ezra Peisach <epeisach@mit.edu>
* adm_conn.c, kpasswd.c: Argument to krb5_read_password
krb5_ccache ,
krb5_principal,
krb5_creds *,
- char *,
+ const char *,
char *,
krb5_timestamp));
static krb5_error_code kadm_contact_server
}
/* Parse the name and form our principal */
- if (kret = krb5_parse_name(kcontext, name, client))
+ kret = krb5_parse_name(kcontext, name, client);
+ if (kret)
goto cleanup;
if (!ccname) {
krb5_ccache ccache;
krb5_principal client;
krb5_creds *creds;
- char *prompt;
+ const char *prompt;
char *oldpw;
krb5_timestamp tlife;
{
client_name = (char *) NULL;
/* Get the string form for our principal */
- if (kret = krb5_unparse_name(kcontext, client, &client_name))
+ kret = krb5_unparse_name(kcontext, client, &client_name);
+ if (kret)
return(kret);
- if (kret = krb5_os_localaddr(kcontext, &my_addresses))
+ kret = krb5_os_localaddr(kcontext, &my_addresses);
+ if (kret)
goto cleanup;
creds->client = client;
* realm name is instance
* realm name is realm name
*/
- if (kret = krb5_build_principal_ext(kcontext,
- &creds->server,
- client->realm.length,
- client->realm.data,
- strlen(KRB5_ADM_SERVICE_INSTANCE),
- KRB5_ADM_SERVICE_INSTANCE,
- client->realm.length,
- client->realm.data,
- 0))
+ kret = krb5_build_principal_ext(kcontext,
+ &creds->server,
+ client->realm.length,
+ client->realm.data,
+ strlen(KRB5_ADM_SERVICE_INSTANCE),
+ KRB5_ADM_SERVICE_INSTANCE,
+ client->realm.length,
+ client->realm.data,
+ 0);
+ if (kret)
goto cleanup;
/* Attempt to retrieve an appropriate entry from the credentials cache. */
if (prompt != (char *) NULL) {
/* Read the password */
old_pwsize = KRB5_ADM_MAX_PASSWORD_LEN;
- if (kret = krb5_read_password(kcontext,
- prompt,
- (char *) NULL,
- oldpw,
- &old_pwsize))
+ kret = krb5_read_password(kcontext, prompt, (char *) NULL,
+ oldpw, &old_pwsize);
+ if (kret)
goto cleanup;
}
- if (kret = krb5_timeofday(kcontext, &jetzt))
+
+ kret = krb5_timeofday(kcontext, &jetzt);
+ if (kret)
goto cleanup;
+
if (tlife > 0)
creds->times.endtime = jetzt + tlife;
else
}
in_remote.sin_port = service->s_port;
- if (kret = krb5_get_krbhst(kcontext, realmp, &hostlist))
+ kret = krb5_get_krbhst(kcontext, realmp, &hostlist);
+ if (kret)
goto cleanup;
/* Now count the number of hosts in the realm */
ccachep, ccname, tlife)
krb5_context kcontext; /* Context handle (In ) */
char *user; /* User specified (In ) */
- char *prompt; /* Old password prompt (In ) */
+ const char *prompt; /* Old password prompt (In ) */
char *opassword; /* Old Password (I/O) */
int *sockp; /* Socket for conn. (Out) */
krb5_auth_context *ctxp; /* Auth context (Out) */
/*
* Find the appropriate credentials cache and set up our identity.
*/
- if (kret = kadm_get_ccache(kcontext, user, ccname, ccachep, &client))
+ kret = kadm_get_ccache(kcontext, user, ccname, ccachep, &client);
+ if (kret)
goto cleanup;
/*
* Get initial credentials.
*/
- if (kret = kadm_get_creds(kcontext,
- *ccachep,
- client,
- &creds,
- prompt,
- opassword,
- tlife))
+ kret = kadm_get_creds(kcontext, *ccachep, client, &creds,
+ prompt, opassword, tlife);
+ if (kret)
goto cleanup;
/*
server_realm.length = client->realm.length;
memcpy(server_realm.data, client->realm.data, server_realm.length);
server_realm.data[server_realm.length] = '\0';
- if (kret = kadm_contact_server(kcontext,
- &server_realm,
- sockp,
- &local_addr,
- &remote_addr))
+
+ kret = kadm_contact_server(kcontext, &server_realm, sockp,
+ &local_addr, &remote_addr);
+ if (kret)
goto cleanup;
/*
* Obtain our authorization context
*/
- if (kret = kadm_get_auth(kcontext, ctxp, local_addr, remote_addr))
+ kret = kadm_get_auth(kcontext, ctxp, local_addr, remote_addr);
+ if (kret)
goto cleanup;
/*
*/
suppl_data.data = NULL;
suppl_data.length = 0;
- if (kret = krb5_mk_req_extended(kcontext,
- ctxp,
- AP_OPTS_MUTUAL_REQUIRED,
- &suppl_data,
- &creds,
- &request_data))
+
+ kret = krb5_mk_req_extended(kcontext, ctxp, AP_OPTS_MUTUAL_REQUIRED,
+ &suppl_data, &creds, &request_data);
+ if (kret)
goto cleanup;
- if (kret = krb5_write_message(kcontext, sockp, &request_data))
+ kret = krb5_write_message(kcontext, sockp, &request_data);
+ if (kret)
goto cleanup;
/*
* Now read back the response.
*/
- if (kret = krb5_read_message(kcontext, sockp, &response_data)) {
+ kret = krb5_read_message(kcontext, sockp, &response_data);
+ if (kret) {
goto cleanup;
}
else {
krb5_int32 nargs; /* Number of arguments (In ) */
krb5_data *arglist; /* Components to write (In ) */
{
- int writebufsize;
+ size_t writebufsize;
int i;
char *writebuf;
krb5_error_code ret;
/*
* First check that our auth context has the right flags in it.
*/
- if (ret = krb5_auth_con_getflags(kcontext, ctx, &ac_flags))
+ ret = krb5_auth_con_getflags(kcontext, ctx, &ac_flags);
+ if (ret)
return(ret);
if ((ac_flags & (KRB5_AUTH_CONTEXT_RET_SEQUENCE|
writebufsize += arglist[i].length; /* for actual arg */
}
- if (writebuf = (char *) malloc(writebufsize)) {
+ writebuf = (char *) malloc(writebufsize);
+ if (writebuf != NULL) {
char *curr;
krb5_data write_data, out_data;
krb5_replay_data replay_data;
write_data.data = writebuf;
/* Generate the message */
- if (!(ret = krb5_mk_priv(kcontext,
- ctx,
- &write_data,
- &out_data,
- &replay_data))) {
+ ret = krb5_mk_priv(kcontext, ctx, &write_data,
+ &out_data, &replay_data);
+ if (!ret) {
/* Write the message */
- if (ret = krb5_write_message(kcontext, sock, &out_data))
+ ret = krb5_write_message(kcontext, sock, &out_data);
+ krb5_free_data_contents(kcontext, &out_data);
+ if (ret)
goto cleanup;
- krb5_xfree(out_data.data);
}
cleanup:
krb5_int32 ncomps; /* Number of arguments (In ) */
krb5_data *complist; /* Components to write (In ) */
{
- int writebufsize;
+ size_t writebufsize;
int i;
char *writebuf;
krb5_error_code ret;
/*
* First check that our auth context has the right flags in it.
*/
- if (ret = krb5_auth_con_getflags(kcontext, ctx, &ac_flags))
+ ret = krb5_auth_con_getflags(kcontext, ctx, &ac_flags);
+ if (ret)
return(ret);
if ((ac_flags & (KRB5_AUTH_CONTEXT_RET_SEQUENCE|
writebufsize += complist[i].length; /* for actual arg */
}
- if (writebuf = (char *) malloc(writebufsize)) {
+ writebuf = (char *) malloc(writebufsize);
+ if (writebuf != NULL) {
char *curr;
krb5_data write_data, out_data;
krb5_replay_data replay_data;
write_data.data = writebuf;
/* Generate the message */
- if (!(ret = krb5_mk_priv(kcontext,
- ctx,
- &write_data,
- &out_data,
- &replay_data))) {
+ ret = krb5_mk_priv(kcontext, ctx, &write_data, &out_data,
+ &replay_data);
+ if (!ret) {
/* Write the message */
- if (ret = krb5_write_message(kcontext, sock, &out_data))
+ ret = krb5_write_message(kcontext, sock, &out_data);
+ krb5_free_data_contents(kcontext, &out_data);
+ if (ret)
goto cleanup;
- krb5_xfree(out_data.data);
}
cleanup:
/*
* First check that our auth context has the right flags in it.
*/
- if (ret = krb5_auth_con_getflags(kcontext, ctx, &ac_flags))
+ ret = krb5_auth_con_getflags(kcontext, ctx, &ac_flags);
+ if (ret)
return(ret);
if ((ac_flags & (KRB5_AUTH_CONTEXT_RET_SEQUENCE|
if (*nargs > 0) {
/* Get the memory for the list */
- if (*arglist = (krb5_data *)
- malloc((size_t) (*nargs) * sizeof(krb5_data))) {
+ *arglist = (krb5_data *)
+ malloc((size_t) (*nargs) * sizeof(krb5_data));
+ if (*arglist != NULL) {
krb5_data *xarglist;
xarglist = *arglist;
/*
* First check that our auth context has the right flags in it.
*/
- if (ret = krb5_auth_con_getflags(kcontext, ctx, &ac_flags))
+ ret = krb5_auth_con_getflags(kcontext, ctx, &ac_flags);
+ if (ret)
return(ret);
if ((ac_flags & (KRB5_AUTH_CONTEXT_RET_SEQUENCE|
if (*ncomps > 0) {
/* Get the memory for the list */
- if (*complist = (krb5_data *)
- malloc((size_t) ((*ncomps) * sizeof(krb5_data)))) {
+ *complist = (krb5_data *)
+ malloc((size_t) ((*ncomps) * sizeof(krb5_data)));
+ if (*complist) {
krb5_data *xcomplist;
-
+
xcomplist = *complist;
memset((char *) (xcomplist), 0,
(size_t) ((*ncomps) * sizeof(krb5_data)));
-
+
replyok = 1;
/* Copy out each list entry */
for (i=0; i<*ncomps; i++) {
* Inter-module function prototypes
*/
-krb5_keytab key_keytab_id();
+krb5_keytab key_keytab_id KRB5_PROTOTYPE((void));
krb5_error_code key_open_db KRB5_PROTOTYPE((krb5_context));
krb5_error_code key_close_db KRB5_PROTOTYPE((krb5_context));
int));
krb5_error_code net_dispatch
KRB5_PROTOTYPE((krb5_context, int));
-krb5_principal net_server_princ();
+krb5_principal net_server_princ KRB5_PROTOTYPE((void));
/* proto_serv.c */
krb5_error_code proto_init
#include "k5-int.h"
#include "adm_defs.h"
#include "adm.h"
+#include "krb5/adm_proto.h"
#ifdef HAVE_STRING_H
#include <string.h>
static const char *kpwd_getoptstring = "u:";
#endif /* LANGUAGES_SUPPORTED */
static const char *kpwd_extra_args = "extra arguments";
+#if 0
static const char *kpwd_bad_option_fmt = "%s: unrecognized option -%c.\n";
+#endif
static const char *kpwd_no_memory_fmt = "%s: not enough resources to allocate %d bytes for %s.\n";
static const char *kpwd_bad_client_fmt = "%s: %s%s%s %s not recognized by the server.\n";
static const char *kpwd_no_server_fmt = "%s: cannot find server for %s.\n";
static const char *kpwd_read_pass_error = "%s: error (%s) reading passwords.\n";
static const char *kpwd_password_text = "passwords";
+#if 0
static const char *kpwd_realm_text = "realm name";
+#endif
static const char *kpwd_args_text = "arguments";
static const char *kpwd_try_again_text = "try again";
static const char *kpwd_seeyalater_text = "password not changed";
+#if 0
static const char *kpwd_mime_text = "MIME-enable";
static const char *kpwd_language_text = "set language";
+#endif
static const char *kpwd_check_pwd_text = "check password";
static const char *kpwd_change_pwd_text = "change password";
static const char *kpwd_quit_text = "quit";
}
static const char *
-kpwd_reply_to_string(stat)
- krb5_int32 stat;
+kpwd_reply_to_string(status)
+ krb5_int32 status;
{
- int index;
+ int idx;
const char *rval;
- switch (stat) {
+ switch (status) {
case KRB5_ADM_SUCCESS:
case KRB5_ADM_CMD_UNKNOWN:
case KRB5_ADM_PW_UNACCEPT:
case KRB5_ADM_NOT_IN_TKT:
case KRB5_ADM_CANT_CHANGE:
case KRB5_ADM_LANG_NOT_SUPPORTED:
- index = (int) stat;
- rval = kpwd_replies[index];
+ idx = (int) status;
+ rval = kpwd_replies[idx];
break;
default:
rval = kpwd_replies_unknown;
}
}
\f
+int
main(argc, argv)
int argc;
char *argv[];
/*
* Establish the connection.
*/
- if (kret = krb5_adm_connect(kcontext,
- name,
- (opwd_prompt) ?
- opwd_prompt : kpwd_old_password_prompt,
- opassword,
- &conn_socket,
- &auth_context,
- &ccache,
- (char *) NULL,
- 0)) {
+ kret = krb5_adm_connect(kcontext, name,
+ (opwd_prompt) ?
+ opwd_prompt : kpwd_old_password_prompt,
+ opassword, &conn_socket, &auth_context,
+ &ccache, (char *) NULL, 0);
+ if (kret) {
switch (kret) {
case KRB5KDC_ERR_C_PRINCIPAL_UNKNOWN:
fprintf(stderr, kpwd_bad_client_fmt, argv[0],
npass_len = KRB5_ADM_MAX_PASSWORD_LEN;
if (!(kret = krb5_read_password(kcontext,
- (char *) kpwd_change_prompt_1,
- (char *) kpwd_change_prompt_2,
+ kpwd_change_prompt_1,
+ kpwd_change_prompt_2,
npassword,
&npass_len))) {
krb5_data check_data[2];
krb5_data set_data[3];
krb5_int32 set_status;
krb5_int32 set_ncomps;
- krb5_int32 *set_reply;
+ krb5_data *set_reply;
check_data[0].data = KRB5_ADM_CHECKPW_CMD;
check_data[0].length = strlen(check_data[0].data);
#include <krb5.h>
#include <kadm5/admin.h>
+#include <krb5/adm_proto.h>
#include "kadm5_defs.h"
static krb5_keytab keytab;
/* NOTREACHED */
}
-void usage()
+static void usage()
{
fprintf(stderr, "Usage: kadmind [-r realm] [-m] [-nofork] "
"[-D debuglevel] [-T keytable] [-port port-number]\n");
int main(int argc, char *argv[])
{
- int ret, rlen, nofork, oldnames = 0;
+ int ret, nofork;
int timeout = -1;
krb5_error_code code;
int debug_level = 0;
if (argc != 0)
usage();
- if (ret = krb5_init_context(&context)) {
- fprintf(stderr, "%s: %s while initializing context, aborting\n",
- programname, error_message(ret));
- exit(1);
+ ret = krb5_init_context(&context);
+ if (ret) {
+ fprintf(stderr, "%s: %s while initializing context, aborting\n",
+ programname, error_message(ret));
+ exit(1);
}
krb5_klog_init(context, "admin_server", programname, 1);
- if (ret = kadm5_get_config_params(context, NULL, NULL, ¶ms,
- ¶ms)) {
- krb5_klog_syslog(LOG_ERR, "%s: %s while initializing, aborting\n",
- programname, error_message(ret));
- fprintf(stderr, "%s: %s while initializing, aborting\n",
- programname, error_message(ret));
- krb5_klog_close();
- exit(1);
+ ret = kadm5_get_config_params(context, NULL, NULL, ¶ms,
+ ¶ms);
+ if (ret) {
+ krb5_klog_syslog(LOG_ERR, "%s: %s while initializing, aborting\n",
+ programname, error_message(ret));
+ fprintf(stderr, "%s: %s while initializing, aborting\n",
+ programname, error_message(ret));
+ krb5_klog_close(context);
+ exit(1);
}
#define REQUIRED_PARAMS (KADM5_CONFIG_REALM | KADM5_CONFIG_ACL_FILE | \
"(%x) while initializing, aborting\n", programname,
(params.mask & REQUIRED_PARAMS) ^ REQUIRED_PARAMS);
fprintf(stderr, "%s: Missing required configuration values "
- "(%x) while initializing, aborting\n", programname,
+ "(%lx) while initializing, aborting\n", programname,
(params.mask & REQUIRED_PARAMS) ^ REQUIRED_PARAMS);
- krb5_klog_close();
+ krb5_klog_close(context);
exit(1);
}
krb5_klog_syslog(LOG_INFO, "starting");
- if (code = net_init(context, params.realm, debug_level,
- (params.mask&KADM5_CONFIG_KADMIND_PORT)?
- params.kadmind_port:0)) {
+ code = net_init(context, params.realm, debug_level,
+ (params.mask&KADM5_CONFIG_KADMIND_PORT)?
+ params.kadmind_port:0);
+ if (code) {
krb5_klog_syslog(LOG_ERR, "%s: %s while initializing network",
programname, error_message(code));
fprintf(stderr, "%s: %s while initializing network\n",
exit(1);
}
- if (code = proto_init(context, debug_level, timeout)) {
- krb5_klog_syslog(LOG_ERR, "%s: %s while initializing proto",
- programname, error_message(code));
- fprintf(stderr, "%s: %s while initializing proto\n",
- programname, error_message(code));
+
+ code = proto_init(context, debug_level, timeout);
+ if (code) {
+ krb5_klog_syslog(LOG_ERR, "%s: %s while initializing proto",
+ programname, error_message(code));
+ fprintf(stderr, "%s: %s while initializing proto\n",
+ programname, error_message(code));
}
if (
#endif /* POSIX_SETJMP */
)
{
- if (code = net_dispatch(context, !nofork)) {
+ code = net_dispatch(context, !nofork);
+ if (code) {
krb5_klog_syslog(LOG_ERR, "%s: %s while dispatching requests",
programname, error_message(code));
fprintf(stderr, "%s: %s while dispatching requests\n",
net_finish(context, debug_level);
krb5_klog_syslog(LOG_INFO, "finished, exiting");
- krb5_klog_close();
+ krb5_klog_close(context);
exit(2);
}
/* check to see if the min_time has passed. this is stolen
from chpass_principal_wrapper */
- if (ret = krb5_timeofday(kcontext, &now)) {
+ ret = krb5_timeofday(kcontext, &now);
+ if (ret) {
sprintf(err_str, error_message(ret));
return(KRB5_ADM_SYSTEM_ERROR);
- }
+ }
- if((ret = kadm5_get_principal(global_server_handle, principal,
- &princ,
- KADM5_PRINCIPAL_NORMAL_MASK)) !=
- KADM5_OK) {
+ if((ret = kadm5_get_principal(global_server_handle, principal,
+ &princ,
+ KADM5_PRINCIPAL_NORMAL_MASK)) !=
+ KADM5_OK) {
sprintf(err_str, error_message(ret));
return(KRB5_ADM_SYSTEM_ERROR);
}
sprintf(err_str, error_message(ret));
return(KRB5_ADM_PW_UNACCEPT);
}
- if (ret = kadm5_free_policy_ent(global_server_handle, &pol)) {
+
+ ret = kadm5_free_policy_ent(global_server_handle, &pol);
+ if (ret) {
(void) kadm5_free_principal_ent(global_server_handle, &princ);
sprintf(err_str, error_message(ret));
return(KRB5_ADM_SYSTEM_ERROR);
}
}
- if (ret = kadm5_free_principal_ent(global_server_handle, &princ)) {
- sprintf(err_str, error_message(ret));
- return(KRB5_ADM_SYSTEM_ERROR);
+
+ ret = kadm5_free_principal_ent(global_server_handle, &princ);
+ if (ret) {
+ sprintf(err_str, error_message(ret));
+ return(KRB5_ADM_SYSTEM_ERROR);
}
/* ok, it's not too early to change the password. change it. */
-
- if (ret = kadm5_chpass_principal_util(global_server_handle,
- principal,
- newdata->data,
- NULL,
- err_str, err_str_len))
- return(KRB5_ADM_PW_UNACCEPT);
-
+
+ ret = kadm5_chpass_principal_util(global_server_handle,
+ principal, newdata->data,
+ NULL, err_str, err_str_len);
+ if (ret)
+ return(KRB5_ADM_PW_UNACCEPT);
+
return(KRB5_ADM_SUCCESS);
}
/*
* First setup the replay cache.
*/
- if (kret = krb5_get_server_rcache(kcontext,
- krb5_princ_component(kcontext,
- net_server_princ(),
- 0),
- &rcache)) {
+ kret = krb5_get_server_rcache(kcontext,
+ krb5_princ_component(kcontext,
+ net_server_princ(),
+ 0),
+ &rcache);
+ if (kret) {
com_err(programname, kret, proto_rcache_msg, my_id);
goto cleanup;
}
/* Initialize the auth context */
- if (kret = krb5_auth_con_init(kcontext, &auth_context)) {
+ kret = krb5_auth_con_init(kcontext, &auth_context);
+ if (kret) {
com_err(programname, kret, proto_auth_con_msg, my_id);
goto cleanup;
}
ntohl(sv_addr->sin_addr.s_addr),
ntohl(cl_addr->sin_addr.s_addr)));
/* Now, read in the AP_REQ message and decode it. */
- if (kret = krb5_read_message(kcontext,
- (krb5_pointer) &cl_sock,
- &in_data)) {
+ kret = krb5_read_message(kcontext, (krb5_pointer) &cl_sock, &in_data);
+ if (kret) {
com_err(programname, kret, proto_ap_req_msg, my_id);
goto cleanup;
}
("= %d:parse message(%d bytes)\n", my_id, in_data.length));
/* Parse the AP_REQ message */
- if (kret = krb5_rd_req(kcontext,
- &auth_context,
- &in_data,
- net_server_princ(),
- key_keytab_id(),
- &ap_options,
- &ticket)) {
+ kret = krb5_rd_req(kcontext, &auth_context, &in_data,
+ net_server_princ(), key_keytab_id(),
+ &ap_options, &ticket);
+ if (kret) {
com_err(programname, kret, proto_rd_req_msg, my_id);
goto err_reply;
}
DPRINT(DEBUG_PROTO, proto_debug_level,
("= %d:make AP_REP\n", my_id));
- if (kret = krb5_mk_rep(kcontext, auth_context, &out_data)) {
+ kret = krb5_mk_rep(kcontext, auth_context, &out_data);
+ if (kret) {
com_err(programname, kret, proto_mk_rep_msg, my_id);
goto cleanup;
}
DPRINT(DEBUG_PROTO, proto_debug_level,
("= %d:write AP_REP(%d bytes)\n", my_id, out_data.length));
- if (kret = krb5_write_message(kcontext,
- (krb5_pointer) &cl_sock,
- &out_data)) {
+ kret = krb5_write_message(kcontext, (krb5_pointer) &cl_sock,
+ &out_data);
+ if (kret) {
com_err(programname, kret, proto_wr_rep_msg, my_id);
goto cleanup;
}
* Read a command and figure out what to do.
*/
if (proto_proto_timeout > 0)
- alarm(proto_proto_timeout);
+ alarm((unsigned) proto_proto_timeout);
num_args = 0;
DPRINT(DEBUG_PROTO, proto_debug_level,
("= %d:waiting for command\n", my_id));
* Error messages.
*/
static const char *net_waiterr_msg = "\004child wait failed - cannot reap children";
+#if 0
static const char *net_def_realm_fmt = "%s: cannot get default realm (%s).\n";
+#endif
static const char *net_no_mem_fmt = "%s: cannot get memory.\n";
static const char *net_parse_srv_fmt = "%s: cannot parse server name %s (%s).\n";
static const char *net_no_hostname_fmt = "%s: cannot get our host name (%s).\n";
static int net_server_addr_init = 0;
static struct sockaddr_in net_server_addr;
static int net_listen_socket = -1;
-static int net_slaves_active = 0;
static int net_max_slaves = 0;
static net_slave_info *net_slave_table = (net_slave_info *) NULL;
("- name of service is %s\n", net_service_name));
/* Now formulate the principal name */
- if (kret = krb5_parse_name(kcontext,
- net_service_name,
- &net_service_principal)) {
+ kret = krb5_parse_name(kcontext, net_service_name, &net_service_principal);
+ if (kret) {
fprintf(stderr, net_parse_srv_fmt, programname, net_service_name,
error_message(kret));
goto done;