/*
- * $Id: ACLDomainData.cc,v 1.8 2004/12/20 14:52:24 robertc Exp $
+ * $Id$
*
* DEBUG: section 28 Access Control
* AUTHOR: Duane Wessels
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
#include "ACLDomainData.h"
#include "authenticate.h"
#include "ACLChecklist.h"
+#include "wordlist.h"
template<class T>
inline void
/* FIXME this warning may display d1 and d2 when it should display d3 and d4 */
if (ret == 0) {
- debug(28, 0) ("WARNING: '%s' is a subdomain of '%s'\n", d1, d2);
- debug(28, 0) ("WARNING: because of this '%s' is ignored to keep splay tree searching predictable\n", (char *) a);
- debug(28, 0) ("WARNING: You should probably remove '%s' from the ACL named '%s'\n", d1, AclMatchedName);
+ debugs(28, 0, "WARNING: '" << d1 << "' is a subdomain of '" << d2 << "'");
+ debugs(28, 0, "WARNING: because of this '" << (char *) a << "' is ignored to keep splay tree searching predictable");
+ debugs(28, 0, "WARNING: You should probably remove '" << d1 << "' from the ACL named '" << AclMatchedName << "'");
}
return ret;
if (host == NULL)
return 0;
- debug(28, 3) ("aclMatchDomainList: checking '%s'\n", host);
+ debugs(28, 3, "aclMatchDomainList: checking '" << host << "'");
domains = domains->splay((char *)host, aclHostDomainCompare);
- debug(28, 3) ("aclMatchDomainList: '%s' %s\n",
- host, splayLastResult ? "NOT found" : "found");
+ debugs(28, 3, "aclMatchDomainList: '" << host << "' " << (splayLastResult ? "NOT found" : "found"));
return !splayLastResult;
}
}
}
+bool
+ACLDomainData::empty() const
+{
+ return domains->empty();
+}
+
ACLData<char const *> *
ACLDomainData::clone() const