Binkp MD5 log update

This commit is contained in:
Michiel Broek 2003-07-07 18:06:02 +00:00
parent 7d7cd0e5f4
commit eff30fa40d

View File

@ -457,8 +457,7 @@ void b_nul(char *msg)
if (CFG.NoMD5) { if (CFG.NoMD5) {
Syslog('+', "Remote supports MD5, but it's turned off here"); Syslog('+', "Remote supports MD5, but it's turned off here");
} else { } else {
CRAMflag = TRUE; Syslog('b', "Remote requests MD5 password");
Syslog('+', "Remote requests MD5 password");
if (MD_challenge) if (MD_challenge)
free(MD_challenge); free(MD_challenge);
MD_challenge = MD_getChallenge(msg, NULL); MD_challenge = MD_getChallenge(msg, NULL);
@ -614,7 +613,7 @@ SM_STATE(waitaddr)
SM_STATE(sendpass) SM_STATE(sendpass)
if (MD_challenge && strlen(nodes.Spasswd) && CRAMflag) { if (MD_challenge && strlen(nodes.Spasswd)) {
char *pw = NULL, *tp = NULL; char *pw = NULL, *tp = NULL;
Syslog('b', "MD_challenge is set, building digest"); Syslog('b', "MD_challenge is set, building digest");
pw = xstrcpy(nodes.Spasswd); pw = xstrcpy(nodes.Spasswd);
@ -624,7 +623,9 @@ SM_STATE(sendpass)
SM_ERROR; SM_ERROR;
} }
SendPass = TRUE; SendPass = TRUE;
CRAMflag = TRUE;
binkp_send_control(MM_PWD, "%s", tp); binkp_send_control(MM_PWD, "%s", tp);
free(tp);
free(pw); free(pw);
} else { } else {
if (strlen(nodes.Spasswd)) { if (strlen(nodes.Spasswd)) {
@ -666,7 +667,7 @@ SM_STATE(waitok)
if (cmd) { if (cmd) {
if (rbuf[0] == MM_OK) { if (rbuf[0] == MM_OK) {
if (SendPass) if (SendPass)
Syslog('+', "Binkp: password protected session"); Syslog('+', "Binkp: %spassword protected session", CRAMflag ? "MD5 ":"");
else else
Syslog('+', "Binkp: unprotected session"); Syslog('+', "Binkp: unprotected session");
SM_SUCCESS; SM_SUCCESS;