Commit ff15a5d5 authored by rswindell's avatar rswindell
Browse files

Removed "local" parameter from chksyspass and useredit functions (on local logons since v2).

parent 732d3595
......@@ -168,7 +168,7 @@ int sbbs_t::uselect(int add, uint n, char *title, char *item, uchar *ar)
/****************************************************************************/
/* Prompts user for System Password. Returns 1 if user entered correct PW */
/****************************************************************************/
bool sbbs_t::chksyspass(int local)
bool sbbs_t::chksyspass()
{
char str[256],str2[256] /*,x,y,atr */;
int orgcon=console;
......@@ -184,8 +184,7 @@ bool sbbs_t::chksyspass(int local)
console&=~(CON_R_ECHO|CON_L_ECHO);
getstr(str,40,K_UPPER);
console=orgcon;
if(!local)
CRLF;
CRLF;
if(strcmp(cfg.sys_pass,str)) {
sprintf(str2,"%s #%u System password attempt: '%s'"
,useron.alias,useron.number,str);
......
......@@ -401,7 +401,7 @@ int sbbs_t::exec_function(csi_t *csi)
/* Sysop Functions */
/*******************/
case CS_USER_EDIT:
useredit(csi->str[0] ? finduser(csi->str) : 0,0);
useredit(csi->str[0] ? finduser(csi->str) : 0);
return(0);
......@@ -479,7 +479,7 @@ int sbbs_t::exec_function(csi_t *csi)
return(0);
case CS_SYSTEM_LOG: /* System log */
if(!chksyspass(0))
if(!chksyspass())
return(0);
tm=gmtime(&now);
if(tm==NULL)
......@@ -489,7 +489,7 @@ int sbbs_t::exec_function(csi_t *csi)
printfile(str,0);
return(0);
case CS_SYSTEM_YLOG: /* Yesterday's log */
if(!chksyspass(0))
if(!chksyspass())
return(0);
now-=(ulong)60L*24L*60L;
tm=gmtime(&now);
......@@ -535,7 +535,7 @@ int sbbs_t::exec_function(csi_t *csi)
bprintf(text[StatsFeedbacksToday],ultoac(stats.ftoday,tmp));
return(0);
case CS_CHANGE_USER: /* Change to another user */
if(!chksyspass(0))
if(!chksyspass())
return(0);
bputs(text[ChUserPrompt]);
if(!getstr(str,LEN_ALIAS,K_UPPER))
......@@ -602,14 +602,14 @@ int sbbs_t::exec_function(csi_t *csi)
,sys_status&SS_ANSCAP ? text[ON] : text[OFF]);
return(0);
case CS_LIST_TEXT_FILE: /* View ASCII/ANSI/Ctrl-A file */
if(!chksyspass(0))
if(!chksyspass())
return(0);
bputs(text[Filename]);
if(getstr(str,60,0))
printfile(str,0);
return(0);
case CS_EDIT_TEXT_FILE: /* Edit ASCII/Ctrl-A file */
if(!chksyspass(0))
if(!chksyspass())
return(0);
bputs(text[Filename]);
if(getstr(str,60,0))
......@@ -657,7 +657,7 @@ int sbbs_t::exec_function(csi_t *csi)
if(!fexist(csi->str)) {
bputs(text[FileNotFound]);
return(0); }
if(!chksyspass(0))
if(!chksyspass())
return(0);
case CS_FILE_SEND:
......@@ -681,7 +681,7 @@ int sbbs_t::exec_function(csi_t *csi)
return(0);
case CS_FILE_PUT:
if(!chksyspass(0))
if(!chksyspass())
return(0);
case CS_FILE_RECEIVE:
......
......@@ -639,7 +639,7 @@ void sbbs_t::readmail(uint usernumber, int which)
case 'U': /* user edit */
msg.hdr.number=msg.idx.number;
smb_getmsgidx(&smb,&msg);
useredit(which==MAIL_SENT ? msg.idx.to : msg.idx.from,0);
useredit(which==MAIL_SENT ? msg.idx.to : msg.idx.from);
break;
case 'P': /* Purge author and all mail to/from */
if(noyes(text[AreYouSureQ]))
......
......@@ -806,7 +806,7 @@ int sbbs_t::scanposts(uint subnum, long mode, char *find)
case 'U': /* User edit */
useredit(cfg.sub[subnum]->misc&SUB_NAME
? userdatdupe(0,U_NAME,LEN_NAME,msg.from,0)
: matchuser(&cfg,msg.from),0);
: matchuser(&cfg,msg.from));
break;
case 'V': /* Validate message */
if(msg.total_hfields)
......
......@@ -530,7 +530,7 @@ public:
void errormsg(int line, char *file, char action, char *object
,ulong access, char *extinfo=NULL);
int mv(char *src, char *dest, char copy); /* fast file move/copy function */
bool chksyspass(int local);
bool chksyspass(void);
bool chk_ar(uchar * str, user_t * user); /* checks access requirements */
bool ar_exp(uchar ** ptrptr, user_t * user);
......@@ -658,7 +658,7 @@ public:
bool qnetmail(char *into, char *subj, long mode);
/* useredit.cpp */
void useredit(int usernumber, int local);
void useredit(int usernumber);
int searchup(char *search,int usernum);
int searchdn(char *search,int usernum);
void maindflts(user_t* user);
......
......@@ -49,7 +49,7 @@
/* than or equal to the current user's Main Security Level */
/* Called from functions waitforcall, main_sec, xfer_sec and inkey */
/****************************************************************************/
void sbbs_t::useredit(int usernumber, int local)
void sbbs_t::useredit(int usernumber)
{
char str[256],tmp2[256],tmp3[256],c,stype=SEARCH_TXT;
char tmp[512];
......@@ -60,12 +60,12 @@ void sbbs_t::useredit(int usernumber, int local)
user_t user;
struct tm * tm;
if(online==ON_REMOTE && console&(CON_R_ECHO|CON_R_INPUT) && !chksyspass(local))
if(online==ON_REMOTE && console&(CON_R_ECHO|CON_R_INPUT) && !chksyspass())
return;
if(online==ON_LOCAL) {
if(!(cfg.sys_misc&SM_L_SYSOP))
return;
if(cfg.node_misc&NM_SYSPW && !chksyspass(local))
if(cfg.node_misc&NM_SYSPW && !chksyspass())
return; }
if(usernumber)
user.number=usernumber;
......
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