diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-06-09 17:06:55 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-06-09 17:06:56 -0700 |
commit | b1c418e155a86a1a6104c20e5424d847e516c8d7 (patch) | |
tree | d6a2a3e4a380b93d97fc451035b6dc3691e6ef0a /git-compat-util.h | |
parent | fd500302096b5b4e45d78c14d6ea9a704f556a16 (diff) | |
parent | 4698c8feb1bb56497215e0c10003dd046df352fa (diff) | |
download | git-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 'git-compat-util.h')
-rw-r--r-- | git-compat-util.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/git-compat-util.h b/git-compat-util.h index e955bb5e8b..c1f8a477fb 100644 --- a/git-compat-util.h +++ b/git-compat-util.h @@ -692,8 +692,9 @@ int remove_or_warn(unsigned int mode, const char *path); * Call access(2), but warn for any error except "missing file" * (ENOENT or ENOTDIR). */ -int access_or_warn(const char *path, int mode); -int access_or_die(const char *path, int mode); +#define ACCESS_EACCES_OK (1U << 0) +int access_or_warn(const char *path, int mode, unsigned flag); +int access_or_die(const char *path, int mode, unsigned flag); /* Warn on an inaccessible file that ought to be accessible */ void warn_on_inaccessible(const char *path); |