mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-12-26 12:13:47 +00:00
PPP, CORE: code cleaning
This commit is contained in:
parent
5ae7ee5276
commit
708e421ec3
@ -1008,8 +1008,8 @@ int auth_check_passwd(ppp_pcb *pcb, char *auser, int userlen, char *apasswd, int
|
|||||||
int secretpasswdlen;
|
int secretpasswdlen;
|
||||||
|
|
||||||
if (pcb->settings.user && pcb->settings.passwd) {
|
if (pcb->settings.user && pcb->settings.passwd) {
|
||||||
secretuserlen = strlen(pcb->settings.user);
|
secretuserlen = (int)strlen(pcb->settings.user);
|
||||||
secretpasswdlen = strlen(pcb->settings.passwd);
|
secretpasswdlen = (int)strlen(pcb->settings.passwd);
|
||||||
if (secretuserlen == userlen
|
if (secretuserlen == userlen
|
||||||
&& secretpasswdlen == passwdlen
|
&& secretpasswdlen == passwdlen
|
||||||
&& !memcmp(auser, pcb->settings.user, userlen)
|
&& !memcmp(auser, pcb->settings.user, userlen)
|
||||||
@ -1898,7 +1898,6 @@ have_srp_secret(client, server, need_ip, lacks_ipp)
|
|||||||
*/
|
*/
|
||||||
int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secret, int *secret_len, int am_server) {
|
int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secret, int *secret_len, int am_server) {
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
LWIP_UNUSED_ARG(server);
|
LWIP_UNUSED_ARG(server);
|
||||||
LWIP_UNUSED_ARG(am_server);
|
LWIP_UNUSED_ARG(am_server);
|
||||||
|
|
||||||
@ -1914,20 +1913,9 @@ int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secre
|
|||||||
|
|
||||||
MEMCPY(secret, pcb->settings.passwd, len);
|
MEMCPY(secret, pcb->settings.passwd, len);
|
||||||
*secret_len = len;
|
*secret_len = len;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
/* FIXME: clean that */
|
#if 0 /* UNUSED */
|
||||||
#if 0
|
|
||||||
strlcpy(rname, ppp_settings.user, sizeof(rname));
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
strlcpy(rname, ppp_settings.user, sizeof(rname));
|
|
||||||
strlcpy(secret, ppp_settings.passwd, sizeof(secret));
|
|
||||||
secret_len = strlen(secret);
|
|
||||||
*/
|
|
||||||
|
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int ret, len;
|
int ret, len;
|
||||||
char *filename;
|
char *filename;
|
||||||
@ -1979,7 +1967,7 @@ int get_secret(ppp_pcb *pcb, const char *client, const char *server, char *secre
|
|||||||
*secret_len = len;
|
*secret_len = len;
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
#endif
|
#endif /* UNUSED */
|
||||||
}
|
}
|
||||||
#endif /* PPP_AUTH_SUPPORT */
|
#endif /* PPP_AUTH_SUPPORT */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user