From 94df2506edd76a886a1044376f8c99349b2f226e Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 9 Jun 2006 23:09:49 -0700 Subject: shared repository: optionally allow reading to "others". This enhances core.sharedrepository to have additionally specify that read and exec permissions to be given to others as well. It is useful when serving a repository via gitweb and git-daemon that runs as a user outside the project group. The configuration item can take the following values: [core] sharedrepository ; the same as "group" sharedrepository = true ; ditto sharedrepository = 1 ; ditto sharedrepository = group ; allow rwx to group sharedrepository = all ; allow rwx to group, allow rx to other sharedrepository = umask ; not shared - use umask It also extends "git init-db" to take "--shared=all" and friends from the command line. Signed-off-by: Junio C Hamano --- cache.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cache.h') diff --git a/cache.h b/cache.h index d5d7fe4f8c..1b8e053f28 100644 --- a/cache.h +++ b/cache.h @@ -208,6 +208,12 @@ extern const unsigned char null_sha1[20]; int git_mkstemp(char *path, size_t n, const char *template); +enum sharedrepo { + PERM_UMASK = 0, + PERM_GROUP, + PERM_EVERYBODY +}; +int git_config_perm(const char *var, const char *value); int adjust_shared_perm(const char *path); int safe_create_leading_directories(char *path); char *safe_strncpy(char *, const char *, size_t); -- cgit v1.2.3