summaryrefslogtreecommitdiff
path: root/dir.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-06-09 17:06:55 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-06-09 17:06:56 -0700
commitb1c418e155a86a1a6104c20e5424d847e516c8d7 (patch)
treed6a2a3e4a380b93d97fc451035b6dc3691e6ef0a /dir.c
parentMerge branch 'kb/status-ignored-optim-2' into maint (diff)
parentconfig: allow inaccessible configuration under $HOME (diff)
downloadtgif-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 13858fefa5..897c87403e 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);
}