Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numerous of os.getenv() anf os.putenv() #1229

Open
moreati opened this issue Jan 27, 2025 · 0 comments
Open

Numerous of os.getenv() anf os.putenv() #1229

moreati opened this issue Jan 27, 2025 · 0 comments
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome

Comments

@moreati
Copy link
Member

moreati commented Jan 27, 2025

os.getenv() is probably harmless, os.putenv() my be a footgun. AIUI outcome is not reflected in os.environ

mitogen git:(issue1124) ✗ ag os.putenv
tests/sudo_test.py
71:#         ssh.call(os.putenv, 'LANGUAGE', 'fr')
72:#         ssh.call(os.putenv, 'LC_ALL', 'fr_FR.UTF-8')
83:#         ssh.call(os.putenv, 'LANGUAGE', 'fr')
84:#         ssh.call(os.putenv, 'LC_ALL', 'fr_FR.UTF-8')
95:#         ssh.call(os.putenv, 'LANGUAGE', 'fr')
96:#         ssh.call(os.putenv, 'LC_ALL', 'fr_FR.UTF-8')mitogen git:(issue1124) ✗ ag os.getenv
ansible_mitogen/services.py
121:    max_interpreters = int(os.getenv('MITOGEN_MAX_INTERPRETERS', '20'))

tests/kubectl_test.py
15:        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))

tests/doas_test.py
17:        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))
24:        self.assertEqual('1', context.call(os.getenv, 'THIS_IS_STUB_DOAS'))

tests/lxc_test.py
24:        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))

tests/ssh_test.py
232:        self.assertEqual('1', context.call(os.getenv, 'STDERR_WAS_TTY'))
237:        self.assertEqual(None, context.call(os.getenv, 'STDERR_WAS_TTY'))
242:        self.assertEqual(None, context.call(os.getenv, 'STDERR_WAS_TTY'))
247:        self.assertEqual('1', context.call(os.getenv, 'STDERR_WAS_TTY'))

tests/podman_test.py
16:        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))
34:        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))

tests/su_test.py
17:        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))

tests/buildah_test.py
15:        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))

tests/lxd_test.py
17:        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))

tests/docker_test.py
15:        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))

tests/sudo_test.py
14:        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))
56:            self.assertEqual('1', context.call(os.getenv, 'PREHISTORIC_SUDO'))

tests/jail_test.py
16:        argv = eval(context.call(os.getenv, 'ORIGINAL_ARGV'))
23:        self.assertEqual('1', context.call(os.getenv, 'THIS_IS_STUB_JEXEC'))

tests/data/stubs/stub-ssh.py
43:mode = os.getenv('STUBSSH_MODE')
@moreati moreati added affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome labels Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-0.3 Issues related to 0.3.X Mitogen releases bug Code feature that hinders desired execution outcome
Projects
None yet
Development

No branches or pull requests

1 participant