|
|
|
|
|
by cjbprime
3008 days ago
|
|
It has an option (e) to attempt to display environment variables, but ps is just a program that reads from /proc, and the kernel enforces isolation of environment variables by breaking reads to /proc/pid/environ for processes you don't own (or more precisely, can't ptrace), so `ps e` can't show anything for those processes. λ whoami
cjb
λ cat /proc/1/cmdline
/sbin/init%
λ cat /proc/1/environ
cat: /proc/1/environ: Permission denied
|
|
Unless the secret is some kind of one-time token, or time based token, but then it's also not relevant how the secret was passed to the process. It's invalidated soon.