Re: Is getpass(3) really obsolete?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Add a few CCs, since I mentioned them.]

On 10/29/21 13:15, Alejandro Colomar wrote:
Hi,

As the manual pages says, SUSv2 marked it as LEGACY, and POSIX doesn't have it at all.  The manual page goes further and says "This function is obsolete. Do not use it." in its first lines.

But, glibc doesn't seem to have deprecated this function at all.  And it seems to be the most portable way to get a password, even if it's not in POSIX.

BSDs have readpassphrase(3), but glibc doesn't, so unless you recommend

OpenBSD also marks getpass(3) as obsolete and recommends readpassphrase(3):
<https://man.openbsd.org/getpass>

using readpassphrase(3) from libbsd, or plan to add it to glibc, I think getpass(3) should be the recommended function in Linux, and therefore we should remove the hard words against it.

As a real example, git(1) uses getpass(3).
<https://github.com/git/git/blob/master/compat/terminal.c>

What are your thoughts?

Thanks,

Alex



--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux