| Index: remoting/host/pam_authorization_factory_posix.cc
|
| diff --git a/remoting/host/pam_authorization_factory_posix.cc b/remoting/host/pam_authorization_factory_posix.cc
|
| index 1a5b0b3e7ea14509bb6b9ce576d97a31b76bbd90..d82c7013b39535f5dbe764a6ca163ae7c43325fd 100644
|
| --- a/remoting/host/pam_authorization_factory_posix.cc
|
| +++ b/remoting/host/pam_authorization_factory_posix.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/callback.h"
|
| #include "base/environment.h"
|
| #include "base/logging.h"
|
| +#include "remoting/base/util.h"
|
| #include "remoting/protocol/channel_authenticator.h"
|
| #include "third_party/libjingle/source/talk/xmllite/xmlelement.h"
|
|
|
| @@ -101,11 +102,10 @@ void PamAuthorizer::MaybeCheckLocalLogin() {
|
| }
|
|
|
| bool PamAuthorizer::IsLocalLoginAllowed() {
|
| - std::string username;
|
| - if (!base::Environment::Create()->GetVar("USER", &username)) {
|
| + std::string username = GetUsername();
|
| + if (username.empty()) {
|
| return false;
|
| }
|
| -
|
| struct pam_conv conv = { PamConversation, NULL };
|
| pam_handle_t* handle = NULL;
|
| int result = pam_start("chrome-remote-desktop", username.c_str(),
|
|
|