From 7f7d79d2f340b37b203c1265a045aa29066bf0e7 Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Mon, 23 Sep 2013 11:47:11 +0200 Subject: [PATCH] Fix off-by-one connection limit check --- etc/afpd/auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/afpd/auth.c b/etc/afpd/auth.c index ed08bbfa..3759538f 100644 --- a/etc/afpd/auth.c +++ b/etc/afpd/auth.c @@ -222,7 +222,7 @@ static int login(AFPObj *obj, struct passwd *pwd, void (*logout)(void), int expi return AFPERR_NOTAUTH; } - if (obj->cnx_cnt >= obj->cnx_max) { + if (obj->cnx_cnt > obj->cnx_max) { LOG(log_error, logtype_dsi, "login: too many connections, limit: %d", obj->cnx_max); return AFPERR_MAXSESS; } -- 2.39.2