When "refuse options = compress" is set in rsyncd.conf, silently send files
[rsync/rsync.git] / options.c
index ca1b018..71a08f5 100644 (file)
--- a/options.c
+++ b/options.c
@@ -238,6 +238,13 @@ static int check_refuse_options(char *ref, int opt)
        while ((p = strstr(ref,name))) {
                if ((p==ref || p[-1]==' ') &&
                    (p[len] == ' ' || p[len] == 0)) {
+                       if (opt == 'z') {
+                               /* don't actually refuse this one, just */
+                               /*  minimize the compression level for now */
+                               extern int default_compression_level;
+                               default_compression_level = 0;
+                               return 0;
+                       }
                        slprintf(err_buf,sizeof(err_buf),
                                 "The '%s' option is not supported by this server\n", name);
                        return 1;