X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/53936ef935e97d2036ad09b61b7040979d175469..aa0e6b9977eff5c5433239a916623a4a3e8a67cb:/clientserver.c diff --git a/clientserver.c b/clientserver.c index 6da1138f..93deb7e6 100644 --- a/clientserver.c +++ b/clientserver.c @@ -505,7 +505,7 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host) if ((p = strstr(module_dir, "/./")) != NULL) { *p = '\0'; p += 2; - } else if ((p = strdup("/")) == NULL) + } else if ((p = strdup("/")) == NULL) /* MEMORY LEAK */ out_of_memory("rsync_module"); } @@ -691,7 +691,7 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host) munge_symlinks = !use_chroot || module_dirlen; if (munge_symlinks) { STRUCT_STAT st; - if (stat(SYMLINK_PREFIX, &st) == 0 && S_ISDIR(st.st_mode)) { + if (do_stat(SYMLINK_PREFIX, &st) == 0 && S_ISDIR(st.st_mode)) { rprintf(FLOG, "Symlink munging is unsupported when a %s directory exists.\n", SYMLINK_PREFIX); io_printf(f_out, "@ERROR: daemon security issue -- contact admin\n", name);