/* running under, initialized in */
/* get_tickets() */
krb5_ccache ccache; /* Credentials cache which we'll be using */
-/* krb5_creds my_creds; /* My credentials */
krb5_creds creds;
krb5_address sender_addr;
krb5_address receiver_addr;
static void usage
PROTOTYPE((void));
krb5_error_code open_connection
- PROTOTYPE((char *, int *, char *, int));
+ PROTOTYPE((char *, int *, char *, unsigned int));
void kerberos_authenticate
PROTOTYPE((krb5_context, krb5_auth_context *,
int, krb5_principal, krb5_creds **));
get_tickets(context);
database_fd = open_database(context, file, &database_size);
- if (retval = open_connection(slave_host, &fd, Errmsg, sizeof(Errmsg))) {
+ retval = open_connection(slave_host, &fd, Errmsg, sizeof(Errmsg));
+ if (retval) {
com_err(progname, retval, "%s while opening connection to %s",
Errmsg, slave_host);
exit(1);
void get_tickets(context)
krb5_context context;
{
- char my_host_name[MAXHOSTNAMELEN];
char buf[BUFSIZ];
- char *cp;
- struct hostent *hp;
krb5_error_code retval;
static char tkstring[] = "/tmp/kproptktXXXXXX";
krb5_keytab keytab = NULL;
*/
(void) mktemp(tkstring);
sprintf(buf, "FILE:%s", tkstring);
- if (retval = krb5_cc_resolve(context, buf, &ccache)) {
+
+ retval = krb5_cc_resolve(context, buf, &ccache);
+ if (retval) {
com_err(progname, retval, "while opening credential cache %s",
buf);
exit(1);
}
- if (retval = krb5_cc_initialize(context, ccache, my_principal)) {
+
+ retval = krb5_cc_initialize(context, ccache, my_principal);
+ if (retval) {
com_err (progname, retval, "when initializing cache %s",
buf);
exit(1);
/*
* Now fill in the client....
*/
- if (retval = krb5_copy_principal(context, my_principal, &creds.client)) {
+ retval = krb5_copy_principal(context, my_principal, &creds.client);
+ if (retval) {
com_err(progname, retval, "While copying client principal");
(void) krb5_cc_destroy(context, ccache);
exit(1);
}
if (srvtab) {
- if (retval = krb5_kt_resolve(context, srvtab, &keytab)) {
+ retval = krb5_kt_resolve(context, srvtab, &keytab);
+ if (retval) {
com_err(progname, retval, "while resolving keytab");
(void) krb5_cc_destroy(context, ccache);
exit(1);
* Now destroy the cache right away --- the credentials we
* need will be in my_creds.
*/
- if (retval = krb5_cc_destroy(context, ccache)) {
+ retval = krb5_cc_destroy(context, ccache);
+ if (retval) {
com_err(progname, retval, "while destroying ticket cache");
exit(1);
}
krb5_error_code
open_connection(host, fd, Errmsg, ErrmsgSz)
- char *host;
- int *fd;
- char *Errmsg;
- int ErrmsgSz;
+ char *host;
+ int *fd;
+ char *Errmsg;
+ unsigned int ErrmsgSz;
{
int s;
krb5_error_code retval;
struct hostent *hp;
register struct servent *sp;
- struct sockaddr_in sin;
+ struct sockaddr_in my_sin;
int socket_length;
hp = gethostbyname(host);
*fd = -1;
return(0);
}
- sin.sin_family = hp->h_addrtype;
- memcpy((char *)&sin.sin_addr, hp->h_addr, sizeof(sin.sin_addr));
+ my_sin.sin_family = hp->h_addrtype;
+ memcpy((char *)&my_sin.sin_addr, hp->h_addr, sizeof(my_sin.sin_addr));
if(!port) {
sp = getservbyname(KPROP_SERVICE, "tcp");
if (sp == 0) {
*fd = -1;
return(0);
}
- sin.sin_port = sp->s_port;
+ my_sin.sin_port = sp->s_port;
} else
- sin.sin_port = port;
+ my_sin.sin_port = port;
s = socket(AF_INET, SOCK_STREAM, 0);
if (s < 0) {
(void) sprintf(Errmsg, "in call to socket");
return(errno);
}
- if (connect(s, (struct sockaddr *)&sin, sizeof sin) < 0) {
+ if (connect(s, (struct sockaddr *)&my_sin, sizeof my_sin) < 0) {
retval = errno;
close(s);
(void) sprintf(Errmsg, "in call to connect");
* Set receiver_addr and sender_addr.
*/
receiver_addr.addrtype = ADDRTYPE_INET;
- receiver_addr.length = sizeof(sin.sin_addr);
- receiver_addr.contents = (krb5_octet *) malloc(sizeof(sin.sin_addr));
- memcpy((char *) receiver_addr.contents, (char *) &sin.sin_addr,
- sizeof(sin.sin_addr));
+ receiver_addr.length = sizeof(my_sin.sin_addr);
+ receiver_addr.contents = (krb5_octet *) malloc(sizeof(my_sin.sin_addr));
+ memcpy((char *) receiver_addr.contents, (char *) &my_sin.sin_addr,
+ sizeof(my_sin.sin_addr));
- socket_length = sizeof(sin);
- if (getsockname(s, (struct sockaddr *)&sin, &socket_length) < 0) {
+ socket_length = sizeof(my_sin);
+ if (getsockname(s, (struct sockaddr *)&my_sin, &socket_length) < 0) {
retval = errno;
close(s);
(void) sprintf(Errmsg, "in call to getsockname");
return(retval);
}
sender_addr.addrtype = ADDRTYPE_INET;
- sender_addr.length = sizeof(sin.sin_addr);
- sender_addr.contents = (krb5_octet *) malloc(sizeof(sin.sin_addr));
- memcpy((char *) sender_addr.contents, (char *) &sin.sin_addr,
- sizeof(sin.sin_addr));
+ sender_addr.length = sizeof(my_sin.sin_addr);
+ sender_addr.contents = (krb5_octet *) malloc(sizeof(my_sin.sin_addr));
+ memcpy((char *) sender_addr.contents, (char *) &my_sin.sin_addr,
+ sizeof(my_sin.sin_addr));
return(0);
}
krb5_error *error = NULL;
krb5_ap_rep_enc_part *rep_result;
- if (retval = krb5_auth_con_init(context, auth_context))
+ retval = krb5_auth_con_init(context, auth_context);
+ if (retval)
exit(1);
krb5_auth_con_setflags(context, *auth_context,
KRB5_AUTH_CONTEXT_DO_SEQUENCE);
- if (retval = krb5_auth_con_setaddrs(context, *auth_context, &sender_addr,
- &receiver_addr)) {
+ retval = krb5_auth_con_setaddrs(context, *auth_context, &sender_addr,
+ &receiver_addr);
+ if (retval) {
com_err(progname, retval, "in krb5_auth_con_setaddrs");
exit(1);
}
- if (retval = krb5_sendauth(context, auth_context, (void *)&fd,
- kprop_version, me, creds.server,
- AP_OPTS_MUTUAL_REQUIRED, NULL, &creds, NULL,
- &error, &rep_result, new_creds)) {
- com_err(progname, retval, "while authenticating to server");
- if (error) {
- if (error->error == KRB_ERR_GENERIC) {
- if (error->text.data)
- fprintf(stderr,
- "Generic remote error: %s\n",
- error->text.data);
- } else if (error->error) {
- com_err(progname,
- error->error + ERROR_TABLE_BASE_krb5,
- "signalled from server");
- if (error->text.data)
- fprintf(stderr,
- "Error text from server: %s\n",
- error->text.data);
- }
- krb5_free_error(context, error);
- }
- exit(1);
+ retval = krb5_sendauth(context, auth_context, (void *)&fd,
+ kprop_version, me, creds.server,
+ AP_OPTS_MUTUAL_REQUIRED, NULL, &creds, NULL,
+ &error, &rep_result, new_creds);
+ if (retval) {
+ com_err(progname, retval, "while authenticating to server");
+ if (error) {
+ if (error->error == KRB_ERR_GENERIC) {
+ if (error->text.data)
+ fprintf(stderr,
+ "Generic remote error: %s\n",
+ error->text.data);
+ } else if (error->error) {
+ com_err(progname,
+ (krb5_error_code) error->error + ERROR_TABLE_BASE_krb5,
+ "signalled from server");
+ if (error->text.data)
+ fprintf(stderr,
+ "Error text from server: %s\n",
+ error->text.data);
+ }
+ krb5_free_error(context, error);
}
- krb5_free_ap_rep_enc_part(context, rep_result);
+ exit(1);
+ }
+ krb5_free_ap_rep_enc_part(context, rep_result);
}
char * dbpathname;
int fd;
{
int err;
- if (err = krb5_lock_file(context, fd, KRB5_LOCKMODE_UNLOCK))
+ err = krb5_lock_file(context, fd, KRB5_LOCKMODE_UNLOCK);
+ if (err)
com_err(progname, err, "while unlocking database '%s'", dbpathname);
free(dbpathname);
(void)close(fd);
inbuf.data = (char *) &send_size;
inbuf.length = sizeof(send_size); /* must be 4, really */
/* KPROP_CKSUMTYPE */
- if (retval = krb5_mk_safe(context, auth_context, &inbuf,
- &outbuf, NULL)) {
+ retval = krb5_mk_safe(context, auth_context, &inbuf,
+ &outbuf, NULL);
+ if (retval) {
com_err(progname, retval, "while encoding database size");
send_error(context, my_creds, fd, "while encoding database size", retval);
exit(1);
}
- if (retval = krb5_write_message(context, (void *) &fd, &outbuf)) {
+
+ retval = krb5_write_message(context, (void *) &fd, &outbuf);
+ if (retval) {
krb5_free_data_contents(context, &outbuf);
com_err(progname, retval, "while sending database size");
exit(1);
}
krb5_free_data_contents(context, &outbuf);
- /*
- * Initialize the initial vector.
- */
- if (retval = krb5_auth_con_initivector(context, auth_context)) {
- send_error(context, my_creds, fd,
- "failed while initializing i_vector", retval);
- com_err(progname, retval, "while allocating i_vector");
- exit(1);
- }
+ /*
+ * Initialize the initial vector.
+ */
+ retval = krb5_auth_con_initivector(context, auth_context);
+ if (retval) {
+ send_error(context, my_creds, fd,
+ "failed while initializing i_vector", retval);
+ com_err(progname, retval, "while allocating i_vector");
+ exit(1);
+ }
+
/*
* Send over the file, block by block....
*/
inbuf.data = buf;
sent_size = 0;
- while (n = read(database_fd, buf, sizeof(buf))) {
+ while ((n = read(database_fd, buf, sizeof(buf)))) {
inbuf.length = n;
- if (retval = krb5_mk_priv(context, auth_context, &inbuf,
- &outbuf, NULL)) {
+ retval = krb5_mk_priv(context, auth_context, &inbuf,
+ &outbuf, NULL);
+ if (retval) {
sprintf(buf,
"while encoding database block starting at %d",
sent_size);
send_error(context, my_creds, fd, buf, retval);
exit(1);
}
- if (retval = krb5_write_message(context, (void *)&fd,&outbuf)) {
+
+ retval = krb5_write_message(context, (void *)&fd,&outbuf);
+ if (retval) {
krb5_free_data_contents(context, &outbuf);
com_err(progname, retval,
"while sending database block starting at %d",
KRB5KRB_ERR_GENERIC);
exit(1);
}
+
/*
* OK, we've sent the database; now let's wait for a success
* indication from the remote end.
*/
- if (retval = krb5_read_message(context, (void *) &fd, &inbuf)) {
+ retval = krb5_read_message(context, (void *) &fd, &inbuf);
+ if (retval) {
com_err(progname, retval,
"while reading response from server");
exit(1);
* the error message
*/
if (krb5_is_krb_error(&inbuf)) {
- if (retval = krb5_rd_error(context, &inbuf, &error)) {
+ retval = krb5_rd_error(context, &inbuf, &error);
+ if (retval) {
com_err(progname, retval,
"while decoding error response from server");
exit(1);
"Generic remote error: %s\n",
error->text.data);
} else if (error->error) {
- com_err(progname, error->error + ERROR_TABLE_BASE_krb5,
+ com_err(progname,
+ (krb5_error_code) error->error +
+ ERROR_TABLE_BASE_krb5,
"signalled from server");
if (error->text.data)
fprintf(stderr,
krb5_free_error(context, error);
exit(1);
}
- if (retval = krb5_rd_safe(context,auth_context,&inbuf,&outbuf,NULL)) {
+
+ retval = krb5_rd_safe(context,auth_context,&inbuf,&outbuf,NULL);
+ if (retval) {
com_err(progname, retval,
"while decoding final size packet from server");
exit(1);
}
+
memcpy((char *)&send_size, outbuf.data, sizeof(send_size));
send_size = ntohl(send_size);
if (send_size != database_size) {
else
text = error_message(err_code);
error.text.length = strlen(text) + 1;
- if (error.text.data = malloc(error.text.length)) {
+ error.text.data = malloc((unsigned int) error.text.length);
+ if (error.text.data) {
strcpy(error.text.data, text);
if (!krb5_mk_error(context, &error, &outbuf)) {
(void) krb5_write_message(context, (void *)&fd,&outbuf);
char *kerb_database = NULL;
char *acl_file_name = KPROPD_ACL_FILE;
-int database_fd;
krb5_address sender_addr;
krb5_address receiver_addr;
short port = 0;
void do_standalone()
{
- struct sockaddr_in sin, frominet;
+ struct sockaddr_in my_sin, frominet;
struct servent *sp;
int finet, fromlen, s;
int ret;
com_err(progname, errno, "while obtaining socket");
exit(1);
}
- memset((char *) &sin,0, sizeof(sin));
+ memset((char *) &my_sin,0, sizeof(my_sin));
if(!port) {
sp = getservbyname(KPROP_SERVICE, "tcp");
if (sp == NULL) {
com_err(progname, 0, "%s/tcp: unknown service", KPROP_SERVICE);
exit(1);
}
- sin.sin_port = sp->s_port;
+ my_sin.sin_port = sp->s_port;
} else {
- sin.sin_port = port;
+ my_sin.sin_port = port;
}
- sin.sin_family = AF_INET;
- if ((ret = bind(finet, (struct sockaddr *) &sin, sizeof(sin))) < 0) {
+ my_sin.sin_family = AF_INET;
+ if ((ret = bind(finet, (struct sockaddr *) &my_sin, sizeof(my_sin))) < 0) {
if (debug) {
int on = 1;
fprintf(stderr,
if (setsockopt(finet, SOL_SOCKET, SO_REUSEADDR,
(char *)&on, sizeof(on)) < 0)
com_err(progname, errno, "in setsockopt(SO_REUSEADDR)");
- ret = bind(finet, (struct sockaddr *) &sin, sizeof(sin));
+ ret = bind(finet, (struct sockaddr *) &my_sin, sizeof(my_sin));
}
if (ret < 0) {
perror("bind");
krb5_error_code retval;
krb5_data confmsg;
int lock_fd;
- int omask;
+ mode_t omask;
krb5_enctype etype;
+ int database_fd;
fromlen = sizeof (from);
if (getpeername(fd, (struct sockaddr *) &from, &fromlen) < 0) {
if (!authorized_principal(kpropd_context, client, etype)) {
char *name;
- if (retval = krb5_unparse_name(kpropd_context, client, &name)) {
+ retval = krb5_unparse_name(kpropd_context, client, &name);
+ if (retval) {
com_err(progname, retval,
"While unparsing client name");
exit(1);
* Send the acknowledgement message generated in
* recv_database, then close the socket.
*/
- if (retval = krb5_write_message(kpropd_context, (void *) &fd,
- &confmsg)) {
+ retval = krb5_write_message(kpropd_context, (void *) &fd, &confmsg);
+ if (retval) {
krb5_free_data_contents(kpropd_context, &confmsg);
com_err(progname, retval,
"while sending # of received bytes");
char **argv;
{
register char *word, ch;
- char *cp;
- struct hostent *hp;
- char my_host_name[MAXHOSTNAMELEN], buf[BUFSIZ];
krb5_error_code retval;
static const char tmp[] = ".temp";
}
progname = *argv++;
- while (word = *argv++) {
+ while ((word = *argv++)) {
if (*word == '-') {
word++;
while (word && (ch = *word++)) {
* Figure out who's calling on the other end of the connection....
*/
void
-kerberos_authenticate(context, fd, clientp, etype, sin)
+kerberos_authenticate(context, fd, clientp, etype, my_sin)
krb5_context context;
int fd;
krb5_principal * clientp;
krb5_enctype * etype;
- struct sockaddr_in sin;
+ struct sockaddr_in my_sin;
{
krb5_error_code retval;
krb5_ticket * ticket;
* Set recv_addr and send_addr
*/
sender_addr.addrtype = ADDRTYPE_INET;
- sender_addr.length = sizeof(sin.sin_addr);
- sender_addr.contents = (krb5_octet *) malloc(sizeof(sin.sin_addr));
- memcpy((char *) sender_addr.contents, (char *) &sin.sin_addr,
- sizeof(sin.sin_addr));
+ sender_addr.length = sizeof(my_sin.sin_addr);
+ sender_addr.contents = (krb5_octet *) malloc(sizeof(my_sin.sin_addr));
+ memcpy((char *) sender_addr.contents, (char *) &my_sin.sin_addr,
+ sizeof(my_sin.sin_addr));
sin_length = sizeof(r_sin);
if (getsockname(fd, (struct sockaddr *) &r_sin, &sin_length)) {
if (debug) {
char *name;
- if (retval = krb5_unparse_name(context, server, &name)) {
+
+ retval = krb5_unparse_name(context, server, &name);
+ if (retval) {
com_err(progname, retval, "While unparsing client name");
exit(1);
}
free(name);
}
- if (retval = krb5_auth_con_init(context, &auth_context)) {
- syslog(LOG_ERR, "Error in krb5_auth_con_ini: %s",error_message(retval));
+ retval = krb5_auth_con_init(context, &auth_context);
+ if (retval) {
+ syslog(LOG_ERR, "Error in krb5_auth_con_ini: %s",
+ error_message(retval));
exit(1);
}
- if (retval = krb5_auth_con_setflags(context, auth_context,
- KRB5_AUTH_CONTEXT_DO_SEQUENCE)) {
+ retval = krb5_auth_con_setflags(context, auth_context,
+ KRB5_AUTH_CONTEXT_DO_SEQUENCE);
+ if (retval) {
syslog(LOG_ERR, "Error in krb5_auth_con_setflags: %s",
error_message(retval));
exit(1);
}
- if (retval = krb5_auth_con_setaddrs(context, auth_context, &receiver_addr,
- &sender_addr)) {
+ retval = krb5_auth_con_setaddrs(context, auth_context, &receiver_addr,
+ &sender_addr);
+ if (retval) {
syslog(LOG_ERR, "Error in krb5_auth_con_setaddrs: %s",
error_message(retval));
exit(1);
}
if (srvtab) {
- if (retval = krb5_kt_resolve(context, srvtab, &keytab)) {
+ retval = krb5_kt_resolve(context, srvtab, &keytab);
+ if (retval) {
syslog(LOG_ERR, "Error in krb5_kt_resolve: %s", error_message(retval));
exit(1);
}
}
- if (retval = krb5_recvauth(context, &auth_context, (void *) &fd,
- kprop_version, server, 0, keytab, &ticket)){
+ retval = krb5_recvauth(context, &auth_context, (void *) &fd,
+ kprop_version, server, 0, keytab, &ticket);
+ if (retval) {
syslog(LOG_ERR, "Error in krb5_recvauth: %s", error_message(retval));
exit(1);
}
- if (retval = krb5_copy_principal(context,
- ticket->enc_part2->client, clientp)) {
+ retval = krb5_copy_principal(context, ticket->enc_part2->client, clientp);
+ if (retval) {
syslog(LOG_ERR, "Error in krb5_copy_prinicpal: %s",
error_message(retval));
exit(1);
char * name;
char etypebuf[100];
- if (retval = krb5_unparse_name(context, *clientp, &name)) {
+ retval = krb5_unparse_name(context, *clientp, &name);
+ if (retval) {
com_err(progname, retval, "While unparsing client name");
exit(1);
}
- if (retval = krb5_enctype_to_string(*etype, etypebuf,
- sizeof(etypebuf))) {
+ retval = krb5_enctype_to_string(*etype, etypebuf, sizeof(etypebuf));
+ if (retval) {
com_err(progname, retval, "While unparsing ticket etype");
exit(1);
}
/*
* Receive and decode size from client
*/
- if (retval = krb5_read_message(context, (void *) &fd, &inbuf)) {
+ retval = krb5_read_message(context, (void *) &fd, &inbuf);
+ if (retval) {
send_error(context, fd, retval, "while reading database size");
com_err(progname, retval,
"while reading size of database from client");
}
if (krb5_is_krb_error(&inbuf))
recv_error(context, &inbuf);
- if (retval = krb5_rd_safe(context,auth_context,&inbuf,&outbuf,NULL)) {
- send_error(context, fd, retval, "while decoding database size");
+ retval = krb5_rd_safe(context,auth_context,&inbuf,&outbuf,NULL);
+ if (retval) {
+ send_error(context, fd, retval,
+ "while decoding database size");
krb5_free_data_contents(context, &inbuf);
com_err(progname, retval,
"while decoding database size from client");
krb5_free_data_contents(context, &outbuf);
database_size = ntohl(database_size);
- /*
- * Initialize the initial vector.
- */
- if (retval = krb5_auth_con_initivector(context, auth_context)) {
- send_error(context, fd, retval, "failed while initializing i_vector");
- com_err(progname, retval, "while initializing i_vector");
- exit(1);
- }
+ /*
+ * Initialize the initial vector.
+ */
+ retval = krb5_auth_con_initivector(context, auth_context);
+ if (retval) {
+ send_error(context, fd, retval,
+ "failed while initializing i_vector");
+ com_err(progname, retval, "while initializing i_vector");
+ exit(1);
+ }
/*
* Now start receiving the database from the net
*/
received_size = 0;
while (received_size < database_size) {
- if (retval = krb5_read_message(context, (void *) &fd, &inbuf)) {
+ retval = krb5_read_message(context, (void *) &fd, &inbuf);
+ if (retval) {
sprintf(buf,
"while reading database block starting at offset %d",
received_size);
}
if (krb5_is_krb_error(&inbuf))
recv_error(context, &inbuf);
- if (retval = krb5_rd_priv(context, auth_context, &inbuf,
- &outbuf, NULL)) {
+ retval = krb5_rd_priv(context, auth_context, &inbuf,
+ &outbuf, NULL);
+ if (retval) {
sprintf(buf,
"while decoding database block starting at offset %d",
received_size);
database_size = htonl(database_size);
inbuf.data = (char *) &database_size;
inbuf.length = sizeof(database_size);
- if (retval = krb5_mk_safe(context,auth_context,&inbuf,confmsg,NULL)) {
+ retval = krb5_mk_safe(context,auth_context,&inbuf,confmsg,NULL);
+ if (retval) {
com_err(progname, retval,
"while encoding # of receieved bytes");
send_error(context, fd, retval,
}
}
error.text.length = strlen(text) + 1;
- if (error.text.data = malloc(error.text.length)) {
+ error.text.data = malloc(error.text.length);
+ if (error.text.data) {
strcpy(error.text.data, text);
if (!krb5_mk_error(context, &error, &outbuf)) {
(void) krb5_write_message(context, (void *)&fd,&outbuf);
krb5_error *error;
krb5_error_code retval;
- if (retval = krb5_rd_error(context, inbuf, &error)) {
+ retval = krb5_rd_error(context, inbuf, &error);
+ if (retval) {
com_err(progname, retval,
"while decoding error packet from client");
exit(1);
"Generic remote error: %s\n",
error->text.data);
} else if (error->error) {
- com_err(progname, error->error + ERROR_TABLE_BASE_krb5,
+ com_err(progname,
+ (krb5_error_code) error->error + ERROR_TABLE_BASE_krb5,
"signalled from server");
if (error->text.data)
fprintf(stderr,
}
void
-load_database(context, kdb5_util, database_file_name)
+load_database(context, kdb_util, database_file_name)
krb5_context context;
- char *kdb5_util;
+ char *kdb_util;
char *database_file_name;
{
static char *edit_av[10];
if (debug)
printf("calling kdb5_util to load database\n");
- edit_av[0] = kdb5_util;
+ edit_av[0] = kdb_util;
count = 1;
if (realm) {
edit_av[count++] = "-r";
switch(child_pid = fork()) {
case -1:
com_err(progname, errno, "while trying to fork %s",
- kdb5_util);
+ kdb_util);
exit(1);
case 0:
if (!debug) {
dup(0);
}
- execv(kdb5_util, edit_av);
+ execv(kdb_util, edit_av);
retval = errno;
if (!debug)
dup2(save_stderr, 2);
com_err(progname, retval, "while trying to exec %s",
- kdb5_util);
+ kdb_util);
_exit(1);
/*NOTREACHED*/
default:
printf("Child PID is %d\n", child_pid);
if (wait(&waitb) < 0) {
com_err(progname, errno, "while waiting for %s",
- kdb5_util);
+ kdb_util);
exit(1);
}
}
- if (error_ret = WEXITSTATUS(waitb)) {
+ error_ret = WEXITSTATUS(waitb);
+ if (error_ret) {
com_err(progname, 0, "%s returned a bad exit status (%d)",
- kdb5_util, error_ret);
+ kdb_util, error_ret);
exit(1);
}
return;