From 5cda4d56d7acef9c95b602b4f7aa1dc4e996372a Mon Sep 17 00:00:00 2001 From: serassio <> Date: Sun, 8 May 2005 15:15:38 +0000 Subject: [PATCH] Bug #1166: Configuration confusing on empty ACLS Still some bugfixing is needed --- src/ACLARP.cc | 4 ++-- src/ACLASN.h | 3 ++- src/ACLIP.cc | 2 +- src/ACLIntRange.cc | 4 ++-- src/ACLMethodData.cc | 4 ++-- src/ACLUserData.cc | 2 +- src/asn.cc | 8 +++++++- 7 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/ACLARP.cc b/src/ACLARP.cc index bee51796d7..9fb7187299 100644 --- a/src/ACLARP.cc +++ b/src/ACLARP.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLARP.cc,v 1.15 2005/05/08 06:53:58 hno Exp $ + * $Id: ACLARP.cc,v 1.16 2005/05/08 09:15:38 serassio Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -120,7 +120,7 @@ ACLARP::typeString() const bool ACLARP::empty () const { - return data->empty(); + return data == NULL; } /* ==== BEGIN ARP ACL SUPPORT ============================================= */ diff --git a/src/ACLASN.h b/src/ACLASN.h index 7733925d14..02da65a86a 100644 --- a/src/ACLASN.h +++ b/src/ACLASN.h @@ -1,6 +1,6 @@ /* - * $Id: ACLASN.h,v 1.6 2005/04/18 21:52:41 hno Exp $ + * $Id: ACLASN.h,v 1.7 2005/05/08 09:15:39 serassio Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -55,6 +55,7 @@ public: virtual bool match(struct IN_ADDR); virtual wordlist *dump(); virtual void parse(); + bool empty() const; virtual ACLData *clone() const; virtual void prepareForUse(); diff --git a/src/ACLIP.cc b/src/ACLIP.cc index 0d3a5c856f..3ca6fc7585 100644 --- a/src/ACLIP.cc +++ b/src/ACLIP.cc @@ -355,7 +355,7 @@ ACLIP::dump() const bool ACLIP::empty () const { - return data->empty(); + return data == NULL; } int diff --git a/src/ACLIntRange.cc b/src/ACLIntRange.cc index 0d3f499449..4ff97466ba 100644 --- a/src/ACLIntRange.cc +++ b/src/ACLIntRange.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLIntRange.cc,v 1.4 2005/05/08 06:36:45 hno Exp $ + * $Id: ACLIntRange.cc,v 1.5 2005/05/08 09:15:39 serassio Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Robert Collins @@ -73,7 +73,7 @@ ACLIntRange::parse() bool ACLIntRange::empty() const { - return ranges != NULL; + return ranges == NULL; } bool diff --git a/src/ACLMethodData.cc b/src/ACLMethodData.cc index 193386c66f..a86b1d61cc 100644 --- a/src/ACLMethodData.cc +++ b/src/ACLMethodData.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLMethodData.cc,v 1.6 2005/05/08 06:36:45 hno Exp $ + * $Id: ACLMethodData.cc,v 1.7 2005/05/08 09:15:39 serassio Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -96,7 +96,7 @@ ACLMethodData::parse() bool ACLMethodData::empty() const { - return values != NULL; + return values == NULL; } ACLData * diff --git a/src/ACLUserData.cc b/src/ACLUserData.cc index 66c5acc393..69112e1c99 100644 --- a/src/ACLUserData.cc +++ b/src/ACLUserData.cc @@ -166,7 +166,7 @@ ACLUserData::parse() bool ACLUserData::empty() const { - return names == NULL; + return ((names == NULL) && (flags.required != 1)); } ACLData * diff --git a/src/asn.cc b/src/asn.cc index 62eee5f534..b17003d6d0 100644 --- a/src/asn.cc +++ b/src/asn.cc @@ -1,6 +1,6 @@ /* - * $Id: asn.cc,v 1.100 2005/04/18 21:52:42 hno Exp $ + * $Id: asn.cc,v 1.101 2005/05/08 09:15:39 serassio Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis @@ -588,6 +588,12 @@ ACLASN::dump() return W; } +bool +ACLASN::empty () const +{ + return data == NULL; +} + void ACLASN::parse() { -- 2.47.3