diff options
| author | Radosław Piliszek <radoslaw.piliszek@gmail.com> | 2022-08-29 09:55:59 +0000 |
|---|---|---|
| committer | Radosław Piliszek <radoslaw.piliszek@gmail.com> | 2022-08-29 10:05:05 +0000 |
| commit | 5b1da017988c987fc68b55d1f45b5d2676474ce1 (patch) | |
| tree | b8e18e89f4ea8ffc55f0c9e8979e71fee002575c /docker | |
| parent | 91c2cc0d8d4caf8fa6567b95d8f7e7b4fc4dd443 (diff) | |
| download | kolla-5b1da017988c987fc68b55d1f45b5d2676474ce1.tar.gz kolla-5b1da017988c987fc68b55d1f45b5d2676474ce1.zip | |
Fix CVE-2022-38060
Closes-Bug: #1985784
Change-Id: I66476a2b396e2cbe41e68ac51f57aae1806b2ed8
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/base/set_configs.py | 19 | ||||
| -rw-r--r-- | docker/base/sudoers | 2 |
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 |
