trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject [trafficserver] 02/03: Inherit parent config file root-required attribute
Date Thu, 11 Oct 2018 17:37:27 GMT
This is an automated email from the ASF dual-hosted git repository.

bcall pushed a commit to branch 8.0.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

commit 2e71937b02fbeb8d13969b9e429a56933c1bd341
Author: Randall Meyer <randallmeyer@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.
    
    (cherry picked from commit b3107057f366c26dc27a3c25ec71edada1842b25)
---
 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 451d23f..a738716 100644
--- a/mgmt/FileManager.cc
+++ b/mgmt/FileManager.cc
@@ -283,9 +283,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 5ad2a09..aed26f3 100644
--- a/mgmt/Rollback.h
+++ b/mgmt/Rollback.h
@@ -233,6 +233,11 @@ public:
   {
     return numberBackups > 0;
   }
+  bool
+  rootAccessNeeded() const
+  {
+    return root_access_needed;
+  }
 
   FileManager *configFiles; // Manager to notify on an update.
 


Mime
View raw message