[cpp-sp] branch main updated: Fix some bugs flushed out on Windows.
Scott Cantor
cantor.2 at osu.edu
Mon Dec 16 15:06:44 UTC 2024
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch main
in repository cpp-sp.
View the commit online:
http://git.shibboleth.net/view/?p=cpp-sp.git;a=commit;h=5770043603ffd438ad02a51753b3b05a0ac84ba1
The following commit(s) were added to refs/heads/main by this push:
new 57700436 Fix some bugs flushed out on Windows.
57700436 is described below
commit 5770043603ffd438ad02a51753b3b05a0ac84ba1
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Dec 16 10:06:40 2024 -0500
Fix some bugs flushed out on Windows.
---
shibsp/impl/XMLAccessControl.cpp | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/shibsp/impl/XMLAccessControl.cpp b/shibsp/impl/XMLAccessControl.cpp
index 150ae4cf..a9acabd6 100644
--- a/shibsp/impl/XMLAccessControl.cpp
+++ b/shibsp/impl/XMLAccessControl.cpp
@@ -375,7 +375,7 @@ AccessControl::aclresult_t Operator::authorized(const SPRequest& request, const
return shib_acl_false;
}
-unique_ptr<AccessControl> processChild(const string& name, const ptree& pt)
+unique_ptr<AccessControl> XMLAccessControl::processChild(const string& name, const ptree& pt)
{
if (name == RULE_PROP_PATH) {
return unique_ptr<AccessControl>(new Rule(pt));
@@ -386,7 +386,9 @@ unique_ptr<AccessControl> processChild(const string& name, const ptree& pt)
else if (name != "<xmlattr>") {
return unique_ptr<AccessControl>(new Operator(name, pt));
}
-
+ else {
+ return nullptr;
+ }
}
pair<bool,ptree*> XMLAccessControl::load() noexcept
@@ -414,11 +416,13 @@ pair<bool,ptree*> XMLAccessControl::load() noexcept
authz = processChild(child.first, child.second);
}
+ if (authz) {
// Perform the swap inside a lock.
#ifdef HAVE_CXX14
- unique_lock<ReloadableXMLFile> locker(*this);
+ unique_lock<ReloadableXMLFile> locker(*this);
#endif
- m_rootAuthz.swap(authz);
+ m_rootAuthz.swap(authz);
+ }
return make_pair(false, nullptr);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list