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

Commit e1be7134 authored by rswindell's avatar rswindell

Don't require sysop system password re-authentication unless 15 minutes

or more have elapsed since the last system password (SY:) prompt. Similar
to Linux 'sudo' command. Might make this time configurable rather than
hard-coded at some point, but 15 minutes seems like a good default.
parent 47015a57
/* con_hi.cpp */
/* Synchronet hi-level console routines */
// vi: tabstop=4
/* $Id$ */
......@@ -155,6 +154,8 @@ bool sbbs_t::chksyspass(const char* sys_pw)
logline(LOG_NOTICE,"S!","Remote sysop access disabled");
return(false);
}
if(time(NULL) - last_sysop_auth < 15*60)
return true;
if(sys_pw != NULL)
SAFECOPY(str, sys_pw);
else {
......@@ -172,5 +173,6 @@ bool sbbs_t::chksyspass(const char* sys_pw)
logline(LOG_NOTICE,"S!",str2);
return(false);
}
last_sysop_auth = time(NULL);
return(true);
}
......@@ -3162,6 +3162,7 @@ sbbs_t::sbbs_t(ushort node_num, union xp_sockaddr *addr, size_t addr_len, const
scanposts_inside = false;
scansubs_inside = false;
timeleft = 60*10; /* just incase this is being used for calling gettimeleft() */
last_sysop_auth = 0;
uselect_total = 0;
lbuflen = 0;
keybufbot=keybuftop=0; /* initialize [unget]keybuf pointers */
......
......@@ -463,6 +463,7 @@ public:
ulong console; /* Defines current Console settings */
char wordwrap[81]; /* Word wrap buffer */
time_t now, /* Used to store current time in Unix format */
last_sysop_auth,/* Time sysop was last authenticated */
answertime, /* Time call was answered */
logontime, /* Time user logged on */
starttime, /* Time stamp to use for time left calcs */
......
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