summaryrefslogtreecommitdiff
path: root/builtin
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 /builtin
parentfd500302096b5b4e45d78c14d6ea9a704f556a16 (diff)
parent4698c8feb1bb56497215e0c10003dd046df352fa (diff)
downloadgit-b1c418e155a86a1a6104c20e5424d847e516c8d7.tar.gz
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 'builtin')
-rw-r--r--builtin/config.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/config.c b/builtin/config.c
index 33c9bf9d84..19ffcaf187 100644
--- a/builtin/config.c
+++ b/builtin/config.c
@@ -379,8 +379,8 @@ int cmd_config(int argc, const char **argv, const char *prefix)
*/
die("$HOME not set");
- if (access_or_warn(user_config, R_OK) &&
- xdg_config && !access_or_warn(xdg_config, R_OK))
+ if (access_or_warn(user_config, R_OK, 0) &&
+ xdg_config && !access_or_warn(xdg_config, R_OK, 0))
given_config_file = xdg_config;
else
given_config_file = user_config;