/* Send private message to Client */
if (krb5_write_message(&client_server_info.client_socket, &msg_data)){
+ free(msg_data.data);
com_err("adm_build_key", 0, "Error Performing Password Write");
return(5); /* Protocol Failure */
}
syslog(LOG_AUTH | LOG_INFO,
- "Remote Administrative Addition Request for %s by %s",
+ "Remote Administrative Random Password Change Request for %s by %s",
customer_name, client_server_info.name_of_client);
if (retval = krb5_parse_name(customer_name, &newprinc)) {
if (!adm_princ_exists("adm_mod_old_key", newprinc,
&entry, &nprincs)) {
+ krb5_db_free_principal(&entry, nprincs);
com_err("adm_mod_old_key", 0,
"principal '%s' is not in the database",
customer_name);
free(outbuf.data);
if (krb5_write_message(&client_server_info.client_socket, &msg_data)){
+ free(msg_data.data);
krb5_free_principal(newprinc);
krb5_db_free_principal(&entry, nprincs);
com_err("adm_mod_old_key", 0,
}
retval = krb5_db_put_principal(&entry, &one);
+ if (retval) {
+ com_err("adm_mod_old_key", retval, "while storing principal");
+ krb5_free_principal(newprinc);
+ krb5_db_free_principal(&entry, nprincs);
+ return(8); /* Update failed */
+ }
one = 1;
} /* for */
if (!adm_princ_exists("adm_inq_old_key", newprinc,
&entry, &nprincs)) {
+ krb5_db_free_principal(&entry, nprincs);
krb5_free_principal(newprinc);
free(fullname);
com_err("adm_inq_old_key", 0, "principal '%s' is not in the database",
krb5_free_principal(newprinc);
free(fullname);
com_err("adm_inq_old_key", 0, "Unable to Format Inquiry Data");
+ return(5); /* XXX protocol failure --- not right, but.. */
}
outbuf.length = strlen(outbuf.data);
krb5_db_free_principal(&entry, nprincs);
free(outbuf.data);
return(5); /* Protocol Failure */
}
+ free(outbuf.data);
/* Send Inquiry Information */
if (krb5_write_message(&client_server_info.client_socket, &msg_data)){
+ free(msg_data.data);
com_err("adm_inq_old_key", 0, "Error Performing Write");
return(5); /* Protocol Failure */
}
return(5); /* Protocol Failure */
}
+ /* XXX Decrypt client response.... and we don't use it?!? */
+
free(msg_data.data);
free(inbuf.data);
return(retval);
error_message(retval));
(void) sprintf(retbuf, "kadmind error during recvauth: %s\n",
error_message(retval));
- exit(1);
+ krb5_free_keyblock(cpw_key.key);
+ goto finish;
}
+ krb5_free_keyblock(cpw_key.key);
/* Check if ticket was issued using password (and not tgt)
* within the last 5 minutes
0,
0,
&msg_data))) {
+ free(inbuf.data);
syslog(LOG_ERR, "kadmind error: rd_priv:%s\n", error_message(retval));
goto finish;
}
/* Send Final Reply to Client */
if (retval = krb5_write_message(&client_server_info.client_socket,
&msg_data)){
+ free(msg_data.data);
syslog(LOG_ERR, "Error Performing Final Write: %s",
error_message(retval));
retval = 1;