static option_t pap_option_list[] = {
{ "hide-password", o_bool, &hide_password,
"Don't output passwords to log", 1 },
static option_t pap_option_list[] = {
{ "hide-password", o_bool, &hide_password,
"Don't output passwords to log", 1 },
{ "pap-restart", o_int, &upap[0].us_timeouttime,
"Set retransmit timeout for PAP" },
{ "pap-max-authreq", o_int, &upap[0].us_maxtransmits,
{ "pap-restart", o_int, &upap[0].us_timeouttime,
"Set retransmit timeout for PAP" },
{ "pap-max-authreq", o_int, &upap[0].us_maxtransmits,
* Check the username and password given.
*/
retcode = check_passwd(u->us_unit, ruser, ruserlen, rpasswd,
* Check the username and password given.
*/
retcode = check_passwd(u->us_unit, ruser, ruserlen, rpasswd,
upap_sresp(u, retcode, id, msg, msglen);
upap_sresp(u, retcode, id, msg, msglen);
- if (len < sizeof (u_char)) {
- UPAPDEBUG(("pap_rauthack: rcvd short packet."));
- return;
- }
- GETCHAR(msglen, inp);
- if (msglen > 0) {
- len -= sizeof (u_char);
- if (len < msglen) {
- UPAPDEBUG(("pap_rauthack: rcvd short packet."));
- return;
+ if (len < 1) {
+ UPAPDEBUG(("pap_rauthack: ignoring missing msg-length."));
+ } else {
+ GETCHAR(msglen, inp);
+ if (msglen > 0) {
+ len -= sizeof (u_char);
+ if (len < msglen) {
+ UPAPDEBUG(("pap_rauthack: rcvd short packet."));
+ return;
+ }
+ msg = (char *) inp;
+ PRINTMSG(msg, msglen);
- if (len < sizeof (u_char)) {
- UPAPDEBUG(("pap_rauthnak: rcvd short packet."));
- return;
- }
- GETCHAR(msglen, inp);
- if (msglen > 0) {
- len -= sizeof (u_char);
- if (len < msglen) {
- UPAPDEBUG(("pap_rauthnak: rcvd short packet."));
- return;
+ if (len < 1) {
+ UPAPDEBUG(("pap_rauthnak: ignoring missing msg-length."));
+ } else {
+ GETCHAR(msglen, inp);
+ if (msglen > 0) {
+ len -= sizeof (u_char);
+ if (len < msglen) {
+ UPAPDEBUG(("pap_rauthnak: rcvd short packet."));
+ return;
+ }
+ msg = (char *) inp;
+ PRINTMSG(msg, msglen);