Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commits (2)
  • Rob Swindell's avatar
    Log an error and exit immediately when a local linked-node is configured · 5012efb1
    Rob Swindell authored
    When a linked-node (in echocfg->Linked Nodes) contains one of the local system's FTN addresses, display/log an error and exit immediately, e.g.:
    Configuration ERROR: Linked node #20 is your own address: 1:103/705
    
    I'd perform this check in EchoCfg, but:
    1. echocfg doesn't read the BBS's configuration files (where the local FTN addresses are configured), and
    2. some sysops just directly edit their sbbsecho.ini file
    5012efb1
  • Rob Swindell's avatar
    Don't write uploaded filename and description to env variables · 7fd781cd
    Rob Swindell authored
    Environment variables are shared among all threads of a process (e.g. all nodes of a instance of sbbs), so this scheme of passing the uploaded filename and description to an external file tester (upload processor) via environment variables has always been fraught with the possibility of failure or flakiness in Synchronet v3. Since I very much doubt that any upload processor is actually using this scheme, just remove it. Upload processors can and should)use the sbbsfile.nam and sbbsfile.des text files created in the node directory instead.
    7fd781cd
......@@ -1015,7 +1015,6 @@ public:
/* upload.cpp */
bool uploadfile(file_t* f);
char sbbsfilename[128],sbbsfiledesc[128]; /* env vars */
bool upload(uint dirnum);
char upload_lastdesc[LEN_FDESC+1];
bool bulkupload(uint dirnum);
......
......@@ -6242,6 +6242,14 @@ int main(int argc, char **argv)
return -1;
}
for(uint u = 0; u < cfg.nodecfgs; u++) {
if(sysfaddr_is_valid(find_sysfaddr(cfg.nodecfg[u].addr, true))) {
lprintf(LOG_ERR, "Configuration ERROR: Linked node #%u is your own address: %s"
,u + 1, faddrtoa(&cfg.nodecfg[u].addr));
bail(1);
}
}
char* tmpdir = FULLPATH(NULL, cfg.temp_dir, sizeof(cfg.temp_dir)-1);
if(tmpdir != NULL) {
SAFECOPY(cfg.temp_dir, tmpdir);
......
......@@ -61,10 +61,6 @@ bool sbbs_t::uploadfile(file_t* f)
attr(LIGHTGRAY);
bputs(cfg.ftest[i]->workstr);
safe_snprintf(sbbsfilename,sizeof(sbbsfilename),"SBBSFILENAME=%s",f->name);
putenv(sbbsfilename);
safe_snprintf(sbbsfiledesc,sizeof(sbbsfiledesc),"SBBSFILEDESC=%s",f->desc);
putenv(sbbsfiledesc);
SAFEPRINTF(str,"%ssbbsfile.nam",cfg.node_dir);
if((stream=fopen(str,"w"))!=NULL) {
fprintf(stream, "%s", f->desc);
......