Browse Source

[core] set chunkqueue tempdirs at startup /var/tmp

If server.upload-dirs is not configured, then attempt to use TMPDIR
from the environment, if set, or else use /var/tmp which is not often
a tmpfs, unlike /tmp.  Warn at startup if tempdirs are not present.
personal/stbuehler/mod-csrf-old
Glenn Strauss 5 years ago
parent
commit
f7410da5d2
  1. 2
      src/configfile.c

2
src/configfile.c

@ -1366,7 +1366,7 @@ int config_set_defaults(server *srv) {
if (!srv->srvconf.upload_tempdirs->used) {
data_string *ds = data_string_init();
const char *tmpdir = getenv("TMPDIR");
if (NULL == tmpdir) tmpdir = "/tmp";
if (NULL == tmpdir) tmpdir = "/var/tmp";
buffer_copy_string(ds->value, tmpdir);
array_insert_unique(srv->srvconf.upload_tempdirs, (data_unset *)ds);
}

Loading…
Cancel
Save