git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Avoid crippled getpass function on Solaris

From
Jeff King <peff@peff.net>
Date
Aug 6, 2012, 19:39 UTC
Message-ID
<20120806193958.GA10039@sigill.intra.peff.net>
In-Reply-To
<1344220427-sup-3468@pinkfloyd.chass.utoronto.ca>
On Sun, Aug 05, 2012 at 10:35:06PM -0400, Ben Walton wrote:
Show 11 quoted lines
> Excerpts from Junio C Hamano's message of Sun Aug 05 21:59:48 -0400 2012:
> > Wouldn't
> > 
> >     #if solaris
> >         #define getpass getpassphrase
> >         #endif
> > 
> > without anything else be more than sufficient?
> 
> Yes, it would, but I was hoping to make it more explicit that the
> function getpass may be substituted with something else.

I don't think that's important. Either the thing is a drop-in replica of getpass, or it is not. In the former case, it's OK for it to be transparent that it has been replaced. In the latter case, it should not be a #define replacement at all, but should be its own alternative in compat/terminal.c (just like HAVE_DEV_TTY is). From my reading of getpassphrase, it does seem to be a drop-in replacement.

So I'm OK conceptually with the patch if we can't do any better. But getpass still sucks. It doesn't handle echoing, and it may or may not fall back to reading from stdin if the tty isn't available (which is disastrous for remote-curl, whose stdin is speaking the remote-helper protocol to git). So I'd really prefer to make HAVE_DEV_TTY work with Solaris if we can.

I'm happy to spend a few cycles on it. I don't have access to any real Solaris boxes these days, but I imagine I can get OpenSolaris running under VirtualBox without too much trouble...

-Peff
PS If we do go the getpassphrase route, does it make sense to introduce
   HAVE_GETPASSPHRASE? We usually try to provide one layer of
   indirection by naming our #defines after features, and then
   connecting systems to the feature defines via the Makefile. But maybe
   Solaris is the only system that has getpassphrase.
Previous: Ben WaltonNext: Junio C Hamano
Message 6 of 27 in “Avoid crippled getpass function on Solaris”
  1. Avoid crippled getpass function on SolarisBen Walton, Aug 5, 2012
  2. Tay Ray ChuanAug 6, 2012
  3. Ben WaltonAug 6, 2012
  4. Junio C HamanoAug 6, 2012
  5. Ben WaltonAug 6, 2012
  6. Jeff KingAug 6, 2012
  7. Junio C HamanoAug 6, 2012
  8. Ben WaltonAug 6, 2012
  9. Jeff KingAug 6, 2012
  10. Ben WaltonAug 6, 2012
  11. Jeff KingAug 6, 2012
  12. Ben WaltonAug 6, 2012
  13. Jeff KingAug 6, 2012
  14. Ben WaltonAug 6, 2012
  15. Jeff KingAug 7, 2012
  16. Andreas SchwabAug 6, 2012
  17. Jeff KingAug 7, 2012
  18. Jeff KingAug 7, 2012
  19. Tay Ray ChuanAug 7, 2012
  20. Ben WaltonAug 7, 2012
  21. Enable HAVE_DEV_TTY for SolarisBen Walton, Aug 7, 2012
  22. Junio C HamanoAug 7, 2012
  23. Jeff KingAug 7, 2012
  24. Jeff KingAug 7, 2012
  25. Ben WaltonAug 7, 2012
  26. Erik Faye-LundAug 8, 2012
  27. Jeff KingAug 8, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.