Skip to content
Snippets Groups Projects
Commit 1ed2f115 authored by rswindell's avatar rswindell
Browse files

Added cgi_temp_dir.

parent 6f23f047
Branches
Tags
No related merge requests found
...@@ -113,6 +113,7 @@ void sbbs_read_ini( ...@@ -113,6 +113,7 @@ void sbbs_read_ini(
{ {
const char* section; const char* section;
const char* default_term; const char* default_term;
const char* default_cgi_temp;
char* ctrl_dir; char* ctrl_dir;
char* host_name; char* host_name;
...@@ -316,6 +317,15 @@ void sbbs_read_ini( ...@@ -316,6 +317,15 @@ void sbbs_read_ini(
SAFECOPY(web->error_dir SAFECOPY(web->error_dir
,iniReadString(fp,section,"ErrorDirectory","../html/error")); ,iniReadString(fp,section,"ErrorDirectory","../html/error"));
#ifdef __unix__
default_cgi_temp = "/tmp";
#else
if((default_cgi_temp = getenv("TEMP")) == NULL)
default_cgi_temp = "";
#endif
SAFECOPY(web->cgi_temp_dir
,iniReadString(fp,section,"CGITempDirectory",default_cgi_temp));
web->options web->options
=iniReadBitField(fp,section,"Options",web_options =iniReadBitField(fp,section,"Options",web_options
,BBS_OPT_NO_HOST_LOOKUP); ,BBS_OPT_NO_HOST_LOOKUP);
......
...@@ -78,6 +78,7 @@ typedef struct { ...@@ -78,6 +78,7 @@ typedef struct {
char ctrl_dir[128]; char ctrl_dir[128];
char root_dir[128]; char root_dir[128];
char error_dir[128]; char error_dir[128];
char cgi_temp_dir[128];
char reserved_path7[128]; char reserved_path7[128];
char reserved_path6[128]; char reserved_path6[128];
char reserved_path5[128]; char reserved_path5[128];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment