diff --git a/config.c b/config.c
index 2ae6153e5ee29ca88f52241d1ece79069d8c5875..c47497001e172060abdcd08e4a606bec89303232 100644 (file)
--- a/config.c
+++ b/config.c
* contents of .git/config will be written into it.
*/
fd = open(lock_file, O_WRONLY | O_CREAT | O_EXCL, 0666);
- if (fd < 0) {
+ if (fd < 0 || adjust_shared_perm(lock_file)) {
fprintf(stderr, "could not lock config file\n");
free(store.key);
ret = -1;