News for hackers. Stuff that matters.
Re:Environment Variables Considered Harmful for Your Secrets by justincormack on Friday January 02, 2015 @06:17AM (#8826393)
The basic system call, execve, requires that you specify the environment explicitly. The whole idea of an inherited environment is a construct of shells and historic libc functions, and the libc functions that do not have an explicit environment should be deprecated. The man page examples show constructing the environment from scratch, which is best practise: you should never refer to the whole environment, just access individual items from it, ie never reference environ, just getenv etc.

There are no comments on this comment yet.