Switched to use the new session password field
This commit is contained in:
parent
6824b44975
commit
ef92dc3316
@ -440,9 +440,9 @@ SM_STATE(waitconn)
|
|||||||
|
|
||||||
SM_STATE(sendpass)
|
SM_STATE(sendpass)
|
||||||
|
|
||||||
if (strlen(nodes.Epasswd)) {
|
if (strlen(nodes.Spasswd)) {
|
||||||
SendPass = TRUE;
|
SendPass = TRUE;
|
||||||
binkp_send_control(MM_PWD, "%s", nodes.Epasswd);
|
binkp_send_control(MM_PWD, "%s", nodes.Spasswd);
|
||||||
} else {
|
} else {
|
||||||
binkp_send_control(MM_PWD, "-");
|
binkp_send_control(MM_PWD, "-");
|
||||||
}
|
}
|
||||||
@ -714,11 +714,11 @@ SM_STATE(pwdack)
|
|||||||
Syslog('+', "Node not in setup, unprotected BINKP session");
|
Syslog('+', "Node not in setup, unprotected BINKP session");
|
||||||
binkp_send_control(MM_OK, "");
|
binkp_send_control(MM_OK, "");
|
||||||
SM_SUCCESS;
|
SM_SUCCESS;
|
||||||
} else if ((strcmp(&rbuf[1], "-") == 0) && Loaded && !strlen(nodes.Epasswd)) {
|
} else if ((strcmp(&rbuf[1], "-") == 0) && Loaded && !strlen(nodes.Spasswd)) {
|
||||||
Syslog('+', "Node in setup but no session password, unprotected BINKP session");
|
Syslog('+', "Node in setup but no session password, unprotected BINKP session");
|
||||||
binkp_send_control(MM_OK, "");
|
binkp_send_control(MM_OK, "");
|
||||||
SM_SUCCESS;
|
SM_SUCCESS;
|
||||||
} else if ((strcmp(&rbuf[1], nodes.Epasswd) == 0) && Loaded) {
|
} else if ((strcmp(&rbuf[1], nodes.Spasswd) == 0) && Loaded) {
|
||||||
Syslog('+', "Password OK, protected BINKP session");
|
Syslog('+', "Password OK, protected BINKP session");
|
||||||
if (inbound)
|
if (inbound)
|
||||||
free(inbound);
|
free(inbound);
|
||||||
@ -726,7 +726,7 @@ SM_STATE(pwdack)
|
|||||||
binkp_send_control(MM_OK, "");
|
binkp_send_control(MM_OK, "");
|
||||||
SM_SUCCESS;
|
SM_SUCCESS;
|
||||||
} else {
|
} else {
|
||||||
Syslog('?', "Password error: expected \"%s\", got \"%s\"", nodes.Epasswd, &rbuf[1]);
|
Syslog('?', "Password error: expected \"%s\", got \"%s\"", nodes.Spasswd, &rbuf[1]);
|
||||||
binkp_send_control(MM_ERR, "*** Password error, check setup ***");
|
binkp_send_control(MM_ERR, "*** Password error, check setup ***");
|
||||||
SM_ERROR;
|
SM_ERROR;
|
||||||
}
|
}
|
||||||
|
@ -155,17 +155,17 @@ int rx_emsi(char *data)
|
|||||||
if (localoptions & NOFREQS)
|
if (localoptions & NOFREQS)
|
||||||
emsi_local_opts |= OPT_NRQ;
|
emsi_local_opts |= OPT_NRQ;
|
||||||
|
|
||||||
if (strlen(nodes.Epasswd)) {
|
if (strlen(nodes.Spasswd)) {
|
||||||
if ((strncasecmp(emsi_remote_password, nodes.Epasswd, strlen(nodes.Epasswd)) == 0) &&
|
if ((strncasecmp(emsi_remote_password, nodes.Spasswd, strlen(nodes.Spasswd)) == 0) &&
|
||||||
(strlen(emsi_remote_password) == strlen(nodes.Epasswd))) {
|
(strlen(emsi_remote_password) == strlen(nodes.Spasswd))) {
|
||||||
emsi_local_password = xstrcpy(nodes.Epasswd);
|
emsi_local_password = xstrcpy(nodes.Spasswd);
|
||||||
if (inbound)
|
if (inbound)
|
||||||
free(inbound);
|
free(inbound);
|
||||||
inbound = xstrcpy(CFG.pinbound);
|
inbound = xstrcpy(CFG.pinbound);
|
||||||
Syslog('+', "Password correct, protected EMSI session");
|
Syslog('+', "Password correct, protected EMSI session");
|
||||||
} else {
|
} else {
|
||||||
denypw = 1;
|
denypw = 1;
|
||||||
Syslog('?', "Remote password \"%s\", expected \"%s\"", MBSE_SS(emsi_remote_password), nodes.Epasswd);
|
Syslog('?', "Remote password \"%s\", expected \"%s\"", MBSE_SS(emsi_remote_password), nodes.Spasswd);
|
||||||
emsi_local_password = xstrcpy((char *)"BAD_PASS");
|
emsi_local_password = xstrcpy((char *)"BAD_PASS");
|
||||||
emsi_local_lcodes = LCODE_HAT;
|
emsi_local_lcodes = LCODE_HAT;
|
||||||
}
|
}
|
||||||
|
@ -107,8 +107,8 @@ char *mkemsidat(int caller)
|
|||||||
if (emsi_local_password)
|
if (emsi_local_password)
|
||||||
p=xstrcat(p,emsi_local_password);
|
p=xstrcat(p,emsi_local_password);
|
||||||
else
|
else
|
||||||
if (strlen(nodes.Epasswd)) {
|
if (strlen(nodes.Spasswd)) {
|
||||||
p = xstrcat(p, nodes.Epasswd);
|
p = xstrcat(p, nodes.Spasswd);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (emsi_local_opts & OPT_EII) {
|
if (emsi_local_opts & OPT_EII) {
|
||||||
|
@ -167,17 +167,17 @@ int rx_yoohoo(void)
|
|||||||
if (nlent)
|
if (nlent)
|
||||||
rdoptions(Loaded);
|
rdoptions(Loaded);
|
||||||
|
|
||||||
if (strlen(nodes.Epasswd)) {
|
if (strlen(nodes.Spasswd)) {
|
||||||
if ((strncasecmp((char*)hello2.my_password, nodes.Epasswd, strlen(nodes.Epasswd)) == 0) &&
|
if ((strncasecmp((char*)hello2.my_password, nodes.Spasswd, strlen(nodes.Spasswd)) == 0) &&
|
||||||
(strlen((char*)hello2.my_password) == strlen(nodes.Epasswd))) {
|
(strlen((char*)hello2.my_password) == strlen(nodes.Spasswd))) {
|
||||||
Syslog('+', "Password correct, protected mail session");
|
Syslog('+', "Password correct, protected mail session");
|
||||||
if (inbound)
|
if (inbound)
|
||||||
free(inbound);
|
free(inbound);
|
||||||
inbound = xstrcpy(CFG.pinbound);
|
inbound = xstrcpy(CFG.pinbound);
|
||||||
pwd = xstrcpy(nodes.Epasswd);
|
pwd = xstrcpy(nodes.Spasswd);
|
||||||
} else {
|
} else {
|
||||||
pwd = (char *)"BAD_PASS";
|
pwd = (char *)"BAD_PASS";
|
||||||
Syslog('?', "Remote password \"%s\", expected \"%s\"", (char*)hello2.my_password, nodes.Epasswd);
|
Syslog('?', "Remote password \"%s\", expected \"%s\"", (char*)hello2.my_password, nodes.Spasswd);
|
||||||
localcaps = 0;
|
localcaps = 0;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
@ -224,8 +224,8 @@ int tx_yoohoo(void)
|
|||||||
|
|
||||||
Syslog('+', "Start outbound YooHoo session");
|
Syslog('+', "Start outbound YooHoo session");
|
||||||
|
|
||||||
if (strlen(nodes.Epasswd))
|
if (strlen(nodes.Spasswd))
|
||||||
pwd = xstrcpy(nodes.Epasswd);
|
pwd = xstrcpy(nodes.Spasswd);
|
||||||
else
|
else
|
||||||
pwd = NULL;
|
pwd = NULL;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user