mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-01 18:56:23 -04:00
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:
parent
6890669820
commit
8656452c68
10 changed files with 202 additions and 146 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue