summaryrefslogtreecommitdiff
path: root/daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'daemon.c')
-rw-r--r--daemon.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/daemon.c b/daemon.c
index 94a5b8a..0ae7d12 100644
--- a/daemon.c
+++ b/daemon.c
@@ -279,7 +279,7 @@ static const char *path_ok(const char *directory, struct hostinfo *hi)
/* The validation is done on the paths after enter_repo
* appends optional {.git,.git/.git} and friends, but
* it does not use getcwd(). So if your /pub is
- * a symlink to /mnt/pub, you can whitelist /pub and
+ * a symlink to /mnt/pub, you can include /pub and
* do not have to say /mnt/pub.
* Do not say /pub/.
*/
@@ -298,7 +298,7 @@ static const char *path_ok(const char *directory, struct hostinfo *hi)
return path;
}
- logerror("'%s': not in whitelist", path);
+ logerror("'%s': not in directory list", path);
return NULL; /* Fallthrough. Deny by default */
}
@@ -403,7 +403,7 @@ static int run_service(const char *dir, struct daemon_service *service,
* a "git-daemon-export-ok" flag that says that the other side
* is ok with us doing this.
*
- * path_ok() uses enter_repo() and does whitelist checking.
+ * path_ok() uses enter_repo() and checks for included directories.
* We only need to make sure the repository is exported.
*/
@@ -447,7 +447,7 @@ static void copy_to_log(int fd)
FILE *fp;
fp = fdopen(fd, "r");
- if (fp == NULL) {
+ if (!fp) {
logerror("fdopen of error channel failed");
close(fd);
return;
@@ -484,7 +484,7 @@ static int upload_pack(const struct strvec *env)
strvec_pushl(&cld.args, "upload-pack", "--strict", NULL);
strvec_pushf(&cld.args, "--timeout=%u", timeout);
- strvec_pushv(&cld.env_array, env->v);
+ strvec_pushv(&cld.env, env->v);
return run_service_command(&cld);
}
@@ -494,7 +494,7 @@ static int upload_archive(const struct strvec *env)
struct child_process cld = CHILD_PROCESS_INIT;
strvec_push(&cld.args, "upload-archive");
- strvec_pushv(&cld.env_array, env->v);
+ strvec_pushv(&cld.env, env->v);
return run_service_command(&cld);
}
@@ -504,7 +504,7 @@ static int receive_pack(const struct strvec *env)
struct child_process cld = CHILD_PROCESS_INIT;
strvec_push(&cld.args, "receive-pack");
- strvec_pushv(&cld.env_array, env->v);
+ strvec_pushv(&cld.env, env->v);
return run_service_command(&cld);
}
@@ -904,16 +904,16 @@ static void handle(int incoming, struct sockaddr *addr, socklen_t addrlen)
char buf[128] = "";
struct sockaddr_in *sin_addr = (void *) addr;
inet_ntop(addr->sa_family, &sin_addr->sin_addr, buf, sizeof(buf));
- strvec_pushf(&cld.env_array, "REMOTE_ADDR=%s", buf);
- strvec_pushf(&cld.env_array, "REMOTE_PORT=%d",
+ strvec_pushf(&cld.env, "REMOTE_ADDR=%s", buf);
+ strvec_pushf(&cld.env, "REMOTE_PORT=%d",
ntohs(sin_addr->sin_port));
#ifndef NO_IPV6
} else if (addr->sa_family == AF_INET6) {
char buf[128] = "";
struct sockaddr_in6 *sin6_addr = (void *) addr;
inet_ntop(AF_INET6, &sin6_addr->sin6_addr, buf, sizeof(buf));
- strvec_pushf(&cld.env_array, "REMOTE_ADDR=[%s]", buf);
- strvec_pushf(&cld.env_array, "REMOTE_PORT=%d",
+ strvec_pushf(&cld.env, "REMOTE_ADDR=[%s]", buf);
+ strvec_pushf(&cld.env, "REMOTE_PORT=%d",
ntohs(sin6_addr->sin6_port));
#endif
}
@@ -1444,7 +1444,7 @@ int cmd_main(int argc, const char **argv)
cred = prepare_credentials(user_name, group_name);
if (strict_paths && (!ok_paths || !*ok_paths))
- die("option --strict-paths requires a whitelist");
+ die("option --strict-paths requires '<directory>' arguments");
if (base_path && !is_directory(base_path))
die("base-path '%s' does not exist or is not a directory",