Commit fed1f3f4 authored by Wayne Davison's avatar Wayne Davison

Make use of the per-module "temp dir" setting.

parent 18cad449
...@@ -48,6 +48,7 @@ extern char *bind_address; ...@@ -48,6 +48,7 @@ extern char *bind_address;
extern struct filter_list_struct server_filter_list; extern struct filter_list_struct server_filter_list;
extern char *config_file; extern char *config_file;
extern char *files_from; extern char *files_from;
extern char *tmpdir;
char *auth_user; char *auth_user;
int read_only = 0; int read_only = 0;
...@@ -473,6 +474,16 @@ static int rsync_module(int f_in, int f_out, int i) ...@@ -473,6 +474,16 @@ static int rsync_module(int f_in, int f_out, int i)
am_root = (MY_UID() == 0); am_root = (MY_UID() == 0);
} }
if (lp_temp_dir(i) && *lp_temp_dir(i)) {
tmpdir = lp_temp_dir(i);
if (strlen(tmpdir) >= MAXPATHLEN - 10) {
rprintf(FLOG,
"the 'temp dir' value for %s is WAY too long -- ignoring.\n",
name);
tmpdir = NULL;
}
}
io_printf(f_out, "@RSYNCD: OK\n"); io_printf(f_out, "@RSYNCD: OK\n");
maxargs = MAX_ARGS; maxargs = MAX_ARGS;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment