From 6543f444c42ff45e8115366256643186bf1dd567 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Tue, 6 Aug 2024 20:21:12 -0500 Subject: configd: T6640: enforce in_session returns False under configd The CStore in_session check is a false positive outside of a config session if a specific environment variable is set with an existing referent in unionfs. To allow extensions when running under configd and avoid confusion, enforce in_session returns False. --- python/vyos/configsource.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'python') diff --git a/python/vyos/configsource.py b/python/vyos/configsource.py index f582bdfab..59e5ac8a1 100644 --- a/python/vyos/configsource.py +++ b/python/vyos/configsource.py @@ -204,6 +204,8 @@ class ConfigSourceSession(ConfigSource): Returns: True if called from a configuration session, False otherwise. """ + if os.getenv('VYOS_CONFIGD', ''): + return False try: self._run(self._make_command('inSession', '')) return True -- cgit v1.2.3