Don't turn off the user's open-noatime unless the module is forcing the value.
[rsync.git] / clientserver.c
index ab559e380b182fa6f985be2bc61ec46d4ac2c44d..d1aa6081cc3431f72d993d8b957c35092dbd3136 100644 (file)
@@ -990,8 +990,11 @@ static int rsync_module(int f_in, int f_out, int i, const char *addr, const char
        } else
                orig_early_argv = NULL;
 
+       /* The default is to use the user's setting unless the module sets True or False. */
+       if (lp_open_noatime(module_id) >= 0)
+               open_noatime = lp_open_noatime(module_id);
+
        munge_symlinks = save_munge_symlinks; /* The client mustn't control this. */
-       open_noatime = lp_open_noatime(module_id);
 
        if (am_daemon > 0)
                msgs2stderr = 0; /* A non-rsh-run daemon doesn't have stderr for msgs. */