summaryrefslogtreecommitdiff
path: root/accel-pptpd/auth
diff options
context:
space:
mode:
Diffstat (limited to 'accel-pptpd/auth')
-rw-r--r--accel-pptpd/auth/auth_chap_md5.c10
-rw-r--r--accel-pptpd/auth/auth_mschap_v1.c10
-rw-r--r--accel-pptpd/auth/auth_mschap_v2.c10
-rw-r--r--accel-pptpd/auth/auth_pap.c2
4 files changed, 16 insertions, 16 deletions
diff --git a/accel-pptpd/auth/auth_chap_md5.c b/accel-pptpd/auth/auth_chap_md5.c
index 4031a9a..0e22908 100644
--- a/accel-pptpd/auth/auth_chap_md5.c
+++ b/accel-pptpd/auth/auth_chap_md5.c
@@ -157,7 +157,7 @@ static void chap_timeout(struct triton_timer_t *t)
if (++d->failure == conf_max_failure) {
if (d->started)
- ppp_terminate(d->ppp, 0);
+ ppp_terminate(d->ppp, TERM_USER_ERROR, 0);
else
auth_failed(d->ppp);
} else {
@@ -267,13 +267,13 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
if (conf_ppp_verbose)
log_ppp_error("chap-md5: id mismatch\n");
chap_send_failure(ad);
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_USER_ERROR, 0);
}
if (msg->val_size != VALUE_SIZE) {
log_ppp_error("chap-md5: incorrect value-size (%i)\n", msg->val_size);
chap_send_failure(ad);
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_USER_ERROR, 0);
}
name = _strndup(msg->name,ntohs(msg->hdr.len) - sizeof(*msg) + 2);
@@ -303,7 +303,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
log_ppp_warn("chap-md5: challenge response mismatch\n");
chap_send_failure(ad);
if (ad->started)
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_USER_ERROR, 0);
else
auth_failed(ad->ppp);
}else
@@ -322,7 +322,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
chap_send_failure(ad);
_free(name);
if (ad->started)
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_USER_ERROR, 0);
else
auth_failed(ad->ppp);
} else {
diff --git a/accel-pptpd/auth/auth_mschap_v1.c b/accel-pptpd/auth/auth_mschap_v1.c
index 5b4935e..d1dccef 100644
--- a/accel-pptpd/auth/auth_mschap_v1.c
+++ b/accel-pptpd/auth/auth_mschap_v1.c
@@ -171,7 +171,7 @@ static void chap_timeout(struct triton_timer_t *t)
if (++d->failure == conf_max_failure) {
if (d->started)
- ppp_terminate(d->ppp, 0);
+ ppp_terminate(d->ppp, TERM_USER_ERROR, 0);
else
auth_failed(d->ppp);
} else {
@@ -281,7 +281,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
log_ppp_error("mschap-v1: id mismatch\n");
chap_send_failure(ad);
if (ad->started)
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_USER_ERROR, 0);
else
auth_failed(ad->ppp);
}
@@ -290,7 +290,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
log_ppp_error("mschap-v1: incorrect value-size (%i)\n", msg->val_size);
chap_send_failure(ad);
if (ad->started)
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_AUTH_ERROR, 0);
else
auth_failed(ad->ppp);
}
@@ -299,7 +299,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
if (!name) {
log_emerg("mschap-v1: out of memory\n");
if (ad->started)
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_NAS_ERROR, 0);
else
auth_failed(ad->ppp);
return;
@@ -312,7 +312,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
if (r == PWDB_DENIED) {
chap_send_failure(ad);
if (ad->started)
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_AUTH_ERROR, 0);
else
auth_failed(ad->ppp);
_free(name);
diff --git a/accel-pptpd/auth/auth_mschap_v2.c b/accel-pptpd/auth/auth_mschap_v2.c
index a93fad6..3b2da7b 100644
--- a/accel-pptpd/auth/auth_mschap_v2.c
+++ b/accel-pptpd/auth/auth_mschap_v2.c
@@ -186,7 +186,7 @@ static void chap_timeout(struct triton_timer_t *t)
if (++d->failure == conf_max_failure) {
if (d->started)
- ppp_terminate(d->ppp, 0);
+ ppp_terminate(d->ppp, TERM_USER_ERROR, 0);
else
auth_failed(d->ppp);
} else {
@@ -356,7 +356,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
log_ppp_error("mschap-v2: id mismatch\n");
chap_send_failure(ad);
if (ad->started)
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_USER_ERROR, 0);
else
auth_failed(ad->ppp);
}
@@ -365,7 +365,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
log_ppp_error("mschap-v2: incorrect value-size (%i)\n", msg->val_size);
chap_send_failure(ad);
if (ad->started)
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_USER_ERROR, 0);
else
auth_failed(ad->ppp);
}
@@ -374,7 +374,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
if (!name) {
log_emerg("mschap-v2: out of memory\n");
if (ad->started)
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_NAS_ERROR, 0);
else
auth_failed(ad->ppp);
return;
@@ -391,7 +391,7 @@ static void chap_recv_response(struct chap_auth_data_t *ad, struct chap_hdr_t *h
if (r == PWDB_DENIED) {
chap_send_failure(ad);
if (ad->started)
- ppp_terminate(ad->ppp, 0);
+ ppp_terminate(ad->ppp, TERM_AUTH_ERROR, 0);
else
auth_failed(ad->ppp);
_free(name);
diff --git a/accel-pptpd/auth/auth_pap.c b/accel-pptpd/auth/auth_pap.c
index b044f64..e1b48bd 100644
--- a/accel-pptpd/auth/auth_pap.c
+++ b/accel-pptpd/auth/auth_pap.c
@@ -210,7 +210,7 @@ static int pap_recv_req(struct pap_auth_data_t *p, struct pap_hdr_t *hdr)
log_ppp_warn("PAP: authentication error\n");
pap_send_nak(p, hdr->id);
if (p->started)
- ppp_terminate(p->ppp, 0);
+ ppp_terminate(p->ppp, TERM_AUTH_ERROR, 0);
else
auth_failed(p->ppp);
ret=-1;