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 c3fbdc07 authored by deuce's avatar deuce

Fix ups for new user creation via RLogin. New behaviour is as follows:

if (specified user does not exist) {
    if (rlogin password recieved) {
        create new user with specified password
    }
    else {
        create new user with random password
        show password to user
        allow user to change password
        validate new password
   }
}
else {
    if(password is correct) {
        logon user
    }
    else {
        prompt for current password
    }
}
parent 494138b6
......@@ -104,6 +104,8 @@ bool sbbs_t::answer()
,terminal);
SAFECOPY(rlogin_name
,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);
if(useron.number) {
getuserdat(&cfg,&useron);
......
......@@ -364,14 +364,19 @@ BOOL sbbs_t::newuser()
}
c=0;
while(c<LEN_PASS) { /* Create random password */
useron.pass[c]=sbbs_random(43)+'0';
if(isalnum(useron.pass[c]))
c++;
if(sys_status&SS_RLOGIN && rlogin_pass[0]) {
SAFECOPY(useron.pass, rlogin_pass);
}
else {
while(c<LEN_PASS) { /* Create random password */
useron.pass[c]=sbbs_random(43)+'0';
if(isalnum(useron.pass[c]))
c++;
}
useron.pass[c]=0;
}
useron.pass[c]=0;
if(!(sys_status&SS_RLOGIN)) {
if(!(sys_status&SS_RLOGIN && rlogin_pass[0])) {
bprintf(text[YourPasswordIs],useron.pass);
if(cfg.sys_misc&SM_PWEDIT && yesno(text[NewPasswordQ]))
......
......@@ -219,6 +219,7 @@ public:
node_t thisnode; /* Node information */
smb_t smb; /* Currently open message base */
char rlogin_name[LEN_ALIAS+1];
char rlogin_pass[LEN_PASS+1];
uint temp_dirnum;
......
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