On 22/06/16 14:32, Sean Russell wrote:
> On Tuesday, June 21, 2016 at 9:56:21 PM UTC-4, Lazytiger wrote:
>> Thanks for all the replies. I agree that there is a better way to do the 
>> security jobs. I ask this question just for curiosity, to find out if there 
>> is a equivalence way to do this in golang. From all the replies I assume 
>> there is a no.
> 
> Environment variables. github.com/namsral/flag implements a flags library 
> that will populate flags from either command line args or environment 
> variables at run time, and is a drop-in replacement for the standard flag 
> library.

Environment variables are quite insecure too.  On linux you can read any
processes environment variables using /proc/PID/environ, eg

  cat /proc/self/environ  | tr '\000' '\n'

The permissions on these files are quite tight though, they are only
user readable, which means root or another process running as the same
user could read them.

-- 
Nick Craig-Wood <n...@craig-wood.com> -- http://www.craig-wood.com/nick

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to