X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fupap.c;h=e84cb93cb8af4397cc82668454ad1edf15aac7f7;hp=c4ffb401cedc8154cd44ec0e0c767bdb5b75ae6e;hb=72d70cf7fd4a0623fb1fe527c87d4d373df594a9;hpb=2f7faa7ef905d653be91cc9a4233f796396e1fc2 diff --git a/pppd/upap.c b/pppd/upap.c index c4ffb40..e84cb93 100644 --- a/pppd/upap.c +++ b/pppd/upap.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: upap.c,v 1.11 1997/04/30 05:59:56 paulus Exp $"; +static char rcsid[] = "$Id: upap.c,v 1.13 1999/03/02 05:29:39 paulus Exp $"; #endif /* @@ -34,6 +34,23 @@ static char rcsid[] = "$Id: upap.c,v 1.11 1997/04/30 05:59:56 paulus Exp $"; #include "pppd.h" #include "upap.h" +static bool hide_password; + +/* + * Command-line options. + */ +static option_t pap_option_list[] = { + { "hide-password", o_bool, &hide_password, + "Don't output passwords to log" }, + { "pap-restart", o_int, &upap[0].us_timeouttime, + "Set retransmit timeout for PAP" }, + { "pap-max-authreq", o_int, &upap[0].us_maxtransmits, + "Set max number of transmissions for auth-reqs" }, + { "pap-timeout", o_int, &upap[0].us_reqtimeout, + "Set time limit for peer PAP authentication" }, + { NULL } +}; + /* * Protocol entry points. */ @@ -58,6 +75,7 @@ struct protent pap_protent = { NULL, 1, "PAP", + pap_option_list, NULL, NULL, NULL @@ -591,7 +609,10 @@ upap_printpkt(p, plen, printer, arg) printer(arg, " user="); print_string(user, ulen, printer, arg); printer(arg, " password="); - print_string(pwd, wlen, printer, arg); + if (!hide_password) + print_string(pwd, wlen, printer, arg); + else + printer(arg, ""); break; case UPAP_AUTHACK: case UPAP_AUTHNAK: