diff --git a/src/sbbs3/answer.cpp b/src/sbbs3/answer.cpp index 320fd0ed4e5ea6d92f3fe7e9c6377a3355da2709..e45037d740607d9e61c827508a55f8e30350c1b9 100644 --- a/src/sbbs3/answer.cpp +++ b/src/sbbs3/answer.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -108,7 +108,7 @@ bool sbbs_t::answer() ,startup->options&BBS_OPT_USE_2ND_RLOGIN ? str2 : str); SAFECOPY(rlogin_pass ,startup->options&BBS_OPT_USE_2ND_RLOGIN ? str : str2); - useron.number=userdatdupe(0, U_ALIAS, LEN_ALIAS, rlogin_name, 0, 0); + useron.number=userdatdupe(0, U_ALIAS, LEN_ALIAS, rlogin_name); if(useron.number) { getuserdat(&cfg,&useron); useron.misc&=~TERM_FLAGS; @@ -192,7 +192,7 @@ bool sbbs_t::answer() rlogin_pass[i]=0; lprintf(LOG_DEBUG,"Node %d SSH login: '%s'" ,cfg.node_num, rlogin_name); - useron.number=userdatdupe(0, U_ALIAS, LEN_ALIAS, rlogin_name, 0, 0); + useron.number=userdatdupe(0, U_ALIAS, LEN_ALIAS, rlogin_name); if(useron.number) { getuserdat(&cfg,&useron); useron.misc&=~TERM_FLAGS; @@ -208,7 +208,13 @@ bool sbbs_t::answer() else sprintf(str,"(%04u) %-25s FAILED Password attempt" ,0,useron.alias); - logline(LOG_NOTICE,"+!",str); + /* crash here Sept-12-2010 + str 0x06b3fc4c "(0000) Guest FAILED Password attempt: 'alex2010@sdf.lonestar.org'" + + and Oct-6-2010 + str 0x070ffc4c "(0000) Woot903 FAILED Password attempt: 'p67890pppsdsjhsdfhhfhnhnfhfhfdhjksdjkfdskw3902391=`'" char [261] + */ + logline(LOG_NOTICE,"+!",str); bputs(text[PasswordPrompt]); console|=CON_R_ECHOX; getstr(tmp,LEN_PASS*2,K_UPPER|K_LOWPRIO|K_TAB); @@ -338,7 +344,7 @@ bool sbbs_t::answer() /* AutoLogon via IP or Caller ID here */ if(!useron.number && !(sys_status&SS_RLOGIN) && startup->options&BBS_OPT_AUTO_LOGON && cid[0]) { - useron.number=userdatdupe(0, U_NOTE, LEN_NOTE, cid, 0, 0); + useron.number=userdatdupe(0, U_NOTE, LEN_NOTE, cid); if(useron.number) { getuserdat(&cfg, &useron); if(!(useron.misc&AUTOLOGON) || !(useron.exempt&FLAG('V'))) diff --git a/src/sbbs3/chat.cpp b/src/sbbs3/chat.cpp index b4c4e0674354c4c0bb134eea73dc229f893e3bd3..2dbb520eca576e703a3301c3f0e6ef7da1c5cdef 100644 --- a/src/sbbs3/chat.cpp +++ b/src/sbbs3/chat.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -1282,7 +1282,7 @@ int sbbs_t::getnodetopage(int all, int telegram) return(-1); if(str[0]=='\'') { - j=userdatdupe(0,U_HANDLE,LEN_HANDLE,str+1,0,0); + j=userdatdupe(0,U_HANDLE,LEN_HANDLE,str+1); if(!j) { bputs(text[UnknownUser]); return(0); diff --git a/src/sbbs3/data_ovl.cpp b/src/sbbs3/data_ovl.cpp index 2848b3f00ee6b9cabacc563baad2c7c4408f2d4e..2c2abe8f5a1d252392a2a316e853d75e207d019e 100644 --- a/src/sbbs3/data_ovl.cpp +++ b/src/sbbs3/data_ovl.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * diff --git a/src/sbbs3/exec.cpp b/src/sbbs3/exec.cpp index d2b9d23ef87f94bd290918e53a61ccd7b59436b8..d6d03be58ed979271895d3d369224a1dbd28411e 100644 --- a/src/sbbs3/exec.cpp +++ b/src/sbbs3/exec.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -1603,8 +1603,7 @@ int sbbs_t::exec(csi_t *csi) if(trashcan(csi->str,"name")) break; if(cfg.uq&UQ_DUPREAL - && userdatdupe(useron.number,U_NAME,LEN_NAME - ,csi->str,0,0)) + && userdatdupe(useron.number,U_NAME,LEN_NAME,csi->str)) break; sprintf(useron.name,"%.*s",LEN_NAME,csi->str); putuserrec(&cfg,useron.number,U_NAME,LEN_NAME @@ -1615,8 +1614,7 @@ int sbbs_t::exec(csi_t *csi) if(trashcan(csi->str,"name")) break; if(cfg.uq&UQ_DUPHAND - && userdatdupe(useron.number,U_HANDLE,LEN_HANDLE - ,csi->str,0,0)) + && userdatdupe(useron.number,U_HANDLE,LEN_HANDLE,csi->str)) break; sprintf(useron.handle,"%.*s",LEN_HANDLE,csi->str); putuserrec(&cfg,useron.number,U_HANDLE,LEN_HANDLE diff --git a/src/sbbs3/execfunc.cpp b/src/sbbs3/execfunc.cpp index 5b142635a9f5c4dee12259daedf6871876a42817..0961a61404d21c49d7469b9050464eb8cba88769 100644 --- a/src/sbbs3/execfunc.cpp +++ b/src/sbbs3/execfunc.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -184,7 +184,7 @@ int sbbs_t::exec_function(csi_t *csi) netmail(csi->str,nulstr,0); } else if((i=finduser(csi->str))!=0 - || (cfg.msg_misc&MM_REALNAME && (i=userdatdupe(0,U_NAME,LEN_NAME,csi->str,false,false))!=0)) + || (cfg.msg_misc&MM_REALNAME && (i=userdatdupe(0,U_NAME,LEN_NAME,csi->str))!=0)) email(i,nulstr,nulstr,WM_EMAIL); csi->logic=!i; return(0); @@ -219,7 +219,7 @@ int sbbs_t::exec_function(csi_t *csi) netmail(csi->str,nulstr,WM_FILE); } else if((i=finduser(csi->str))!=0 - || (cfg.msg_misc&MM_REALNAME && (i=userdatdupe(0,U_NAME,LEN_NAME,csi->str,false,false))!=0)) + || (cfg.msg_misc&MM_REALNAME && (i=userdatdupe(0,U_NAME,LEN_NAME,csi->str))!=0)) email(i,nulstr,nulstr,WM_EMAIL|WM_FILE); csi->logic=!i; return(0); diff --git a/src/sbbs3/js_system.c b/src/sbbs3/js_system.c index 52cc72e556bc31354bb2976e34ac1a5ade534996..bb9e0c7e04272ee861918226ce59d07158372d9d 100644 --- a/src/sbbs3/js_system.c +++ b/src/sbbs3/js_system.c @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * diff --git a/src/sbbs3/login.cpp b/src/sbbs3/login.cpp index 6d1450ffac013a4ba481cccadab07352ef0a1d7e..5e0acff77b9b15a493940d74616a407e00e0e7e1 100644 --- a/src/sbbs3/login.cpp +++ b/src/sbbs3/login.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -70,7 +70,7 @@ int sbbs_t::login(char *username, char *pw) useron.number=matchuser(&cfg,str,FALSE); if(!useron.number && (uchar)str[0]<0x7f && str[1] && isalpha(str[0]) && strchr(str,' ') && cfg.node_misc&NM_LOGON_R) - useron.number=userdatdupe(0,U_NAME,LEN_NAME,str,0,0); + useron.number=userdatdupe(0,U_NAME,LEN_NAME,str); if(useron.number) { getuserdat(&cfg,&useron); if(useron.number && useron.misc&(DELETED|INACTIVE)) diff --git a/src/sbbs3/logon.cpp b/src/sbbs3/logon.cpp index 5168513c9c958a0adbc851be24221fccd6f3c53f..3758711c0c1627bdcfb7813ce829a4234c8bb36b 100644 --- a/src/sbbs3/logon.cpp +++ b/src/sbbs3/logon.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * diff --git a/src/sbbs3/mailsrvr.c b/src/sbbs3/mailsrvr.c index a658197032e0f073e6d2a771e3229bc6125fbd8b..1770fd2102855152d8e41e4b12167f4b097219fd 100644 --- a/src/sbbs3/mailsrvr.c +++ b/src/sbbs3/mailsrvr.c @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -1421,7 +1421,7 @@ static BOOL email_addr_is_exempt(const char* addr) if(*(p=netmail)=='<') p++; truncstr(p,">"); - return userdatdupe(&scfg, 0, U_NETMAIL, LEN_NETMAIL, p, FALSE, FALSE); + return userdatdupe(&scfg, 0, U_NETMAIL, LEN_NETMAIL, p, /* del */FALSE, /* next */FALSE); } static void exempt_email_addr(const char* comment @@ -2120,7 +2120,7 @@ static uint smtp_matchuser(scfg_t *scfg, char *str, BOOL aliases, BOOL datdupe) goto end; if(datdupe) - usernum=userdatdupe(scfg, 0, U_NAME, LEN_NAME, name, FALSE, FALSE); + usernum=userdatdupe(scfg, 0, U_NAME, LEN_NAME, name, /* del */FALSE, /* next */FALSE); else usernum=matchuser(scfg, name, aliases); @@ -3600,7 +3600,7 @@ static void smtp_thread(void* arg) SAFEPRINTF(relay_list,"%srelay.cfg",scfg.ctrl_dir); if(relay_user.number==0 /* not authenticated, search for IP */ && startup->options&MAIL_OPT_SMTP_AUTH_VIA_IP) { - relay_user.number=userdatdupe(&scfg, 0, U_NOTE, LEN_NOTE, host_ip, FALSE, FALSE); + relay_user.number=userdatdupe(&scfg, 0, U_NOTE, LEN_NOTE, host_ip, /* del */FALSE, /* next */FALSE); if(relay_user.number) { getuserdat(&scfg,&relay_user); if(relay_user.laston < time(NULL)-(60*60)) /* logon in past hour? */ diff --git a/src/sbbs3/newuser.cpp b/src/sbbs3/newuser.cpp index 1de2e22451ff8a382bcb428c961ba3559cf3e88e..633c21c2d4186455ca8da48398c0c772a09876a5 100644 --- a/src/sbbs3/newuser.cpp +++ b/src/sbbs3/newuser.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2009 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -115,7 +115,7 @@ BOOL sbbs_t::newuser() useron.prot=cfg.new_prot; SAFECOPY(useron.comp,client_name); /* hostname or CID name */ SAFECOPY(useron.note,cid); /* IP address or CID number */ - if((i=userdatdupe(0,U_NOTE,LEN_NOTE,cid,true,false))!=0) { /* Duplicate IP address */ + if((i=userdatdupe(0,U_NOTE,LEN_NOTE,cid, /* del */true))!=0) { /* Duplicate IP address */ sprintf(useron.comment,"Warning: same IP address as user #%d %s" ,i,username(&cfg,i,str)); logline(LOG_NOTICE,"N!",useron.comment); @@ -218,8 +218,7 @@ BOOL sbbs_t::newuser() if (!check_name(&cfg,useron.name) || !strchr(useron.name,' ') || (cfg.uq&UQ_DUPREAL - && userdatdupe(useron.number,U_NAME,LEN_NAME - ,useron.name,0,0))) + && userdatdupe(useron.number,U_NAME,LEN_NAME,useron.name))) bputs(text[YouCantUseThatName]); else break; @@ -242,7 +241,7 @@ BOOL sbbs_t::newuser() ,K_LINE|K_EDIT|K_AUTODEL|(cfg.uq&UQ_NOEXASC)) || strchr(useron.handle,0xff) || (cfg.uq&UQ_DUPHAND - && userdatdupe(0,U_HANDLE,LEN_HANDLE,useron.handle,0,0)) + && userdatdupe(0,U_HANDLE,LEN_HANDLE,useron.handle)) || trashcan(useron.handle,"name")) bputs(text[YouCantUseThatName]); else diff --git a/src/sbbs3/postmsg.cpp b/src/sbbs3/postmsg.cpp index a4035ed301cb3806e56049478957b42246286e2f..fe79e8a9b09c3e8699c81c67b2f9b8f006b7e6d1 100644 --- a/src/sbbs3/postmsg.cpp +++ b/src/sbbs3/postmsg.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -135,7 +135,7 @@ bool sbbs_t::postmsg(uint subnum, smbmsg_t *remsg, long wm_mode) if(stricmp(touser,"ALL") && !(cfg.sub[subnum]->misc&(SUB_PNET|SUB_FIDO|SUB_QNET|SUB_INET|SUB_ANON))) { if(cfg.sub[subnum]->misc&SUB_NAME) { - if(!userdatdupe(useron.number,U_NAME,LEN_NAME,touser,0,0)) { + if(!userdatdupe(useron.number,U_NAME,LEN_NAME,touser)) { bputs(text[UnknownUser]); return(false); } @@ -457,6 +457,21 @@ extern "C" int DLLCALL savemsg(scfg_t* cfg, smb_t* smb, smbmsg_t* msg, client_t* if(smb->subnum==INVALID_SUB) { /* e-mail */ + /* exception here during recycle: + + sbbs.dll!savemsg(scfg_t * cfg, smb_t * smb, smbmsg_t * msg, client_t * client, char * msgbuf) Line 473 + 0xf bytes C++ + sbbs.dll!js_save_msg(JSContext * cx, JSObject * obj, unsigned int argc, long * argv, long * rval) Line 1519 + 0x25 bytes C + js32.dll!js_Invoke(JSContext * cx, unsigned int argc, unsigned int flags) Line 1375 + 0x17 bytes C + js32.dll!js_Interpret(JSContext * cx, unsigned char * pc, long * result) Line 3944 + 0xf bytes C + js32.dll!js_Execute(JSContext * cx, JSObject * chain, JSScript * script, JSStackFrame * down, unsigned int flags, long * result) Line 1633 + 0x13 bytes C + js32.dll!JS_ExecuteScript(JSContext * cx, JSObject * obj, JSScript * script, long * rval) Line 4188 + 0x19 bytes C + sbbs.dll!sbbs_t::js_execfile(const char * cmd, const char * startup_dir) Line 686 + 0x27 bytes C++ + sbbs.dll!sbbs_t::external(const char * cmdline, long mode, const char * startup_dir) Line 413 + 0x1e bytes C++ + sbbs.dll!event_thread(void * arg) Line 2745 + 0x71 bytes C++ + + apparently the event_thread is sharing an scfg_t* with another thread! */ + + smb->status.max_crcs=cfg->mail_maxcrcs; smb->status.max_age=cfg->mail_maxage; smb->status.max_msgs=0; /* unlimited */ diff --git a/src/sbbs3/readmsgs.cpp b/src/sbbs3/readmsgs.cpp index a3c128c6e1efc1a86caebe1fa9ecc5a13c836156..47317f6edfe9d04e5f66554b7a4f41dd1ef43547 100644 --- a/src/sbbs3/readmsgs.cpp +++ b/src/sbbs3/readmsgs.cpp @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -891,7 +891,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find) i=atoi(str); if(!i) { if(cfg.sub[subnum]->misc&SUB_NAME) - i=userdatdupe(0,U_NAME,LEN_NAME,str,0,0); + i=userdatdupe(0,U_NAME,LEN_NAME,str); else i=matchuser(&cfg,str,TRUE /* sysop_alias */); } @@ -957,7 +957,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find) if(noyes(text[AreYouSureQ])) break; purgeuser(cfg.sub[subnum]->misc&SUB_NAME - ? userdatdupe(0,U_NAME,LEN_NAME,msg.from,0,0) + ? userdatdupe(0,U_NAME,LEN_NAME,msg.from) : matchuser(&cfg,msg.from,FALSE)); break; case 'C': /* Change message attributes */ @@ -1023,7 +1023,7 @@ int sbbs_t::scanposts(uint subnum, long mode, const char *find) break; case 'U': /* User edit */ useredit(cfg.sub[subnum]->misc&SUB_NAME - ? userdatdupe(0,U_NAME,LEN_NAME,msg.from,0,0) + ? userdatdupe(0,U_NAME,LEN_NAME,msg.from) : matchuser(&cfg,msg.from,TRUE /* sysop_alias */)); break; case 'V': /* Validate message */ diff --git a/src/sbbs3/sbbs.h b/src/sbbs3/sbbs.h index 5b5b6efb13641f0b6d2766c871599b7f888b4252..38664941287e5d16376637272e726b35fcf5840e 100644 --- a/src/sbbs3/sbbs.h +++ b/src/sbbs3/sbbs.h @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License * @@ -440,7 +440,7 @@ public: uint getusrgrp(uint subnum); uint userdatdupe(uint usernumber, uint offset, uint datlen, char *dat - ,bool del, bool next); + ,bool del=false, bool next=false); ulong gettimeleft(bool handle_out_of_time=true); bool gettimeleft_inside; diff --git a/src/sbbs3/userdat.c b/src/sbbs3/userdat.c index e83f73ca3eec10b37ed7b153baf8d0ab6313169d..ef36761b1b8ae28f6b1a61a4df890417b2c638e7 100644 --- a/src/sbbs3/userdat.c +++ b/src/sbbs3/userdat.c @@ -8,7 +8,7 @@ * @format.tab-size 4 (Plain Text/Source Code File Header) * * @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) * * * - * Copyright 2010 Rob Swindell - http://www.synchro.net/copyright.html * + * Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html * * * * This program is free software; you can redistribute it and/or * * modify it under the terms of the GNU General Public License *