mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-28 19:21:20 +00:00
less and less auth code
This commit is contained in:
parent
6ce5c8eb78
commit
04f121b88f
@ -137,10 +137,10 @@ static int auth_pending[NUM_PPP];
|
|||||||
/* Records which authentication operations have been completed. */
|
/* Records which authentication operations have been completed. */
|
||||||
int auth_done[NUM_PPP];
|
int auth_done[NUM_PPP];
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
/* List of addresses which the peer may use. */
|
/* List of addresses which the peer may use. */
|
||||||
static struct permitted_ip *addresses[NUM_PPP];
|
static struct permitted_ip *addresses[NUM_PPP];
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
|
||||||
/* Wordlist giving addresses which the peer may use
|
/* Wordlist giving addresses which the peer may use
|
||||||
without authenticating itself. */
|
without authenticating itself. */
|
||||||
static struct wordlist *noauth_addrs;
|
static struct wordlist *noauth_addrs;
|
||||||
@ -149,10 +149,10 @@ static struct wordlist *noauth_addrs;
|
|||||||
/* Remote telephone number, if available */
|
/* Remote telephone number, if available */
|
||||||
char remote_number[MAXNAMELEN];
|
char remote_number[MAXNAMELEN];
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
/* Wordlist giving remote telephone numbers which may connect. */
|
/* Wordlist giving remote telephone numbers which may connect. */
|
||||||
static struct wordlist *permitted_numbers;
|
static struct wordlist *permitted_numbers;
|
||||||
|
|
||||||
#if 0 /* UNUSED */
|
|
||||||
/* Extra options to apply, from the secrets file entry for the peer. */
|
/* Extra options to apply, from the secrets file entry for the peer. */
|
||||||
static struct wordlist *extra_options;
|
static struct wordlist *extra_options;
|
||||||
#endif /* UNUSED */
|
#endif /* UNUSED */
|
||||||
@ -227,40 +227,39 @@ bool cryptpap = 0; /* Passwords in pap-secrets are encrypted */
|
|||||||
//bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */
|
//bool refuse_mschap_v2 = 1; /* Don't wanna auth. ourselves with MS-CHAPv2 */
|
||||||
#endif
|
#endif
|
||||||
bool usehostname = 0; /* Use hostname for our_name */
|
bool usehostname = 0; /* Use hostname for our_name */
|
||||||
|
#if 0 /* UNUSED */
|
||||||
bool auth_required = 0; /* Always require authentication from peer */
|
bool auth_required = 0; /* Always require authentication from peer */
|
||||||
|
#endif /* UNUSED */
|
||||||
bool allow_any_ip = 0; /* Allow peer to use any IP address */
|
bool allow_any_ip = 0; /* Allow peer to use any IP address */
|
||||||
bool explicit_remote = 0; /* User specified explicit remote name */
|
bool explicit_remote = 0; /* User specified explicit remote name */
|
||||||
bool explicit_user = 0; /* Set if "user" option supplied */
|
bool explicit_user = 0; /* Set if "user" option supplied */
|
||||||
bool explicit_passwd = 0; /* Set if "password" option supplied */
|
bool explicit_passwd = 0; /* Set if "password" option supplied */
|
||||||
char remote_name[MAXNAMELEN]; /* Peer's name for authentication */
|
char remote_name[MAXNAMELEN]; /* Peer's name for authentication */
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
static char *uafname; /* name of most recent +ua file */
|
static char *uafname; /* name of most recent +ua file */
|
||||||
|
|
||||||
extern char *crypt __P((const char *, const char *));
|
extern char *crypt __P((const char *, const char *));
|
||||||
|
#endif /* UNUSED */
|
||||||
/* Prototypes for procedures local to this file. */
|
/* Prototypes for procedures local to this file. */
|
||||||
|
|
||||||
static void network_phase __P((int));
|
static void network_phase __P((int));
|
||||||
static void check_idle __P((void *));
|
static void check_idle __P((void *));
|
||||||
static void connect_time_expired __P((void *));
|
static void connect_time_expired __P((void *));
|
||||||
static int null_login __P((int));
|
|
||||||
#if 0 /* UNUSED */
|
#if 0 /* UNUSED */
|
||||||
|
static int null_login __P((int));
|
||||||
/* static int get_pap_passwd __P((char *)); */
|
/* static int get_pap_passwd __P((char *)); */
|
||||||
static int have_pap_secret __P((int *));
|
static int have_pap_secret __P((int *));
|
||||||
static int have_chap_secret __P((char *, char *, int, int *));
|
static int have_chap_secret __P((char *, char *, int, int *));
|
||||||
static int have_srp_secret __P((char *client, char *server, int need_ip,
|
static int have_srp_secret __P((char *client, char *server, int need_ip,
|
||||||
int *lacks_ipp));
|
int *lacks_ipp));
|
||||||
#endif /* UNUSED */
|
|
||||||
static int ip_addr_check __P((u_int32_t, struct permitted_ip *));
|
static int ip_addr_check __P((u_int32_t, struct permitted_ip *));
|
||||||
#if 0 /* UNUSED */
|
|
||||||
static int scan_authfile __P((FILE *, char *, char *, char *,
|
static int scan_authfile __P((FILE *, char *, char *, char *,
|
||||||
struct wordlist **, struct wordlist **,
|
struct wordlist **, struct wordlist **,
|
||||||
char *, int));
|
char *, int));
|
||||||
static void free_wordlist __P((struct wordlist *));
|
static void free_wordlist __P((struct wordlist *));
|
||||||
static void set_allowed_addrs __P((int, struct wordlist *, struct wordlist *));
|
static void set_allowed_addrs __P((int, struct wordlist *, struct wordlist *));
|
||||||
#endif /* UNUSED */
|
|
||||||
static int some_ip_ok __P((struct wordlist *));
|
static int some_ip_ok __P((struct wordlist *));
|
||||||
#if 0 /* UNUSE */
|
|
||||||
static int setupapfile __P((char **));
|
static int setupapfile __P((char **));
|
||||||
static int privgroup __P((char **));
|
static int privgroup __P((char **));
|
||||||
static int set_noauth_addr __P((char **));
|
static int set_noauth_addr __P((char **));
|
||||||
@ -751,6 +750,7 @@ link_established(unit)
|
|||||||
(*protp->lowerup)(unit);
|
(*protp->lowerup)(unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0 /* UNUSED */
|
||||||
#if PPP_ALLOWED_ADDRS
|
#if PPP_ALLOWED_ADDRS
|
||||||
if (!auth_required && noauth_addrs != NULL)
|
if (!auth_required && noauth_addrs != NULL)
|
||||||
set_allowed_addrs(unit, NULL, NULL);
|
set_allowed_addrs(unit, NULL, NULL);
|
||||||
@ -781,6 +781,7 @@ link_established(unit)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif /* UNUSED */
|
||||||
|
|
||||||
new_phase(PHASE_AUTHENTICATE);
|
new_phase(PHASE_AUTHENTICATE);
|
||||||
auth = 0;
|
auth = 0;
|
||||||
@ -1567,7 +1568,6 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg)
|
|||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* null_login - Check if a username of "" and a password of "" are
|
* null_login - Check if a username of "" and a password of "" are
|
||||||
@ -1578,9 +1578,6 @@ static int
|
|||||||
null_login(unit)
|
null_login(unit)
|
||||||
int unit;
|
int unit;
|
||||||
{
|
{
|
||||||
return 0;
|
|
||||||
/* FIXME: clean that */
|
|
||||||
#if 0 /* UNUSED */
|
|
||||||
char *filename;
|
char *filename;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
int i, ret;
|
int i, ret;
|
||||||
@ -1619,10 +1616,8 @@ null_login(unit)
|
|||||||
free_wordlist(addrs);
|
free_wordlist(addrs);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
/*
|
/*
|
||||||
* get_pap_passwd - get a password for authenticating ourselves with
|
* get_pap_passwd - get a password for authenticating ourselves with
|
||||||
* our peer using PAP. Returns 1 on success, 0 if no suitable password
|
* our peer using PAP. Returns 1 on success, 0 if no suitable password
|
||||||
|
Loading…
x
Reference in New Issue
Block a user