From df32819e04d966b898a7baa024b1554008fb6c68 Mon Sep 17 00:00:00 2001 From: Elizabeth Myers Date: Thu, 10 Mar 2016 11:27:07 -0600 Subject: [PATCH] authd: tag rejection type. --- authd/provider.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/authd/provider.c b/authd/provider.c index 9c3ba81f..97a2e882 100644 --- a/authd/provider.c +++ b/authd/provider.c @@ -142,8 +142,26 @@ void provider_done(struct auth_client *auth, provider_t id) void reject_client(struct auth_client *auth, provider_t id, const char *reason) { uint16_t cid = auth->cid; + char reject; - rb_helper_write(authd_helper, "R %x :%s", auth->cid, reason); + switch(id) + { + case PROVIDER_RDNS: + reject = 'D'; + break; + case PROVIDER_IDENT: + reject = 'I'; + break; + case PROVIDER_BLACKLIST: + reject = 'B'; + break; + case PROVIDER_NULL: + default: + reject = 'N'; + break; + } + + rb_helper_write(authd_helper, "R %x %c :%s", auth->cid, reject, reason); unset_provider(auth, id);