X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fauth.c;h=cf042686a33557e14fb1f81ce29b83c7a28c787b;hp=d2b0c9f04995f41e5761f0946ce429a04c51626b;hb=fd25394d146bb83043189608d30dd0eeb983186d;hpb=93b9f7ad08d5f0ee16880ec2b21b1c13a00d4779 diff --git a/pppd/auth.c b/pppd/auth.c index d2b0c9f..cf04268 100644 --- a/pppd/auth.c +++ b/pppd/auth.c @@ -32,7 +32,7 @@ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. */ -#define RCSID "$Id: auth.c,v 1.85 2002/10/10 05:47:34 fcusack Exp $" +#define RCSID "$Id: auth.c,v 1.88 2002/10/27 12:56:26 fcusack Exp $" #include #include @@ -46,7 +46,7 @@ #include #include #include -#if defined(_PATH_LASTLOG) && defined(_linux_) +#if defined(_PATH_LASTLOG) && defined(__linux__) #include #endif @@ -610,6 +610,10 @@ network_phase(unit) { lcp_options *go = &lcp_gotoptions[unit]; + /* Log calling number. */ + if (*remote_number) + notice("peer from calling number %q authorized", remote_number); + /* * If the peer had to authenticate, run the auth-up script now. */ @@ -1180,19 +1184,14 @@ check_passwd(unit, auser, userlen, apasswd, passwdlen, msg) ret = UPAP_AUTHACK; if (uselogin || login_secret) { /* login option or secret is @login */ - ret = plogin(user, passwd, msg); - if (ret == UPAP_AUTHNAK) - warn("PAP login failure for %s", user); - else + if ((ret = plogin(user, passwd, msg)) == UPAP_AUTHACK) used_login = 1; } if (secret[0] != 0 && !login_secret) { /* password given in pap-secrets - must match */ if ((cryptpap || strcmp(passwd, secret) != 0) - && strcmp(crypt(passwd, secret), secret) != 0) { + && strcmp(crypt(passwd, secret), secret) != 0) ret = UPAP_AUTHNAK; - warn("PAP authentication failure for %s", user); - } } } fclose(f); @@ -1951,7 +1950,6 @@ auth_number() l--; if (!strncasecmp(wp->word, remote_number, l)) return 1; - } wp = wp->next; }