News for hackers. Stuff that matters.
Re:Don’t use environment variables for configuration by zokier on Thursday April 01, 2021 @09:16AM (#26660104)
In typical Linux setups, cmdline is world-readable, but environ is not. So you never should put secrets in cmdline, but they are ok to be in environ. And that is pretty much the only difference between the two.
Re:Don’t use environment variables for configuration by icedchai on Thursday April 01, 2021 @12:50PM (#26662979)
The environment is inherited by child processes. I think that is a very important difference.
Re:Don’t use environment variables for configuration by zokier on Thursday April 01, 2021 @06:17PM (#26666906)
Of the relevant Linux syscalls neither fork or clone touch argv or environ at all, on the other hand execve requires passing both argv and envp explicitly