If a module has no path setting, return an error.
authorWayne Davison <wayned@samba.org>
Sat, 6 Feb 2010 21:40:12 +0000 (13:40 -0800)
committerWayne Davison <wayned@samba.org>
Sat, 6 Feb 2010 21:40:12 +0000 (13:40 -0800)
clientserver.c

index 340ce5d..a7996c7 100644 (file)
@@ -613,6 +613,11 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
        }
 
        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... */