From 0253b04b9ba7c3e4ef139bf352b7a57de823daaa Mon Sep 17 00:00:00 2001 From: Matt Schwager Date: Fri, 19 Oct 2012 13:37:49 -0400 Subject: Added CIDR notation to IP ACLs. Still need to test. --- src/lib/Bcfg2/Server/Core.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/lib/Bcfg2/Server/Core.py') diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py index c9fd76325..c01b493de 100644 --- a/src/lib/Bcfg2/Server/Core.py +++ b/src/lib/Bcfg2/Server/Core.py @@ -1072,13 +1072,12 @@ class BaseCore(object): return self.metadata.AuthenticateConnection(acert, user, password, address) - def check_acls(self, client): + def check_acls(self, client_ip): """ Check if client IP is in list of accepted IPs """ try: - return (client in self.plugins['Acl'].config.ips or - '*' in self.plugins['Acl'].config.ips) + return self.plugins['Acl'].config.check_acl(client_ip) except KeyError: - # No ACL means accept all incoming ips (wildcard) + # No ACL means accept all incoming ips return True @exposed -- cgit v1.2.3-1-g7c22