Fri Jan 19 10:45:29 1996 Sam Hartman <hartmans@tertius.mit.edu>
* krshd.c (recvauth): Verify checksum against command line and remote user.
+ (recvauth): Fix accidental memory leak with authenticator and fix
+ include correct username in checksum
* kcmd.c: Send authenticator with checksum of command line and remote user.
goto error_cleanup;
strcpy(chksumbuf,cmdbuf);
- strcat(chksumbuf,remuser);
+ strcat(chksumbuf,locuser);
if ( status = krb5_verify_checksum(bsd_context,
authenticator->checksum->checksum_type,
goto error_cleanup;
error_cleanup:
-krb5_free_authenticator(bsd_context, authenticator);
krb5_xfree(chksumbuf);
-if (status)
- return status;
+ if (status) {
+ krb5_free_authenticator(bsd_context, authenticator);
+ return status;
+ }
}
+ krb5_free_authenticator(bsd_context, authenticator);
+
/* Setup eblock for encrypted sessions. */
krb5_use_enctype(bsd_context, &eblock, ticket->enc_part2->session->enctype);