1

I have to execute a program that passes in as command line options the username and password. Is there a way to hide the username & password from appearing in the /proc entry for this process.

Bon Ami
  • 893

1 Answers1

2

If you you wrote the application or have access to the source code, you can modify it to not show that information in proc.

In C, the parameters passed to a program are communicated as a pointer to a character array (a pointer to a pointer to the characters). This array is modifiable by the application, and any modifications you make are reflected in the /proc/ entry. This includes the 0th element, which is the executable's filename.

Other languages have similar equivalents. Just modify the argument list through whichever mechanism the language implements.

tylerl
  • 2,468
  • 15
  • 18