Re: Destructive side-effect of "cg-status"
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:07
Linus Torvalds [off-list ref] 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.