summaryrefslogtreecommitdiff
path: root/pppd/upap.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>1999-03-16 03:15:15 +0000
committerPaul Mackerras <paulus@samba.org>1999-03-16 03:15:15 +0000
commit7a4dc0ff500aaa176a41965d8d4ad15a97a70904 (patch)
tree2092f62390c3e3491c0eeb63a002fef3a89cb5ef /pppd/upap.c
parente0b13abaf14522d416083cf0ac45390b52549d58 (diff)
downloadppp-7a4dc0ff500aaa176a41965d8d4ad15a97a70904.tar.gz
syslog -> notice/error/etc.
use slprintf instead of sprintf trimmed debug
Diffstat (limited to 'pppd/upap.c')
-rw-r--r--pppd/upap.c41
1 files changed, 15 insertions, 26 deletions
diff --git a/pppd/upap.c b/pppd/upap.c
index e84cb93..b59d130 100644
--- a/pppd/upap.c
+++ b/pppd/upap.c
@@ -18,7 +18,7 @@
*/
#ifndef lint
-static char rcsid[] = "$Id: upap.c,v 1.13 1999/03/02 05:29:39 paulus Exp $";
+static char rcsid[] = "$Id: upap.c,v 1.14 1999/03/16 03:15:15 paulus Exp $";
#endif
/*
@@ -27,9 +27,6 @@ static char rcsid[] = "$Id: upap.c,v 1.13 1999/03/02 05:29:39 paulus Exp $";
#include <stdio.h>
#include <string.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <syslog.h>
#include "pppd.h"
#include "upap.h"
@@ -183,7 +180,7 @@ upap_timeout(arg)
if (u->us_transmits >= u->us_maxtransmits) {
/* give up in disgust */
- syslog(LOG_ERR, "No response to PAP authenticate-requests");
+ error("No response to PAP authenticate-requests");
u->us_clientstate = UPAPCS_BADAUTH;
auth_withpeer_fail(u->us_unit, PPP_PAP);
return;
@@ -270,11 +267,11 @@ upap_protrej(unit)
upap_state *u = &upap[unit];
if (u->us_clientstate == UPAPCS_AUTHREQ) {
- syslog(LOG_ERR, "PAP authentication failed due to protocol-reject");
+ error("PAP authentication failed due to protocol-reject");
auth_withpeer_fail(unit, PPP_PAP);
}
if (u->us_serverstate == UPAPSS_LISTEN) {
- syslog(LOG_ERR, "PAP authentication of peer failed (protocol-reject)");
+ error("PAP authentication of peer failed (protocol-reject)");
auth_peer_fail(unit, PPP_PAP);
}
upap_lowerdown(unit);
@@ -301,18 +298,18 @@ upap_input(unit, inpacket, l)
*/
inp = inpacket;
if (l < UPAP_HEADERLEN) {
- UPAPDEBUG((LOG_INFO, "pap_input: rcvd short header."));
+ UPAPDEBUG(("pap_input: rcvd short header."));
return;
}
GETCHAR(code, inp);
GETCHAR(id, inp);
GETSHORT(len, inp);
if (len < UPAP_HEADERLEN) {
- UPAPDEBUG((LOG_INFO, "pap_input: rcvd illegal length."));
+ UPAPDEBUG(("pap_input: rcvd illegal length."));
return;
}
if (len > l) {
- UPAPDEBUG((LOG_INFO, "pap_input: rcvd short packet."));
+ UPAPDEBUG(("pap_input: rcvd short packet."));
return;
}
len -= UPAP_HEADERLEN;
@@ -355,8 +352,6 @@ upap_rauthreq(u, inp, id, len)
char *msg;
int msglen;
- UPAPDEBUG((LOG_INFO, "pap_rauth: Rcvd id %d.", id));
-
if (u->us_serverstate < UPAPSS_LISTEN)
return;
@@ -377,20 +372,20 @@ upap_rauthreq(u, inp, id, len)
* Parse user/passwd.
*/
if (len < sizeof (u_char)) {
- UPAPDEBUG((LOG_INFO, "pap_rauth: rcvd short packet."));
+ UPAPDEBUG(("pap_rauth: rcvd short packet."));
return;
}
GETCHAR(ruserlen, inp);
len -= sizeof (u_char) + ruserlen + sizeof (u_char);
if (len < 0) {
- UPAPDEBUG((LOG_INFO, "pap_rauth: rcvd short packet."));
+ UPAPDEBUG(("pap_rauth: rcvd short packet."));
return;
}
ruser = (char *) inp;
INCPTR(ruserlen, inp);
GETCHAR(rpasswdlen, inp);
if (len < rpasswdlen) {
- UPAPDEBUG((LOG_INFO, "pap_rauth: rcvd short packet."));
+ UPAPDEBUG(("pap_rauth: rcvd short packet."));
return;
}
rpasswd = (char *) inp;
@@ -430,7 +425,6 @@ upap_rauthack(u, inp, id, len)
u_char msglen;
char *msg;
- UPAPDEBUG((LOG_INFO, "pap_rauthack: Rcvd id %d.", id));
if (u->us_clientstate != UPAPCS_AUTHREQ) /* XXX */
return;
@@ -438,13 +432,13 @@ upap_rauthack(u, inp, id, len)
* Parse message.
*/
if (len < sizeof (u_char)) {
- UPAPDEBUG((LOG_INFO, "pap_rauthack: rcvd short packet."));
+ UPAPDEBUG(("pap_rauthack: rcvd short packet."));
return;
}
GETCHAR(msglen, inp);
len -= sizeof (u_char);
if (len < msglen) {
- UPAPDEBUG((LOG_INFO, "pap_rauthack: rcvd short packet."));
+ UPAPDEBUG(("pap_rauthack: rcvd short packet."));
return;
}
msg = (char *) inp;
@@ -469,7 +463,6 @@ upap_rauthnak(u, inp, id, len)
u_char msglen;
char *msg;
- UPAPDEBUG((LOG_INFO, "pap_rauthnak: Rcvd id %d.", id));
if (u->us_clientstate != UPAPCS_AUTHREQ) /* XXX */
return;
@@ -477,13 +470,13 @@ upap_rauthnak(u, inp, id, len)
* Parse message.
*/
if (len < sizeof (u_char)) {
- UPAPDEBUG((LOG_INFO, "pap_rauthnak: rcvd short packet."));
+ UPAPDEBUG(("pap_rauthnak: rcvd short packet."));
return;
}
GETCHAR(msglen, inp);
len -= sizeof (u_char);
if (len < msglen) {
- UPAPDEBUG((LOG_INFO, "pap_rauthnak: rcvd short packet."));
+ UPAPDEBUG(("pap_rauthnak: rcvd short packet."));
return;
}
msg = (char *) inp;
@@ -491,7 +484,7 @@ upap_rauthnak(u, inp, id, len)
u->us_clientstate = UPAPCS_BADAUTH;
- syslog(LOG_ERR, "PAP authentication failed");
+ error("PAP authentication failed");
auth_withpeer_fail(u->us_unit, PPP_PAP);
}
@@ -523,8 +516,6 @@ upap_sauthreq(u)
output(u->us_unit, outpacket_buf, outlen + PPP_HDRLEN);
- UPAPDEBUG((LOG_INFO, "pap_sauth: Sent id %d.", u->us_id));
-
TIMEOUT(upap_timeout, u, u->us_timeouttime);
++u->us_transmits;
u->us_clientstate = UPAPCS_AUTHREQ;
@@ -554,8 +545,6 @@ upap_sresp(u, code, id, msg, msglen)
PUTCHAR(msglen, outp);
BCOPY(msg, outp, msglen);
output(u->us_unit, outpacket_buf, outlen + PPP_HDRLEN);
-
- UPAPDEBUG((LOG_INFO, "pap_sresp: Sent code %d, id %d.", code, id));
}
/*