]> git.ipfire.org Git - thirdparty/util-linux.git/commit
newgrp: avoid use of obsolete getpass() function
authorSami Kerola <kerolasa@iki.fi>
Sun, 14 Sep 2014 17:57:37 +0000 (18:57 +0100)
committerSami Kerola <kerolasa@iki.fi>
Fri, 19 Sep 2014 18:31:03 +0000 (19:31 +0100)
commit8f663a674dc6a48c542299dda1d28d69e0525081
tree7b58ad2f1a57bcde08c8a79f8c218d4a197683e2
parentc829aebc397f75f24762ed046fc8e3402762b60f
newgrp: avoid use of obsolete getpass() function

Read a password from user with termios, and once the password data is no
longer needed ensure it gets overwrote before unallocating memory.

Reference: http://man7.org/linux/man-pages/man3/getpass.3.html
Reference: https://www.securecoding.cert.org/confluence/display/seccode/MSC06-C.+Beware+of+compiler+optimizations
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
login-utils/newgrp.c