summaryrefslogtreecommitdiff
path: root/docker/base
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-09-06 11:59:30 +0000
committerGerrit Code Review <review@openstack.org>2022-09-06 11:59:30 +0000
commit2a4a8fce31c12114e8f472c24dd96864b5bd2bd2 (patch)
tree9288ed91a0e4efdab2ba9548d693c6eaf14a8539 /docker/base
parent2c2dc39b3bb39a27e6f94dbd797c9406bf512109 (diff)
parent5b1da017988c987fc68b55d1f45b5d2676474ce1 (diff)
downloadkolla-2a4a8fce31c12114e8f472c24dd96864b5bd2bd2.tar.gz
kolla-2a4a8fce31c12114e8f472c24dd96864b5bd2bd2.zip
Merge "Fix CVE-2022-38060"
Diffstat (limited to 'docker/base')
-rw-r--r--docker/base/set_configs.py19
-rw-r--r--docker/base/sudoers2
2 files changed, 4 insertions, 17 deletions
diff --git a/docker/base/set_configs.py b/docker/base/set_configs.py
index 1d1fc48ae..559f1c0f3 100644
--- a/docker/base/set_configs.py
+++ b/docker/base/set_configs.py
@@ -272,21 +272,8 @@ def validate_source(data):
def load_config():
- def load_from_env():
- config_raw = os.environ.get("KOLLA_CONFIG")
- if config_raw is None:
- return None
-
- # Attempt to read config
- try:
- return json.loads(config_raw)
- except ValueError:
- raise InvalidConfig('Invalid json for Kolla config')
-
def load_from_file():
- config_file = os.environ.get("KOLLA_CONFIG_FILE")
- if not config_file:
- config_file = '/var/lib/kolla/config_files/config.json'
+ config_file = '/var/lib/kolla/config_files/config.json'
LOG.info("Loading config file at %s", config_file)
# Attempt to read config file
@@ -300,9 +287,7 @@ def load_config():
raise InvalidConfig(
"Could not read file %s: %r" % (config_file, e))
- config = load_from_env()
- if config is None:
- config = load_from_file()
+ config = load_from_file()
LOG.info('Validating config file')
validate_config(config)
diff --git a/docker/base/sudoers b/docker/base/sudoers
index da9c04c30..9b2bfb8dc 100644
--- a/docker/base/sudoers
+++ b/docker/base/sudoers
@@ -6,6 +6,8 @@
# anyone in the kolla group may sudo -E (set the environment)
Defaults: %kolla setenv
+Defaults secure_path="/var/lib/kolla/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
+
# root may run any commands via sudo as the network seervice user. This is
# neededfor database migrations of existing services which have not been
# converted to run as a non-root user, but instead do that via sudo -E glance