aboutsummaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-09 17:06:55 -0700
committerJunio C Hamano <gitster@pobox.com>2013-06-09 17:06:56 -0700
commitb1c418e155a86a1a6104c20e5424d847e516c8d7 (patch)
treed6a2a3e4a380b93d97fc451035b6dc3691e6ef0a /dir.c
parentfd500302096b5b4e45d78c14d6ea9a704f556a16 (diff)
parent4698c8feb1bb56497215e0c10003dd046df352fa (diff)
downloadgit-b1c418e155a86a1a6104c20e5424d847e516c8d7.tar.gz
git-b1c418e155a86a1a6104c20e5424d847e516c8d7.tar.xz
Merge branch 'jn/config-ignore-inaccessible' into maint
A git daemon that starts as "root" and then drops privilege often leaves $HOME set to that of the root user, which is unreadable by the daemon process, which was diagnosed as a configuration error. Make per-user configuration files that are inaccessible due to EACCES as though these files do not exist to avoid this issue, as the tightening which was originally meant as an additional security has annoyed enough sysadmins. * jn/config-ignore-inaccessible: config: allow inaccessible configuration under $HOME
Diffstat (limited to 'dir.c')
-rw-r--r--dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dir.c b/dir.c
index 13858fefa..897c87403 100644
--- a/dir.c
+++ b/dir.c
@@ -1545,9 +1545,9 @@ void setup_standard_excludes(struct dir_struct *dir)
home_config_paths(NULL, &xdg_path, "ignore");
excludes_file = xdg_path;
}
- if (!access_or_warn(path, R_OK))
+ if (!access_or_warn(path, R_OK, 0))
add_excludes_from_file(dir, path);
- if (excludes_file && !access_or_warn(excludes_file, R_OK))
+ if (excludes_file && !access_or_warn(excludes_file, R_OK, 0))
add_excludes_from_file(dir, excludes_file);
}