Made autologin optional at compile time

Autologin is disabled by default at compile time, and a warning to
discourage it's usage is printed if it is enabled.
This will make default RetroShare build safer and reduce dependencies as
example we don't depends anymore on gnome keyring is not needed in default
build for linux anymore.
This commit is contained in:
Gio 2016-12-03 20:04:25 +01:00
parent 6890669820
commit 8656452c68
10 changed files with 202 additions and 146 deletions

View file

@ -717,14 +717,15 @@ int RsInit::LoadCertificates(bool autoLoginNT)
return 0 ;
}
#ifdef RS_AUTOLOGIN
if(autoLoginNT)
{
std::cerr << "RetroShare will AutoLogin next time";
std::cerr << std::endl;
std::cerr << "RetroShare will AutoLogin next time" << std::endl;
RsLoginHandler::enableAutoLogin(preferredId,rsInitConfig->passwd);
rsInitConfig->autoLogin = true ;
}
#endif // RS_AUTOLOGIN
/* wipe out password */
@ -733,10 +734,11 @@ int RsInit::LoadCertificates(bool autoLoginNT)
rsInitConfig->gxs_passwd = rsInitConfig->passwd;
rsInitConfig->passwd = "";
rsAccounts->storePreferredAccount();
rsAccounts->storePreferredAccount();
return 1;
}
#ifdef RS_AUTOLOGIN
bool RsInit::RsClearAutoLogin()
{
RsPeerId preferredId;
@ -747,6 +749,7 @@ bool RsInit::RsClearAutoLogin()
}
return RsLoginHandler::clearAutoLogin(preferredId);
}
#endif // RS_AUTOLOGIN
bool RsInit::isPortable()