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

Re: Destructive side-effect of "cg-status"

From
Junio C Hamano <junkio@cox.net>
Date
Oct 1, 2005, 18:14 UTC
Message-ID
<7vr7b53y0n.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<Pine.LNX.4.64.0510010934290.3378@g5.osdl.org>
Linus Torvalds <torvalds@osdl.org> writes:
> -	return open(cf->lockfile, O_RDWR | O_CREAT | O_EXCL, 0600);
> +	return open(cf->lockfile, O_RDWR | O_CREAT | O_EXCL, 0666);

Good spotting - thanks. We tried to use 0666/0777 everywhere and let umask do its job, but this was one of the two places we still had 0[67]00. I'd do the same for the other 0600 in mailsplit.c, not that I think it matters, but just for consistency.

Unrelated to the topic at hand, but related to the mode bits -- tar-tree generates archives with 0644/0755 permission bits. It might not be a bad idea to just let the tar command honor umask of the extracter, by storing 0666 and 0777 in the archive.

I always work in an environment where umask 002 is the norm, and get irritated when upstream tarballs of other peoples' projects create directories with mode 0755, making me do chmod 2775 on them.

Previous: Linus TorvaldsNext: Junio C Hamano
Message 4 of 18 in “Destructive side-effect of "cg-status"”
  1. Wolfgang DenkSep 30, 2005
  2. Martin LanghoffOct 1, 2005
  3. Linus TorvaldsOct 1, 2005
  4. Junio C HamanoOct 1, 2005
  5. Honor extractor's umask in git-tar-tree.Junio C Hamano, Oct 1, 2005
  6. H. Peter AnvinOct 2, 2005
  7. Matthias UrlichsOct 2, 2005
  8. H. Peter AnvinOct 3, 2005
  9. Junio C HamanoOct 3, 2005
  10. H. Peter AnvinOct 3, 2005
  11. Junio C HamanoOct 3, 2005
  12. H. Peter AnvinOct 3, 2005
  13. Linus TorvaldsOct 3, 2005
  14. H. Peter AnvinOct 3, 2005
  15. Linus TorvaldsOct 3, 2005
  16. H. Peter AnvinOct 3, 2005
  17. Wolfgang DenkOct 1, 2005
  18. Linus TorvaldsOct 1, 2005

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.