1110d0
diff --git a/loadparm.c b/loadparm.c
1110d0
index 029f358f..534e7b63 100644
1110d0
--- a/loadparm.c
1110d0
+++ b/loadparm.c
1110d0
@@ -449,7 +449,7 @@ static struct parm_struct parm_table[] =
1110d0
 };
1110d0
 
1110d0
 /* Initialise the Default all_vars structure. */
1110d0
-static void reset_all_vars(void)
1110d0
+void reset_daemon_vars(void)
1110d0
 {
1110d0
 	memcpy(&Vars, &Defaults, sizeof Vars);
1110d0
 }
1110d0
@@ -872,7 +872,7 @@ int lp_load(char *pszFname, int globals_only)
1110d0
 {
1110d0
 	bInGlobalSection = True;
1110d0
 
1110d0
-	reset_all_vars();
1110d0
+	reset_daemon_vars();
1110d0
 
1110d0
 	/* We get sections first, so have to start 'behind' to make up. */
1110d0
 	iSectionIndex = -1;
1110d0
diff --git a/main.c b/main.c
1110d0
index 1328c504..9af9e5d3 100644
1110d0
--- a/main.c
1110d0
+++ b/main.c
1110d0
@@ -1681,6 +1681,10 @@ int main(int argc,char *argv[])
1110d0
 
1110d0
 	memset(&stats, 0, sizeof(stats));
1110d0
 
1110d0
+	/* Even a non-daemon runs needs the default config values to be set, e.g.
1110d0
+	 * lp_dont_compress() is queried when no --skip-compress option is set. */
1110d0
+	reset_daemon_vars();
1110d0
+
1110d0
 	if (argc < 2) {
1110d0
 		usage(FERROR);
1110d0
 		exit_cleanup(RERR_SYNTAX);