public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
Cc: Libc-alpha <libc-alpha@sourceware.org>,
	linux-man <linux-man@vger.kernel.org>,
	git@vger.kernel.org, "tech@openbsd.org" <tech@openbsd.org>,
	"Benoit Lecocq" <benoit@openbsd.org>,
	"Klemens Nanni" <kn@openbsd.org>
Subject: Re: Is getpass(3) really obsolete?
Date: Fri, 29 Oct 2021 13:40:36 +0200	[thread overview]
Message-ID: <211029.86r1c43uwj.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <73ac38a2-c287-4cc1-4e9c-0f9766ac4c0c@gmail.com>


On Fri, Oct 29 2021, Alejandro Colomar (man-pages) wrote:

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

[I'm not sure what the full context of this thread is, but just replying
from the POV of git@ being CC'd on this]

> 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>

Simply not being familiar with that case: Is that suggestive of
getpass(3) being bad to use in general, or a case where OpenBSD's
deprecation of it makes sense holistically on that OS, but not
necessarily elsewhere?

Just skimming the linked man pages it looks like OpenBSD might have
deprecated it at least partly due to getpass() accepting a password on
stdin.

Even within OpenBSD I wonder what that case means for software such as
git. I.e. is it better to be portable and accept the same behavior on
OpenBSD as elsewhere, or conform more closely to platform-specific
conventions.

I haven't looked closely out our getpass() integration, maybe that's a
moot point either way.

>> 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
>> 

Just while we've got some OpenBSD people CC'd (added the devel/git
maintainers). I occasionally test git on OpenBSD myself (on the GCC
farm), and we've got a few broken tests on the platform.

Looking at the ports source there's at least a couple of OpenBSD
portability patches in there that would make sense to
upstream.

So if that's easy for you or you're willing to submit them upstream we'd
be happy to take them. Usually the only reason we haven't fixed things
like that already is because nobody told us, and we're not actively
looking into the local patches local packagers apply.

  reply	other threads:[~2021-10-29 11:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-29 11:15 Alejandro Colomar
2021-10-29 11:28 ` Alejandro Colomar (man-pages)
2021-10-29 11:40   ` Ævar Arnfjörð Bjarmason [this message]
2021-10-29 12:11     ` Alejandro Colomar (man-pages)
2021-10-29 16:31       ` Joseph Myers
2021-10-30 12:24         ` Alejandro Colomar (man-pages)
2021-11-01 21:31           ` Joseph Myers
2021-10-29 12:10   ` rsbecker
2021-10-29 13:55     ` Eugene Syromyatnikov
2021-10-29 13:55     ` Theo de Raadt
2021-10-29 14:18       ` rsbecker
2021-10-29 14:21         ` Theo de Raadt
2021-10-29 14:33           ` rsbecker
2021-10-29 14:44             ` Alejandro Colomar (man-pages)
2021-10-29 15:00               ` rsbecker
2021-10-29 14:53       ` Zack Weinberg
2022-09-27 19:19         ` readpassphrase(3) in glibc, and agetpass() (Was: Is getpass(3) really obsolete?) Alejandro Colomar
2022-09-27 19:33           ` Alex Colomar
2022-09-27 20:30           ` Sam James
2022-09-27 21:00             ` Zack Weinberg
2022-09-27 22:41               ` Alejandro Colomar
2022-09-27 20:52           ` readpassphrase(3) in glibc, and agetpass() Junio C Hamano
2021-10-29 15:27   ` [PATCH] getpass.3: SYNOPSIS: Mark getpass() as [[deprecated]] Alejandro Colomar
2021-10-29 20:27   ` Is getpass(3) really obsolete? Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=211029.86r1c43uwj.gmgdl@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=alx.manpages@gmail.com \
    --cc=benoit@openbsd.org \
    --cc=git@vger.kernel.org \
    --cc=kn@openbsd.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=tech@openbsd.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).