From 72d70cf7fd4a0623fb1fe527c87d4d373df594a9 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Tue, 2 Mar 1999 05:29:39 +0000 Subject: [PATCH] added hide-password option --- pppd/upap.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pppd/upap.c b/pppd/upap.c index 3b025e0..e84cb93 100644 --- a/pppd/upap.c +++ b/pppd/upap.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: upap.c,v 1.12 1998/11/07 06:59:32 paulus Exp $"; +static char rcsid[] = "$Id: upap.c,v 1.13 1999/03/02 05:29:39 paulus Exp $"; #endif /* @@ -34,16 +34,20 @@ static char rcsid[] = "$Id: upap.c,v 1.12 1998/11/07 06:59:32 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 #xmits for auth-reqs" }, + "Set max number of transmissions for auth-reqs" }, { "pap-timeout", o_int, &upap[0].us_reqtimeout, - "Set time limit for peer PAP auth." }, + "Set time limit for peer PAP authentication" }, { NULL } }; @@ -605,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: -- 2.39.2