* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-#define RCSID "$Id: auth.c,v 1.95 2003/06/11 23:56:26 paulus Exp $"
+#define RCSID "$Id: auth.c,v 1.98 2004/10/31 22:23:18 paulus Exp $"
#include <stdio.h>
#include <stddef.h>
void *arg;
{
info("Connect time expired");
- lcp_close(0, "Connect time expired"); /* Close connection */
status = EXIT_CONNECT_TIME;
+ lcp_close(0, "Connect time expired"); /* Close connection */
}
/*
if (auth_required) {
allow_any_ip = 0;
if (!wo->neg_chap && !wo->neg_upap && !wo->neg_eap) {
- wo->neg_chap = 1; wo->chap_mdtype = MDTYPE_ALL;
+ wo->neg_chap = 1;
+ wo->chap_mdtype = chap_mdtype_all;
wo->neg_upap = 1;
wo->neg_eap = 1;
}
} else {
- wo->neg_chap = 0; wo->chap_mdtype = MDTYPE_NONE;
+ wo->neg_chap = 0;
+ wo->chap_mdtype = MDTYPE_NONE;
wo->neg_upap = 0;
wo->neg_eap = 0;
}
if (pap_auth_hook) {
ret = (*pap_auth_hook)(user, passwd, msg, &addrs, &opts);
if (ret >= 0) {
+ /* note: set_allowed_addrs() saves opts (but not addrs):
+ don't free it! */
if (ret)
set_allowed_addrs(unit, addrs, opts);
- BZERO(passwd, sizeof(passwd));
+ else if (opts != 0)
+ free_wordlist(opts);
if (addrs != 0)
free_wordlist(addrs);
- if (opts != 0) {
- free_wordlist(opts);
- }
+ BZERO(passwd, sizeof(passwd));
return ret? UPAP_AUTHACK: UPAP_AUTHNAK;
}
}