From 78bda71ba446d6a6829402dc6ebbb8b1742ca09e Mon Sep 17 00:00:00 2001 From: Scott Cantor Date: Mon, 23 Aug 2010 19:09:44 +0000 Subject: [PATCH] Add table walk when accessing all settings for a resource. --- apache/mod_apache.cpp | 9 +++++++++ apache/mod_shib_20.cpp | 3 ++- apache/mod_shib_22.cpp | 3 ++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/apache/mod_apache.cpp b/apache/mod_apache.cpp index 3f776b1..e8b1765 100644 --- a/apache/mod_apache.cpp +++ b/apache/mod_apache.cpp @@ -859,6 +859,12 @@ pair ApacheRequestMapper::getInt(const char* name, const char* ns) con return s ? s->getInt(name,ns) : pair(false,0); } +static int _rm_get_all_table_walk(void *v, const char *key, const char *value) +{ + reinterpret_cast*>(v)->insert(pair(key, value)); + return 1; +} + void ApacheRequestMapper::getAll(map& properties) const { const ShibTargetApache* sta=reinterpret_cast(m_staKey->getData()); @@ -887,6 +893,9 @@ void ApacheRequestMapper::getAll(map& properties) const properties["requireSession"] = (sta->m_dc->bRequireSession==1) ? "true" : "false"; if (sta->m_dc->bExportAssertion != 0) properties["exportAssertion"] = (sta->m_dc->bExportAssertion==1) ? "true" : "false"; + + if (sta->m_dc->tSettings) + ap_table_do(_rm_get_all_table_walk, &properties, sta->m_dc->tSettings, nullptr); } const PropertySet* ApacheRequestMapper::getPropertySet(const char* name, const char* ns) const diff --git a/apache/mod_shib_20.cpp b/apache/mod_shib_20.cpp index c4260c1..47e8999 100644 --- a/apache/mod_shib_20.cpp +++ b/apache/mod_shib_20.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2009 Internet2 + * Copyright 2001-2010 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,7 @@ #define ap_table_setn apr_table_setn #define ap_table_unset apr_table_unset #define ap_table_set apr_table_set +#define ap_table_do apr_table_do #define ap_clear_pool apr_pool_clear #define ap_destroy_pool apr_pool_destroy #define ap_make_table apr_table_make diff --git a/apache/mod_shib_22.cpp b/apache/mod_shib_22.cpp index fbaf17d..478351a 100644 --- a/apache/mod_shib_22.cpp +++ b/apache/mod_shib_22.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2001-2009 Internet2 + * Copyright 2001-2010 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -45,6 +45,7 @@ #define ap_table_setn apr_table_setn #define ap_table_unset apr_table_unset #define ap_table_set apr_table_set +#define ap_table_do apr_table_do #define ap_copy_table apr_table_copy #define ap_overlay_tables apr_table_overlay #define ap_overlap_tables apr_table_overlap -- 2.1.4