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

Re: git-daemon: needs /root/.config/git/config?

From
IKIan Kumlien <pomac@vapor.com>
Date
Jun 10, 2013, 12:06 UTC
Message-ID
<20130610120653.GA14168@pomac.netswarm.net>
In-Reply-To
<20130609124757.GA3347@client.brlink.eu>
On Sun, Jun 09, 2013 at 02:47:57PM +0200, Bernhard R. Link wrote:
Show 11 quoted lines
> * Ian Kumlien <pomac@vapor.com> [130605 13:31]:
> > Yes, i agree, it's suboptimal but I for one would use getpwuid to get
> > the home directory of the executing user to avoid this - though i don't
> > know how portable it is (or if there is any other issues)
> 
> It's not only suboptimal but simply wrong. getpwuid gives at best the
> initial home directory, and even there it is only a guess. (If you are
> looking for some home directory of a different user it might be a good
> guess). But using getpwuid(getuid())->pw_dir if HOME is set is a serious
> mistake, as you throw out the good value for some almost but not quite
> totally unrelated value.

Well i never intended for it to replace the environment variable, it was more intended as a fallback - if there will be a "less strict" mode then perhaps a fallback would be a more controled way of doing it.

>         Bernhard R. Link
Previous: Bernhard R. Link
Message 12 of 12 in “git-daemon: needs /root/.config/git/config?”
  1. Ian KumlienJun 4, 2013
  2. Jeff KingJun 4, 2013
  3. Johannes SixtJun 4, 2013
  4. Jonathan NiederJun 4, 2013
  5. Junio C HamanoJun 4, 2013
  6. Jeff KingJun 4, 2013
  7. Junio C HamanoJun 4, 2013
  8. Ian KumlienJun 5, 2013
  9. Andreas KreyJun 5, 2013
  10. Jeff KingJun 5, 2013
  11. Bernhard R. LinkJun 9, 2013
  12. Ian KumlienJun 10, 2013

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.