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

Re: [PATCH] Authentication support for pserver

From
Martin Langhoff <martin.langhoff@gmail.com>
Date
Dec 18, 2007, 09:41 UTC
Message-ID
<46a038f90712180141x2f27e6cei5ef53339fd3f90dc@mail.gmail.com>
In-Reply-To
<877ijhm1b5.fsf@cpan.org>
On Dec 15, 2007 10:08 AM, Ævar Arnfjörð Bjarmason <avar@cpan.org> wrote:
> > Looks good.  I'll queue only so that I won't lose it and wait for Acks
> > from Mart[iy]ns.  Please sign off your patch.

I have been mulling a bit about this change. Seems correct from a code flow POV. But anon pserver support was added with a lot of trepidation. Authenticated, write-enabled pserver support fills me with dread ;-)

A few things that come to mind
 - git/config is very likely to be readable if the site is served via
other means, like dumb http protocol, or git+ssh. So even if the
password scrambling is mickey-mouse. it might make sense to force the
password data to live elsewhere.
 - umasks/file permissions will probably be handled by the underlying
git tools and core.sharedrepository, since we no longer update refs
"manually". So after a bit of thinking, this should not be an issue.
 - I still worry about running cvsserver with an acct that has write
privileges. With anon, all we need write access is the sqlite db, and
that's not even based on user input. And it can be relocated elsewhere
via git/config.

So, wondering about input validation and related matters re-read most of cvsserver. The only suspicious bit I find is a caller to transmitfile @ lines 1117, where the 2nd parameter doesn't come from tempfile() - if a nasty filename sneaked in, we could (perhaps) be in for a surprise. We do that for diff header prettyness - we could use --label / -L instead. Will try and prep a patch for that tomorrow if noone beats me to it (bedtime in nz!).

Hmmm. Does "worried ACK" count as an ACK? Can we add big fat warnings along the lines of "run this in a locked down environment, pretty please"?

cheers,
m
Previous: Ævar Arnfjörð BjarmasonNext: Martin Langhoff
Message 7 of 25 in “Authentication support for pserver”
  1. Authentication support for pserverÆvar Arnfjörð Bjarmason, Dec 14, 2007
  2. Junio C HamanoDec 14, 2007
  3. Shawn O. PearceDec 14, 2007
  4. Ævar Arnfjörð BjarmasonDec 14, 2007
  5. Junio C HamanoDec 14, 2007
  6. Ævar Arnfjörð BjarmasonDec 14, 2007
  7. Martin LanghoffDec 18, 2007
  8. Martin LanghoffDec 18, 2007
  9. Ævar Arnfjörð BjarmasonMar 7, 2008
  10. Ævar Arnfjörð BjarmasonMar 7, 2008
  11. Ævar Arnfjörð BjarmasonJun 19, 2008
  12. Martin LanghoffJun 19, 2008
  13. Junio C HamanoJun 19, 2008
  14. Junio C HamanoJun 19, 2008
  15. 0/6 git-cvsserver: password support for pserverÆvar Arnfjörð Bjarmason, May 15, 2010
  16. 1/6 git-cvsserver: authentication support for pserverÆvar Arnfjörð Bjarmason, May 15, 2010
  17. 1/6 git-cvsserver: authentication support for pserverÆvar Arnfjörð Bjarmason, May 15, 2010
  18. 2/6 git-cvsserver: use a password file cvsserver pserverÆvar Arnfjörð Bjarmason, May 15, 2010
  19. 2/6 git-cvsserver: use a password file cvsserver pserverÆvar Arnfjörð Bjarmason, May 15, 2010
  20. 3/6 git-cvsserver: indent & clean up authdb codeÆvar Arnfjörð Bjarmason, May 15, 2010
  21. 4/6 git-cvsserver: Improved error handling for pserverÆvar Arnfjörð Bjarmason, May 15, 2010
  22. 5/6 git-cvsserver: document making a password without htpasswdÆvar Arnfjörð Bjarmason, May 15, 2010
  23. 6/6 git-cvsserver: test for pserver authentication supportÆvar Arnfjörð Bjarmason, May 15, 2010
  24. Ævar Arnfjörð BjarmasonDec 18, 2007
  25. Junio C HamanoDec 18, 2007

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.