Use adler32() from zlib instead of defining our own.
[git.git] / daemon.c
index 3bd1426..532bb0c 100644 (file)
--- a/daemon.c
+++ b/daemon.c
@@ -9,6 +9,7 @@
 #include <syslog.h>
 #include "pkt-line.h"
 #include "cache.h"
+#include "exec_cmd.h"
 
 static int log_syslog;
 static int verbose;
@@ -146,7 +147,7 @@ static char *path_ok(char *dir)
                static char rpath[PATH_MAX];
                if (*dir != '/') {
                        /* Forbid possible base-path evasion using ~paths. */
-                       logerror("'%s': Non-absolute path denied (base-path active)");
+                       logerror("'%s': Non-absolute path denied (base-path active)", dir);
                        return NULL;
                }
                snprintf(rpath, PATH_MAX, "%s%s", base_path, dir);
@@ -227,7 +228,7 @@ static int upload(char *dir)
        snprintf(timeout_buf, sizeof timeout_buf, "--timeout=%u", timeout);
 
        /* git-upload-pack only ever reads stuff, so this is safe */
-       execlp("git-upload-pack", "git-upload-pack", "--strict", timeout_buf, ".", NULL);
+       execl_git_cmd("upload-pack", "--strict", timeout_buf, ".", NULL);
        return -1;
 }