]> git.ozlabs.org Git - ppp.git/commit
pppd: Obfuscate password argument string
authorPaul Mackerras <paulus@ozlabs.org>
Sat, 21 Mar 2020 04:13:42 +0000 (15:13 +1100)
committerPaul Mackerras <paulus@ozlabs.org>
Sat, 21 Mar 2020 04:13:42 +0000 (15:13 +1100)
commitae54fcfadeb52398804fa8900988bf86c0b91748
tree340399fd35177702b7f7ec21a6fbf517ed53cd21
parent8d45443bb5c9372b4c6a362ba2f443d41c5636af
pppd: Obfuscate password argument string

After processing the argument to the 'password' option, this
overwrites the original argument on the stack with '?' characters,
and for good measure makes the argument pointer point to a constant
string "********" so as not to reveal the length of the password.
This is so that tools such as ps don't show the actual password
when displaying the process arguments.  Nevertheless, it is still
better to get the password from a file, since there is inevitably
still a window of time when the password would be visible.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
pppd/options.c