Can the environment variables for a modified environment be accessed externally?

augray

Ok, so I have some code that consists of two processes: (a) a parent/ launcher process, (b) a child process. (a) has a password that it needs to safely pass to (b). For reasons I won't go into here, I can't pass the password by opening a pipe between the two. I'm considering having (a) create a modified environment for (b) (using the env argument here, FWIW) that contains a password environment variable. My hope is that this environment variable with the password will not be accessible outside the context of process (b). Is that correct?

Ideally I need to have this be secure on both Linux and Unix systems.

xhienne

My hope os that this environment variable with the password will not be accessible outside the context of process (b). Is that correct?

No, you should not rely on this. For example, on Linux, a process run by the same user can have access to your environment through /proc/<pid>/environ

Try:

tr '\0' '\n' < /proc/$$/environ

(or with the PID of any of your processes)

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

cron can't read PYTHONPATH environment variables?

분류에서Dev

Accessing Environment Variables in flash

분류에서Dev

Bash - check environment variables

분류에서Dev

Where is file that saves Environment Variables?

분류에서Dev

Knife ssh not loading environment variables

분류에서Dev

Python (Django): environment variables, visibility

분류에서Dev

Global environment variables in Eclipse and Yosemite

분류에서Dev

Rails 4.1 environment variables not reloading

분류에서Dev

How to use Monit Environment variables?

분류에서Dev

Android Studio ignoring environment variables

분류에서Dev

How to refer to environment variables in Cypress config files?

분류에서Dev

How to backup/export Gitlab CI environment variables?

분류에서Dev

Are environment variables visible to unprivileged users on Linux?

분류에서Dev

Launching the graphical interface for setting environment variables

분류에서Dev

How to assign environment variables in parallel in bash

분류에서Dev

how to use system environment variables in boto

분류에서Dev

How do I configure environment variables in cmder?

분류에서Dev

How to export Environment variables to a text file

분류에서Dev

How to set environment variables with sudo -u USER?

분류에서Dev

AWS Elastic Beanstalk Docker environment variables

분류에서Dev

How to print all non-environment variables?

분류에서Dev

List all environment variables, and show if they are exported or not

분류에서Dev

Set global environment variables from a custom file

분류에서Dev

Storing all environment variables in one file

분류에서Dev

Is there any computer parts that can be trashed safely (for the environment)?

분류에서Dev

Can I manually set multiple proxies in environment?

분류에서Dev

Using environment variables for mysql database password and host throws errors

분류에서Dev

Docker-Compose Environment-Variables 빈 문자열

분류에서Dev

Vue-cli 3 Environment Variables all undefined

Related 관련 기사

  1. 1

    cron can't read PYTHONPATH environment variables?

  2. 2

    Accessing Environment Variables in flash

  3. 3

    Bash - check environment variables

  4. 4

    Where is file that saves Environment Variables?

  5. 5

    Knife ssh not loading environment variables

  6. 6

    Python (Django): environment variables, visibility

  7. 7

    Global environment variables in Eclipse and Yosemite

  8. 8

    Rails 4.1 environment variables not reloading

  9. 9

    How to use Monit Environment variables?

  10. 10

    Android Studio ignoring environment variables

  11. 11

    How to refer to environment variables in Cypress config files?

  12. 12

    How to backup/export Gitlab CI environment variables?

  13. 13

    Are environment variables visible to unprivileged users on Linux?

  14. 14

    Launching the graphical interface for setting environment variables

  15. 15

    How to assign environment variables in parallel in bash

  16. 16

    how to use system environment variables in boto

  17. 17

    How do I configure environment variables in cmder?

  18. 18

    How to export Environment variables to a text file

  19. 19

    How to set environment variables with sudo -u USER?

  20. 20

    AWS Elastic Beanstalk Docker environment variables

  21. 21

    How to print all non-environment variables?

  22. 22

    List all environment variables, and show if they are exported or not

  23. 23

    Set global environment variables from a custom file

  24. 24

    Storing all environment variables in one file

  25. 25

    Is there any computer parts that can be trashed safely (for the environment)?

  26. 26

    Can I manually set multiple proxies in environment?

  27. 27

    Using environment variables for mysql database password and host throws errors

  28. 28

    Docker-Compose Environment-Variables 빈 문자열

  29. 29

    Vue-cli 3 Environment Variables all undefined

뜨겁다태그

보관