You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by rr...@apache.org on 2018/10/08 23:07:18 UTC
[trafficserver] branch master updated: Inherit parent config file
root-required attribute
This is an automated email from the ASF dual-hosted git repository.
rrm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new b310705 Inherit parent config file root-required attribute
b310705 is described below
commit b3107057f366c26dc27a3c25ec71edada1842b25
Author: Randall Meyer <ra...@yahoo.com>
AuthorDate: Mon Sep 24 10:33:18 2018 -0700
Inherit parent config file root-required attribute
Running as non-root, traffic_manager would fail during config load
attempting to add child subconfigs because process couldn't become
root to load child config.
---
mgmt/FileManager.cc | 4 +---
mgmt/Rollback.h | 5 +++++
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/mgmt/FileManager.cc b/mgmt/FileManager.cc
index bbb4cfb..5232b42 100644
--- a/mgmt/FileManager.cc
+++ b/mgmt/FileManager.cc
@@ -275,9 +275,7 @@ FileManager::configFileChild(const char *parent, const char *child, unsigned fla
int htfound = ink_hash_table_lookup(bindings, parent, &lookup);
if (htfound) {
parentRollback = (Rollback *)lookup;
- }
- if (htfound) {
- addFileHelper(child, true, parentRollback, flags);
+ addFileHelper(child, parentRollback->rootAccessNeeded(), parentRollback, flags);
}
ink_mutex_release(&accessLock);
}
diff --git a/mgmt/Rollback.h b/mgmt/Rollback.h
index 42c1085..38d8c94 100644
--- a/mgmt/Rollback.h
+++ b/mgmt/Rollback.h
@@ -212,6 +212,11 @@ public:
{
return numberBackups > 0;
}
+ bool
+ rootAccessNeeded() const
+ {
+ return root_access_needed;
+ }
FileManager *configFiles; // Manager to notify on an update.