From: Michael Tremer Date: Wed, 4 Dec 2019 16:07:04 +0000 (+0000) Subject: accounts: Count up to INT_MAX objects X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=92d075d0d10b8a6367b85fca79437c331e419624;p=ipfire.org.git accounts: Count up to INT_MAX objects Signed-off-by: Michael Tremer --- diff --git a/src/backend/accounts.py b/src/backend/accounts.py index c5740aa6..74b4eafb 100644 --- a/src/backend/accounts.py +++ b/src/backend/accounts.py @@ -24,6 +24,8 @@ from . import util from .decorators import * from .misc import Object +INT_MAX = (2**31) - 1 + # Set the client keytab name os.environ["KRB5_CLIENT_KTNAME"] = "/etc/ipfire.org/ldap.keytab" @@ -221,7 +223,7 @@ class Accounts(Object): return results def _count(self, query): - res = self._query(query, attrlist=["dn"]) + res = self._query(query, attrlist=["dn"], limit=INT_MAX) return len(res)