If a module has no path setting, return an error.
authorWayne Davison <wayned@samba.org>
Sat, 3 Jul 2010 15:54:40 +0000 (08:54 -0700)
committerWayne Davison <wayned@samba.org>
Sat, 3 Jul 2010 15:54:40 +0000 (08:54 -0700)
clientserver.c

index 806a6e3..0d47688 100644 (file)
@@ -509,6 +509,11 @@ static int rsync_module(int f_in, int f_out, int i, char *addr, char *host)
         * supplementary groups. */
 
        module_dir = lp_path(i);
+       if (*module_dir == '\0') {
+               rprintf(FLOG, "No path specified for module %s\n", name);
+               io_printf(f_out, "@ERROR: no path setting.\n");
+               return -1;
+       }
        if (use_chroot) {
                if ((p = strstr(module_dir, "/./")) != NULL) {
                        *p = '\0'; /* Temporary... */