summaryrefslogtreecommitdiff
path: root/accel-pptpd/auth/auth_mschap_v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pptpd/auth/auth_mschap_v2.c')
-rw-r--r--accel-pptpd/auth/auth_mschap_v2.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/accel-pptpd/auth/auth_mschap_v2.c b/accel-pptpd/auth/auth_mschap_v2.c
index 374c152..014c696 100644
--- a/accel-pptpd/auth/auth_mschap_v2.c
+++ b/accel-pptpd/auth/auth_mschap_v2.c
@@ -106,14 +106,14 @@ static void print_buf(const uint8_t *buf, int size)
{
int i;
for (i = 0; i < size; i++)
- log_ppp_info("%x", buf[i]);
+ log_ppp_info2("%x", buf[i]);
}
static void print_str(const char *buf, int size)
{
int i;
for (i = 0; i < size; i++)
- log_ppp_info("%c", buf[i]);
+ log_ppp_info2("%c", buf[i]);
}
static struct auth_data_t* auth_data_init(struct ppp_t *ppp)
@@ -184,7 +184,7 @@ static void chap_timeout_timer(struct triton_timer_t *t)
if (d->started)
ppp_terminate(d->ppp, TERM_USER_ERROR, 0);
else
- ppp_auth_failed(d->ppp);
+ ppp_auth_failed(d->ppp, NULL);
} else {
--d->id;
chap_send_challenge(d);
@@ -222,7 +222,7 @@ static void chap_send_failure(struct chap_auth_data_t *ad)
};
if (conf_ppp_verbose)
- log_ppp_info("send [MSCHAP-v2 Failure id=%x \"%s\"]\n", msg.hdr.id, MSG_FAILURE);
+ log_ppp_info2("send [MSCHAP-v2 Failure id=%x \"%s\"]\n", msg.hdr.id, MSG_FAILURE);
ppp_chan_send(ad->ppp, &msg, ntohs(msg.hdr.len) + 2);
}
@@ -310,7 +310,7 @@ static void chap_send_success(struct chap_auth_data_t *ad, struct chap_response_
memcpy(msg.message + 2, authenticator, 40);
if (conf_ppp_verbose)
- log_ppp_info("send [MSCHAP-v2 Success id=%x \"%s\"]\n", msg.hdr.id, msg.message);
+ log_ppp_info2("send [MSCHAP-v2 Success id=%x \"%s\"]\n", msg.hdr.id, msg.message);
ppp_chan_send(ad->ppp, &msg, ntohs(msg.hdr.len) + 2);
}
@@ -329,9 +329,9 @@ static void chap_send_challenge(struct chap_auth_data_t *ad)
memcpy(msg.val, ad->val, VALUE_SIZE);
if (conf_ppp_verbose) {
- log_ppp_info("send [MSCHAP-v2 Challenge id=%x <", msg.hdr.id);
+ log_ppp_info2("send [MSCHAP-v2 Challenge id=%x <", msg.hdr.id);
print_buf(msg.val, VALUE_SIZE);
- log_ppp_info(">]\n");
+ log_ppp_info2(">]\n");
}
ppp_chan_send(ad->ppp, &msg, ntohs(msg.hdr.len) + 2);
@@ -351,13 +351,13 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
triton_timer_del(&ad->timeout);
if (conf_ppp_verbose) {
- log_ppp_info("recv [MSCHAP-v2 Response id=%x <", msg->hdr.id);
+ log_ppp_info2("recv [MSCHAP-v2 Response id=%x <", msg->hdr.id);
print_buf(msg->peer_challenge,16);
- log_ppp_info(">, <");
+ log_ppp_info2(">, <");
print_buf(msg->nt_hash, 24);
- log_ppp_info(">, F=%i, name=\"", msg->flags);
+ log_ppp_info2(">, F=%i, name=\"", msg->flags);
print_str(msg->name, ntohs(msg->hdr.len) - sizeof(*msg) + 2);
- log_ppp_info("\"]\n");
+ log_ppp_info2("\"]\n");
}
if (msg->hdr.id != ad->id) {
@@ -367,7 +367,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
if (ad->started)
ppp_terminate(ad->ppp, TERM_USER_ERROR, 0);
else
- ppp_auth_failed(ad->ppp);
+ ppp_auth_failed(ad->ppp, NULL);
}
if (msg->val_size != RESPONSE_VALUE_SIZE) {
@@ -376,7 +376,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
if (ad->started)
ppp_terminate(ad->ppp, TERM_USER_ERROR, 0);
else
- ppp_auth_failed(ad->ppp);
+ ppp_auth_failed(ad->ppp, NULL);
}
name = _strndup(msg->name, ntohs(msg->hdr.len) - sizeof(*msg) + 2);
@@ -385,7 +385,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
if (ad->started)
ppp_terminate(ad->ppp, TERM_NAS_ERROR, 0);
else
- ppp_auth_failed(ad->ppp);
+ ppp_auth_failed(ad->ppp, NULL);
return;
}
@@ -404,7 +404,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
if (ad->started)
ppp_terminate(ad->ppp, TERM_AUTH_ERROR, 0);
else
- ppp_auth_failed(ad->ppp);
+ ppp_auth_failed(ad->ppp, name);
_free(name);
} else {
chap_send_success(ad, msg, authenticator);